[GH-ISSUE #1348] failed to send message to work connection from pool, udp proxy Error #1070

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

Originally created by @chunfengyao on GitHub (Aug 1, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1348

What version of frp are you using (./frpc -v or ./frps -v)?

root@OpenWrt:/app/frp# ./frps -v
0.27.1

frps file: frp_0.27.1_linux_mipsle

mm@vubuntu:/app/frp$ ./frpc -v
0.27.1

frpc file: frp_0.27.1_linux_amd64

What operating system and processor architecture are you using (go env)?
openwrt-18.06.4

Configures you used:
frps

[common]
bind_port = 7000
bind_addr = 0.0.0.0
bind_udp_port = 7001

dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = user
dashboard_pwd = pass

log_file = /tmp/frps.log
log_level = warn
log_max_days = 5

token = tokensword

frpc

[common]
server_addr = *********
server_port = 7000
token = tokensword

admin_addr = 0.0.0.0
admin_port = 7400
admin_user = user
admin_pwd = pass

heartbeat_interval = 30

# trace, debug, info, warn, error
log_file = /tmp/frpc.log
log_level = trace
log_max_days = 3

[afp_avahi_daemon_NT_Vubuntu_5353_udp]
type = udp
local_ip = 127.0.0.1
local_port = 5353
remote_port = 5353

Steps to reproduce the issue:
1.frps部署在有电信公网IP的Openwrt路由上。
2.client端(Ubuntu 5.0.0-23-generic)添加udp的代理。
3.在frps的日志里有如下的udp代理异常信息。(可能不是同一时刻的访问,但是问题相似。无法通过5353的udp端口请求mDNS)

2019/07/31 01:32:18 [W] [udp.go:99] [6beffb33eacf9e65] [afp_avahi_daemon_NT_Vubuntu_5353_udp] read from workConn for udp error: EOF
2019/07/31 01:32:18 [W] [proxy.go:110] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to send message to work connection from pool: stream closed, times: 0
2019/07/31 01:32:18 [W] [proxy.go:110] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to send message to work connection from pool: stream closed, times: 1
2019/07/31 01:32:18 [W] [control.go:278] [6beffb33eacf9e65] write message to control connection error: stream closed
2019/07/31 01:32:18 [W] [udp.go:99] [6beffb33eacf9e65] [afp_avahi_daemon_NT_Vubuntu_5353_udp] read from workConn for udp error: EOF
2019/07/31 01:32:18 [W] [proxy.go:79] [6beffb33eacf9e65] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to get work connection: control is closed
2019/07/31 04:36:10 [W] [udp.go:99] [ab066cc9035f4847] [afp_avahi_daemon_NT_Vubuntu_5353_udp] read from workConn for udp error: EOF
2019/07/31 04:36:10 [W] [proxy.go:110] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to send message to work connection from pool: stream closed, times: 0
2019/07/31 04:36:10 [W] [control.go:278] [ab066cc9035f4847] write message to control connection error: stream closed
2019/07/31 04:36:10 [W] [control.go:231] [ab066cc9035f4847] no work connections avaiable, control is closed
2019/07/31 04:36:10 [W] [proxy.go:79] [ab066cc9035f4847] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to get work connection: control is closed

4.对应的frpc的日志里有如下信息。

2019/07/31 12:51:39 [D] [proxy_wrapper.go:225] [afp_avahi_daemon_NT_Vubuntu_5353_udp] start a new work connection, localAddr: 10.0.0.85:60444 remoteAddr: 121.232.200.121:7000
2019/07/31 12:51:39 [I] [proxy.go:420] [afp_avahi_daemon_NT_Vubuntu_5353_udp] incoming a new work connection for udp proxy, 121.232.200.121:7000
2019/07/31 12:52:13 [D] [control.go:260] send heartbeat to server
2019/07/31 12:52:13 [D] [control.go:281] receive heartbeat from server
2019/07/31 12:52:13 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn
2019/07/31 12:52:43 [D] [control.go:260] send heartbeat to server
2019/07/31 12:52:43 [D] [control.go:281] receive heartbeat from server
2019/07/31 12:52:43 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn
2019/07/31 12:53:13 [D] [control.go:260] send heartbeat to server
2019/07/31 12:53:13 [D] [control.go:281] receive heartbeat from server
2019/07/31 12:53:13 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn
2019/07/31 12:53:43 [D] [control.go:260] send heartbeat to server
2019/07/31 12:53:43 [D] [control.go:281] receive heartbeat from server
2019/07/31 12:53:43 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn
2019/07/31 12:54:13 [D] [control.go:260] send heartbeat to server
2019/07/31 12:54:13 [D] [control.go:281] receive heartbeat from server

Describe the results you received:
无法通过5353的udp端口请求frpc所在主机的mDNS服务。(端口应该未被运营商屏蔽)(本地的mDNS服务应该是配置好了的)

mm@vubuntu:/app/frp$ sudo nmap -sU -Pn -p 5353 *********
[sudo] mm 的密码:
Starting Nmap 7.70 ( https://nmap.org ) at 2019-08-01 10:41 CST
Nmap scan report for ********* (*******)
Host is up (0.029s latency).
Other addresses for ********** (not scanned): **********

PORT     STATE SERVICE
5353/udp open  zeroconf

Nmap done: 1 IP address (1 host up) scanned in 0.71 seconds

Describe the results you expected:
需要通过5353访问内网的avahi服务。来进行主机发现。

Additional information you deem important (e.g. issue happens only occasionally):
不只是这个5353的端口有这个问题,之前进行nfs的udp端口转发的时候,nfs的四个udp端口也都有这个现象(当时是0.27.0版本的frps和frpc)。

Can you point out what caused this issue (optional)
go脚本在处理UDP包的时候出问题了?或者UDP的包被运营商改了?

Originally created by @chunfengyao on GitHub (Aug 1, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1348 **What version of frp are you using (./frpc -v or ./frps -v)?** ``` root@OpenWrt:/app/frp# ./frps -v 0.27.1 ``` ***frps file: frp_0.27.1_linux_mipsle*** ``` mm@vubuntu:/app/frp$ ./frpc -v 0.27.1 ``` ***frpc file: frp_0.27.1_linux_amd64*** **What operating system and processor architecture are you using (`go env`)?** openwrt-18.06.4 **Configures you used:** ***frps*** ``` [common] bind_port = 7000 bind_addr = 0.0.0.0 bind_udp_port = 7001 dashboard_addr = 0.0.0.0 dashboard_port = 7500 dashboard_user = user dashboard_pwd = pass log_file = /tmp/frps.log log_level = warn log_max_days = 5 token = tokensword ``` ***frpc*** ``` [common] server_addr = ********* server_port = 7000 token = tokensword admin_addr = 0.0.0.0 admin_port = 7400 admin_user = user admin_pwd = pass heartbeat_interval = 30 # trace, debug, info, warn, error log_file = /tmp/frpc.log log_level = trace log_max_days = 3 [afp_avahi_daemon_NT_Vubuntu_5353_udp] type = udp local_ip = 127.0.0.1 local_port = 5353 remote_port = 5353 ``` **Steps to reproduce the issue:** 1.frps部署在有电信公网IP的Openwrt路由上。 2.client端(Ubuntu 5.0.0-23-generic)添加udp的代理。 3.在frps的日志里有如下的udp代理异常信息。(可能不是同一时刻的访问,但是问题相似。无法通过5353的udp端口请求mDNS) ``` 2019/07/31 01:32:18 [W] [udp.go:99] [6beffb33eacf9e65] [afp_avahi_daemon_NT_Vubuntu_5353_udp] read from workConn for udp error: EOF 2019/07/31 01:32:18 [W] [proxy.go:110] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to send message to work connection from pool: stream closed, times: 0 2019/07/31 01:32:18 [W] [proxy.go:110] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to send message to work connection from pool: stream closed, times: 1 2019/07/31 01:32:18 [W] [control.go:278] [6beffb33eacf9e65] write message to control connection error: stream closed 2019/07/31 01:32:18 [W] [udp.go:99] [6beffb33eacf9e65] [afp_avahi_daemon_NT_Vubuntu_5353_udp] read from workConn for udp error: EOF 2019/07/31 01:32:18 [W] [proxy.go:79] [6beffb33eacf9e65] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to get work connection: control is closed 2019/07/31 04:36:10 [W] [udp.go:99] [ab066cc9035f4847] [afp_avahi_daemon_NT_Vubuntu_5353_udp] read from workConn for udp error: EOF 2019/07/31 04:36:10 [W] [proxy.go:110] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to send message to work connection from pool: stream closed, times: 0 2019/07/31 04:36:10 [W] [control.go:278] [ab066cc9035f4847] write message to control connection error: stream closed 2019/07/31 04:36:10 [W] [control.go:231] [ab066cc9035f4847] no work connections avaiable, control is closed 2019/07/31 04:36:10 [W] [proxy.go:79] [ab066cc9035f4847] [afp_avahi_daemon_NT_Vubuntu_5353_udp] failed to get work connection: control is closed ``` 4.对应的frpc的日志里有如下信息。 ``` 2019/07/31 12:51:39 [D] [proxy_wrapper.go:225] [afp_avahi_daemon_NT_Vubuntu_5353_udp] start a new work connection, localAddr: 10.0.0.85:60444 remoteAddr: 121.232.200.121:7000 2019/07/31 12:51:39 [I] [proxy.go:420] [afp_avahi_daemon_NT_Vubuntu_5353_udp] incoming a new work connection for udp proxy, 121.232.200.121:7000 2019/07/31 12:52:13 [D] [control.go:260] send heartbeat to server 2019/07/31 12:52:13 [D] [control.go:281] receive heartbeat from server 2019/07/31 12:52:13 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn 2019/07/31 12:52:43 [D] [control.go:260] send heartbeat to server 2019/07/31 12:52:43 [D] [control.go:281] receive heartbeat from server 2019/07/31 12:52:43 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn 2019/07/31 12:53:13 [D] [control.go:260] send heartbeat to server 2019/07/31 12:53:13 [D] [control.go:281] receive heartbeat from server 2019/07/31 12:53:13 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn 2019/07/31 12:53:43 [D] [control.go:260] send heartbeat to server 2019/07/31 12:53:43 [D] [control.go:281] receive heartbeat from server 2019/07/31 12:53:43 [T] [proxy.go:457] [afp_avahi_daemon_NT_Vubuntu_5353_udp] send ping message to udp workConn 2019/07/31 12:54:13 [D] [control.go:260] send heartbeat to server 2019/07/31 12:54:13 [D] [control.go:281] receive heartbeat from server ``` **Describe the results you received:** 无法通过5353的udp端口请求frpc所在主机的mDNS服务。(端口应该未被运营商屏蔽)(本地的mDNS服务应该是配置好了的) ``` mm@vubuntu:/app/frp$ sudo nmap -sU -Pn -p 5353 ********* [sudo] mm 的密码: Starting Nmap 7.70 ( https://nmap.org ) at 2019-08-01 10:41 CST Nmap scan report for ********* (*******) Host is up (0.029s latency). Other addresses for ********** (not scanned): ********** PORT STATE SERVICE 5353/udp open zeroconf Nmap done: 1 IP address (1 host up) scanned in 0.71 seconds ``` **Describe the results you expected:** 需要通过5353访问内网的avahi服务。来进行主机发现。 **Additional information you deem important (e.g. issue happens only occasionally):** 不只是这个5353的端口有这个问题,之前进行nfs的udp端口转发的时候,nfs的四个udp端口也都有这个现象(当时是0.27.0版本的frps和frpc)。 **Can you point out what caused this issue (optional)** go脚本在处理UDP包的时候出问题了?或者UDP的包被运营商改了?
gitea-mirror 2026-05-05 12:41:14 -06:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@fatedier commented on GitHub (Aug 1, 2019):

frps 和 frpc 的日志时间对不上,frps 的日志显示当时网络环境有异常,如果可以的话,可以把当时完整的日志通过邮箱发给我。

<!-- gh-comment-id:517138309 --> @fatedier commented on GitHub (Aug 1, 2019): frps 和 frpc 的日志时间对不上,frps 的日志显示当时网络环境有异常,如果可以的话,可以把当时完整的日志通过邮箱发给我。
Author
Owner

@chunfengyao commented on GitHub (Aug 7, 2019):

单独使用c写的udp程序进行socket的消息发送好像没有问题。另外,也参考作者所说开启了tls。目前较为稳定。初步估计可能是对应的被代理的服务或者网络抖动导致的断线。

<!-- gh-comment-id:518914825 --> @chunfengyao commented on GitHub (Aug 7, 2019): 单独使用c写的udp程序进行socket的消息发送好像没有问题。另外,也参考作者所说开启了tls。目前较为稳定。初步估计可能是对应的被代理的服务或者网络抖动导致的断线。
Author
Owner

@mengpengfei commented on GitHub (Oct 17, 2020):

单独使用c写的udp程序进行socket的消息发送好像没有问题。另外,也参考作者所说开启了tls。目前较为稳定。初步估计可能是对应的被代理的服务或者网络抖动导致的断线。
我也遇到同样问题,用的跟你是同样版本,你解决了吗

<!-- gh-comment-id:710725778 --> @mengpengfei commented on GitHub (Oct 17, 2020): > 单独使用c写的udp程序进行socket的消息发送好像没有问题。另外,也参考作者所说开启了tls。目前较为稳定。初步估计可能是对应的被代理的服务或者网络抖动导致的断线。 我也遇到同样问题,用的跟你是同样版本,你解决了吗
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#1070
No description provided.