[GH-ISSUE #2346] frps更新到0.36.2无法绑定端口 #1862

Closed
opened 2026-05-05 13:12:17 -06:00 by gitea-mirror · 14 comments
Owner

Originally created by @hathlife on GitHub (Apr 10, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2346

[REQUIRED] hat version of frp are you using
Version:0.36.2

[REQUIRED] What operating system and processor architecture are you using
OS: Ubuntu 20.04
CPU architecture: amd64

[REQUIRED] description of errors
frps更新到0.36.2后,服务端任意端口均无法绑定,log显示error: port unavailable,回退到0.36.1问题消失.
confile

[common]
bind_addr = ::
bind_port = 7000
kcp_bind_port = 7000
bind_udp_port = 7001
dashboard_port = 7500
dashboard_user = ssssssssssssssss
dashboard_pwd = xxxxxxxxxxxxxxxxxx
enable_prometheus = true
authentication_method = token
token = sssssssssssssssss

log file

[I] [root.go:209] frps started successfully
[I] [service.go:449] [940df461b07ad10c] client login info: ip [xxx.xxx.xxx.xxx:12045] version [0.34.3] hostname [] os [linux] arch [amd64]
[W] [control.go:442] [940df461b07ad10c] new proxy [ttttt.ssh] error: port unavailable
[I] [service.go:449] [24108133d152efd0] client login info: ip [xx.xx.xx.xx:6632] version [0.34.3] hostname [] os [linux] arch [amd64]
[I] [service.go:449] [78f7c137c4a40836] client login info: ip [xx.xx.xx.xx:2080] version [0.36.2] hostname [] os [linux] arch [arm] 
[W] [control.go:442] [24108133d152efd0] new proxy [xxxxxx.ssh] error: port unavailable
[W] [control.go:442] [24108133d152efd0] new proxy [xxxxxx.zzssh] error: port unavailable
[W] [control.go:442] [78f7c137c4a40836] new proxy [yyyyyy.ssh] error: port unavailable
[W] [control.go:442] [78f7c137c4a40836] new proxy [yyyyyy.zzzzz] error: port unavailable
[W] [control.go:442] [78f7c137c4a40836] new proxy [yyyyy.zzzzz] error: port unavailable

Steps to reproduce the issue

  1. 更新frps执行文件到0.36.2
  2. 重启frps服务

Supplementary information

Can you guess what caused this issue

Checklist:

  • I included all information required in the sections above
  • I made sure there are no duplicates of this report (Use Search)
Originally created by @hathlife on GitHub (Apr 10, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2346 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** Version:0.36.2 **[REQUIRED] What operating system and processor architecture are you using** OS: Ubuntu 20.04 CPU architecture: amd64 **[REQUIRED] description of errors** frps更新到0.36.2后,服务端任意端口均无法绑定,log显示`error: port unavailable`,回退到0.36.1问题消失. **confile** <!-- Please pay attention to hiding the token, server_addr and other privacy information --> ```ini [common] bind_addr = :: bind_port = 7000 kcp_bind_port = 7000 bind_udp_port = 7001 dashboard_port = 7500 dashboard_user = ssssssssssssssss dashboard_pwd = xxxxxxxxxxxxxxxxxx enable_prometheus = true authentication_method = token token = sssssssssssssssss ``` **log file** <!-- If the file is too large, use Pastebin, for example https://pastebin.ubuntu.com/ --> ``` [I] [root.go:209] frps started successfully [I] [service.go:449] [940df461b07ad10c] client login info: ip [xxx.xxx.xxx.xxx:12045] version [0.34.3] hostname [] os [linux] arch [amd64] [W] [control.go:442] [940df461b07ad10c] new proxy [ttttt.ssh] error: port unavailable [I] [service.go:449] [24108133d152efd0] client login info: ip [xx.xx.xx.xx:6632] version [0.34.3] hostname [] os [linux] arch [amd64] [I] [service.go:449] [78f7c137c4a40836] client login info: ip [xx.xx.xx.xx:2080] version [0.36.2] hostname [] os [linux] arch [arm] [W] [control.go:442] [24108133d152efd0] new proxy [xxxxxx.ssh] error: port unavailable [W] [control.go:442] [24108133d152efd0] new proxy [xxxxxx.zzssh] error: port unavailable [W] [control.go:442] [78f7c137c4a40836] new proxy [yyyyyy.ssh] error: port unavailable [W] [control.go:442] [78f7c137c4a40836] new proxy [yyyyyy.zzzzz] error: port unavailable [W] [control.go:442] [78f7c137c4a40836] new proxy [yyyyy.zzzzz] error: port unavailable ``` **Steps to reproduce the issue** 1. 更新frps执行文件到0.36.2 2. 重启frps服务 **Supplementary information** **Can you guess what caused this issue** **Checklist**: <!--- Make sure you've completed the following steps (put an "X" between of brackets): --> - [x] I included all information required in the sections above - [x] I made sure there are no duplicates of this report [(Use Search)](https://github.com/fatedier/frp/issues?q=is%3Aissue)
gitea-mirror 2026-05-05 13:12:17 -06:00
Author
Owner

@blizard863 commented on GitHub (Apr 11, 2021):

服务端和客户端的版本一样吗?

<!-- gh-comment-id:817239722 --> @blizard863 commented on GitHub (Apr 11, 2021): 服务端和客户端的版本一样吗?
Author
Owner

@hathlife commented on GitHub (Apr 11, 2021):

服务端和客户端的版本一样吗?

看log似乎和客户端版本无关的样子。。。0.34.3和0.36.2的客户端连入都一样

<!-- gh-comment-id:817341683 --> @hathlife commented on GitHub (Apr 11, 2021): > 服务端和客户端的版本一样吗? 看log似乎和客户端版本无关的样子。。。0.34.3和0.36.2的客户端连入都一样
Author
Owner

@blizard863 commented on GitHub (Apr 12, 2021):

only allow frpc to bind ports you list, if you set nothing, there won't be any limit
allow_ports = 2000-3000,3001,3003,4000-50000

这个配置了么 ?

<!-- gh-comment-id:817504421 --> @blizard863 commented on GitHub (Apr 12, 2021): only allow frpc to bind ports you list, if you set nothing, there won't be any limit allow_ports = 2000-3000,3001,3003,4000-50000 这个配置了么 ?
Author
Owner

@hathlife commented on GitHub (Apr 12, 2021):

only allow frpc to bind ports you list, if you set nothing, there won't be any limit
allow_ports = 2000-3000,3001,3003,4000-50000

这个配置了么 ?

没有,服务器就我一个人用。。

<!-- gh-comment-id:817580110 --> @hathlife commented on GitHub (Apr 12, 2021): > only allow frpc to bind ports you list, if you set nothing, there won't be any limit > allow_ports = 2000-3000,3001,3003,4000-50000 > > 这个配置了么 ? 没有,服务器就我一个人用。。
Author
Owner

@fatedier commented on GitHub (Apr 14, 2021):

To verify that port is not bind by other processes.

<!-- gh-comment-id:819541030 --> @fatedier commented on GitHub (Apr 14, 2021): To verify that port is not bind by other processes.
Author
Owner

@tongyifan commented on GitHub (Apr 27, 2021):

Same issue. I've checked the port is not bind by other processes.
netstat -anp | grep 64374 return nothing
Both version of server and client are 0.36.2. But if I rollback the version of server-side to 0.36.1, it works fine.

<!-- gh-comment-id:827280129 --> @tongyifan commented on GitHub (Apr 27, 2021): Same issue. I've checked the port is not bind by other processes. `netstat -anp | grep 64374` return nothing Both version of server and client are 0.36.2. But if I rollback the version of server-side to 0.36.1, it works fine.
Author
Owner

@cl000282 commented on GitHub (May 10, 2021):

36.2 windows的有病毒哦

<!-- gh-comment-id:836377881 --> @cl000282 commented on GitHub (May 10, 2021): 36.2 windows的有病毒哦
Author
Owner

@smdhz commented on GitHub (Jun 10, 2021):

同样的问题,
怀疑与ipv6有关。

frps设置

[common]
bind_addr = ::
bind_port = 7000
token = ***
vhost_https_port = 443

服务器端端口

netstat -nat
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 69 45.32.23.206:22 150.138.115.165:47805 FIN_WAIT1
tcp 0 316 45.32.23.206:22 60.73.55.245:55290 ESTABLISHED
tcp 0 0 45.32.23.206:22 180.76.57.102:38912 ESTABLISHED
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::7000 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
tcp6 0 0 45.32.23.206:443 162.158.119.192:18774 ESTABLISHED
tcp6 0 0 45.32.23.206:443 172.70.122.157:49018 TIME_WAIT
tcp6 0 0 45.32.23.206:443 162.158.119.192:11020 ESTABLISHED
tcp6 0 0 2001:19f0:7001:337:7000 2400:2411:1c0:770:35550 ESTABLISHED

frps log

2021/06/10 14:15:02 [I] [root.go:200] frps uses config file: /etc/frps/frps.ini
2021/06/10 14:15:02 [I] [service.go:192] frps tcp listen on [::]:7000
2021/06/10 14:15:02 [I] [service.go:250] https service listen on [::]:443
2021/06/10 14:15:02 [I] [root.go:209] frps started successfully
2021/06/10 14:15:03 [I] [service.go:449] [0aa589a9742caf7a] client login info: ip [[2400:2411:1c0:7700:fab1:56ff:fed4:d237]:35502] version [0.36.2] hostname [] os [linux] arch [amd64]
2021/06/10 14:15:03 [I] [https.go:51] [0aa589a9742caf7a] [skyline_https] https proxy listen for host [a.my.club]
2021/06/10 14:15:03 [I] [https.go:51] [0aa589a9742caf7a] [skyline_https] https proxy listen for host [b.my.club]
2021/06/10 14:15:03 [I] [https.go:51] [0aa589a9742caf7a] [skyline_https] https proxy listen for host [c.my.club]
2021/06/10 14:15:03 [I] [control.go:446] [0aa589a9742caf7a] new proxy [skyline_https] success
2021/06/10 14:15:03 [W] [control.go:442] [0aa589a9742caf7a] new proxy [sstcp] error: port unavailable
2021/06/10 14:15:16 [I] [proxy.go:162] [0aa589a9742caf7a] [skyline_https] get a user connection [162.158.119.192:60736]

frpc 设置

[common]
server_addr = gateway.my.cf
server_port = 7000
token = ****
[skyline_https]
type = https
local_port = 443
custom_domains = a.my.club,b.my.club,c.my.club
[sstcp]
type = tcp
remote_port = 80
local_ip = 10.16.2.1
local_port = 8010

客户端端口

netstat -nat
激活Internet连接 (服务器和已建立连接的)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1431 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:1434 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp6 0 0 :::8080 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::8081 :::* LISTEN
tcp6 0 0 :::8082 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:1431 :::* LISTEN
tcp6 0 0 :::1433 :::* LISTEN
tcp6 0 0 ::1:1434 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN
tcp6 0 0 :::445 :::* LISTEN
tcp6 0 0 :::8000 :::* LISTEN
tcp6 0 0 :::9090 :::* LISTEN
tcp6 0 0 :::5000 :::* LISTEN
tcp6 0 0 :::9000 :::* LISTEN
tcp6 0 0 :::8010 :::* LISTEN
tcp6 0 0 :::3306 :::* LISTEN
tcp6 0 0 :::139 :::* LISTEN
tcp6 0 0 :::111 :::* LISTEN

frpc log

2021/06/10 22:15:33 [I] [service.go:304] [0aa589a9742caf7a] login to server success, get run id [0aa589a9742caf7a], server udp port [0]
2021/06/10 22:15:33 [I] [proxy_manager.go:144] [0aa589a9742caf7a] proxy added: [skyline_https sstcp]
2021/06/10 22:15:33 [I] [control.go:180] [0aa589a9742caf7a] [skyline_https] start proxy success
2021/06/10 22:15:33 [W] [control.go:178] [0aa589a9742caf7a] [sstcp] start error: port unavailable

<!-- gh-comment-id:858684509 --> @smdhz commented on GitHub (Jun 10, 2021): 同样的问题, 怀疑与ipv6有关。 **frps设置** > [common] bind_addr = :: bind_port = 7000 token = *** vhost_https_port = 443 **服务器端端口** > netstat -nat Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 69 45.32.23.206:22 150.138.115.165:47805 FIN_WAIT1 tcp 0 316 45.32.23.206:22 60.73.55.245:55290 ESTABLISHED tcp 0 0 45.32.23.206:22 180.76.57.102:38912 ESTABLISHED tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 :::7000 :::* LISTEN tcp6 0 0 :::443 :::* LISTEN tcp6 0 0 45.32.23.206:443 162.158.119.192:18774 ESTABLISHED tcp6 0 0 45.32.23.206:443 172.70.122.157:49018 TIME_WAIT tcp6 0 0 45.32.23.206:443 162.158.119.192:11020 ESTABLISHED tcp6 0 0 2001:19f0:7001:337:7000 2400:2411:1c0:770:35550 ESTABLISHED **frps log** > 2021/06/10 14:15:02 [I] [root.go:200] frps uses config file: /etc/frps/frps.ini 2021/06/10 14:15:02 [I] [service.go:192] frps tcp listen on [::]:7000 2021/06/10 14:15:02 [I] [service.go:250] https service listen on [::]:443 2021/06/10 14:15:02 [I] [root.go:209] frps started successfully 2021/06/10 14:15:03 [I] [service.go:449] [0aa589a9742caf7a] client login info: ip [[2400:2411:1c0:7700:fab1:56ff:fed4:d237]:35502] version [0.36.2] hostname [] os [linux] arch [amd64] 2021/06/10 14:15:03 [I] [https.go:51] [0aa589a9742caf7a] [skyline_https] https proxy listen for host [a.my.club] 2021/06/10 14:15:03 [I] [https.go:51] [0aa589a9742caf7a] [skyline_https] https proxy listen for host [b.my.club] 2021/06/10 14:15:03 [I] [https.go:51] [0aa589a9742caf7a] [skyline_https] https proxy listen for host [c.my.club] 2021/06/10 14:15:03 [I] [control.go:446] [0aa589a9742caf7a] new proxy [skyline_https] success 2021/06/10 14:15:03 [W] [control.go:442] [0aa589a9742caf7a] new proxy [sstcp] error: port unavailable 2021/06/10 14:15:16 [I] [proxy.go:162] [0aa589a9742caf7a] [skyline_https] get a user connection [162.158.119.192:60736] **frpc 设置** > [common] server_addr = gateway.my.cf server_port = 7000 token = **** [skyline_https] type = https local_port = 443 custom_domains = a.my.club,b.my.club,c.my.club [sstcp] type = tcp remote_port = 80 local_ip = 10.16.2.1 local_port = 8010 **客户端端口** > netstat -nat 激活Internet连接 (服务器和已建立连接的) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:1431 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:1433 0.0.0.0:* LISTEN tcp 0 0 127.0.0.1:1434 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:8200 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN tcp6 0 0 :::8080 :::* LISTEN tcp6 0 0 :::80 :::* LISTEN tcp6 0 0 :::8081 :::* LISTEN tcp6 0 0 :::8082 :::* LISTEN tcp6 0 0 :::22 :::* LISTEN tcp6 0 0 ::1:1431 :::* LISTEN tcp6 0 0 :::1433 :::* LISTEN tcp6 0 0 ::1:1434 :::* LISTEN tcp6 0 0 :::443 :::* LISTEN tcp6 0 0 :::445 :::* LISTEN tcp6 0 0 :::8000 :::* LISTEN tcp6 0 0 :::9090 :::* LISTEN tcp6 0 0 :::5000 :::* LISTEN tcp6 0 0 :::9000 :::* LISTEN tcp6 0 0 :::8010 :::* LISTEN tcp6 0 0 :::3306 :::* LISTEN tcp6 0 0 :::139 :::* LISTEN tcp6 0 0 :::111 :::* LISTEN **frpc log** > 2021/06/10 22:15:33 [I] [service.go:304] [0aa589a9742caf7a] login to server success, get run id [0aa589a9742caf7a], server udp port [0] 2021/06/10 22:15:33 [I] [proxy_manager.go:144] [0aa589a9742caf7a] proxy added: [skyline_https sstcp] 2021/06/10 22:15:33 [I] [control.go:180] [0aa589a9742caf7a] [skyline_https] start proxy success 2021/06/10 22:15:33 [W] [control.go:178] [0aa589a9742caf7a] [sstcp] start error: port unavailable
Author
Owner

@github-actions[bot] commented on GitHub (Jul 26, 2021):

Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.

<!-- gh-comment-id:886287110 --> @github-actions[bot] commented on GitHub (Jul 26, 2021): Issues go stale after 45d of inactivity. Stale issues rot after an additional 10d of inactivity and eventually close.
Author
Owner

@smdhz commented on GitHub (Aug 2, 2021):

上记本人提交的问题,回滚到0.36.1后解决。
docker大法真是好。

<!-- gh-comment-id:890780074 --> @smdhz commented on GitHub (Aug 2, 2021): 上记本人提交的问题,回滚到0.36.1后解决。 docker大法真是好。
Author
Owner

@zhaoker commented on GitHub (Aug 26, 2021):

这个问题我也遇到了,折磨了我好几天,我换了ubuntu centos 各种配置参数都不行,原因就是我是ipv6环境········肯定跟ipv6有关

<!-- gh-comment-id:906051603 --> @zhaoker commented on GitHub (Aug 26, 2021): 这个问题我也遇到了,折磨了我好几天,我换了ubuntu centos 各种配置参数都不行,原因就是我是ipv6环境········肯定跟ipv6有关
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2021):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:927203919 --> @github-actions[bot] commented on GitHub (Sep 26, 2021): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@raisin8010 commented on GitHub (Sep 30, 2021):

我好像也遇到过,后来不知道怎么弄解决的

<!-- gh-comment-id:931310345 --> @raisin8010 commented on GitHub (Sep 30, 2021): 我好像也遇到过,后来不知道怎么弄解决的
Author
Owner

@github-actions[bot] commented on GitHub (Nov 1, 2021):

Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.

<!-- gh-comment-id:955825214 --> @github-actions[bot] commented on GitHub (Nov 1, 2021): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#1862
No description provided.