fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.1k stars 13.21k forks source link

frps更新到0.36.2无法绑定端口 #2346

Closed hathlife closed 2 years ago

hathlife commented 3 years ago

[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:

blizard863 commented 3 years ago

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

hathlife commented 3 years ago

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

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

blizard863 commented 3 years ago

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

这个配置了么 ?

hathlife commented 3 years ago

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

这个配置了么 ?

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

fatedier commented 3 years ago

To verify that port is not bind by other processes.

tongyifan commented 3 years ago

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.

cl000282 commented 3 years ago

36.2 windows的有病毒哦

smdhz commented 3 years ago

同样的问题, 怀疑与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

github-actions[bot] commented 3 years ago

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

smdhz commented 3 years ago

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

zhaoker commented 3 years ago

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

github-actions[bot] commented 3 years ago

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

woshiniming007 commented 3 years ago

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

github-actions[bot] commented 2 years ago

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