[GH-ISSUE #3096] Client stucks at "try to reconnect to server" #2479

Closed
opened 2026-05-05 13:35:40 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @liyafe1997 on GitHub (Sep 9, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3096

Bug Description

2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ssh] start proxy success
2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ss] start proxy success
2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [webui] start proxy success
2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF
2022/09/09 18:40:29 [I] [control.go:316] [0720c64330cda156] control writer is closing
2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF
2022/09/09 18:40:29 [I] [visitor_manager.go:60] [0720c64330cda156] gracefully shutdown visitor manager
2022/09/09 18:40:29 [I] [service.go:201] [0720c64330cda156] try to reconnect to server...
2022/09/09 18:40:39 [W] [service.go:204] [0720c64330cda156] reconnect to server error: dial tcp xx.xx.xx.xx(Server IP Address):443: i/o timeout, wait 1s for another retry
2022/09/09 18:40:43 [I] [service.go:201] [0720c64330cda156] try to reconnect to server...
2022/09/09 18:40:59 [W] [service.go:204] [0720c64330cda156] reconnect to server error: i/o deadline reached, wait 2s for another retry
2022/09/09 18:41:01 [I] [service.go:201] [0720c64330cda156] try to reconnect to server...

$ date
Fri Sep  9 20:20:59 CST 2022

You can see here it stucks for almost 2 hours, it should be continues trying if some network problem happened. Even at this moment the network recovered, it stopped trying.

frpc Version

0.44.0

frps Version

0.44.0

System Architecture

client:linux/armv7, server:windows/amd64

Configurations

server:

[common]
bind_addr = 0.0.0.0
bind_port = 443
authentication_method = token
token = xxxxxxxxxxxxxxxxxxx
authenticate_heartbeats = true
authenticate_new_work_conns = true
tcp_mux_keepalive_interval = 60
tcp_keepalive = 7200

client:

[common]
server_addr = xx.xx.xx.xx
server_port = 443
token = xxxxxxxxxxxxxxxxxxx
protocol = websocket
authenticate_heartbeats = true
authenticate_new_work_conns = true
log_file = /tmp/frpc.log
log_level = info
log_max_days = 7
tcp_mux_keepalive_interval = 60


[ss]
type = tcp
local_ip = 127.0.0.1
local_port = xxxxx
remote_port = xxxxx
use_compression = true
use_encryption = true

[webui]
type = tcp
local_ip = 127.0.0.1
local_port = xxxxx
remote_port = xxxxx
use_compression = true
use_encryption = true

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = xxxxx
remote_port = xxxxx
use_compression = true
use_encryption = true

Logs

2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ssh] start proxy success
2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ss] start proxy success
2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [webui] start proxy success
2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF
2022/09/09 18:40:29 [I] [control.go:316] [0720c64330cda156] control writer is closing
2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF
2022/09/09 18:40:29 [I] [visitor_manager.go:60] [0720c64330cda156] gracefully shutdown visitor manager
2022/09/09 18:40:29 [I] [service.go:201] [0720c64330cda156] try to reconnect to server...
2022/09/09 18:40:39 [W] [service.go:204] [0720c64330cda156] reconnect to server error: dial tcp xx.xx.xx.xx(Server IP Address):443: i/o timeout, wait 1s for another retry
2022/09/09 18:40:43 [I] [service.go:201] [0720c64330cda156] try to reconnect to server...
2022/09/09 18:40:59 [W] [service.go:204] [0720c64330cda156] reconnect to server error: i/o deadline reached, wait 2s for another retry
2022/09/09 18:41:01 [I] [service.go:201] [0720c64330cda156] try to reconnect to server...

Steps to reproduce

  1. Run server and client for a long time...
  2. Maybe some temporary network unstable problem happened for a short time
  3. And this happened (frpc stopped trying reconnect)
    ...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @liyafe1997 on GitHub (Sep 9, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3096 ### Bug Description ``` 2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ssh] start proxy success 2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ss] start proxy success 2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [webui] start proxy success 2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF 2022/09/09 18:40:29 [I] [control.go:316] [0720c64330cda156] control writer is closing 2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF 2022/09/09 18:40:29 [I] [visitor_manager.go:60] [0720c64330cda156] gracefully shutdown visitor manager 2022/09/09 18:40:29 [I] [service.go:201] [0720c64330cda156] try to reconnect to server... 2022/09/09 18:40:39 [W] [service.go:204] [0720c64330cda156] reconnect to server error: dial tcp xx.xx.xx.xx(Server IP Address):443: i/o timeout, wait 1s for another retry 2022/09/09 18:40:43 [I] [service.go:201] [0720c64330cda156] try to reconnect to server... 2022/09/09 18:40:59 [W] [service.go:204] [0720c64330cda156] reconnect to server error: i/o deadline reached, wait 2s for another retry 2022/09/09 18:41:01 [I] [service.go:201] [0720c64330cda156] try to reconnect to server... $ date Fri Sep 9 20:20:59 CST 2022 ``` You can see here it stucks for almost 2 hours, it should be continues trying if some network problem happened. Even at this moment the network recovered, it stopped trying. ### frpc Version 0.44.0 ### frps Version 0.44.0 ### System Architecture client:linux/armv7, server:windows/amd64 ### Configurations server: ``` [common] bind_addr = 0.0.0.0 bind_port = 443 authentication_method = token token = xxxxxxxxxxxxxxxxxxx authenticate_heartbeats = true authenticate_new_work_conns = true tcp_mux_keepalive_interval = 60 tcp_keepalive = 7200 ``` client: ``` [common] server_addr = xx.xx.xx.xx server_port = 443 token = xxxxxxxxxxxxxxxxxxx protocol = websocket authenticate_heartbeats = true authenticate_new_work_conns = true log_file = /tmp/frpc.log log_level = info log_max_days = 7 tcp_mux_keepalive_interval = 60 [ss] type = tcp local_ip = 127.0.0.1 local_port = xxxxx remote_port = xxxxx use_compression = true use_encryption = true [webui] type = tcp local_ip = 127.0.0.1 local_port = xxxxx remote_port = xxxxx use_compression = true use_encryption = true [ssh] type = tcp local_ip = 127.0.0.1 local_port = xxxxx remote_port = xxxxx use_compression = true use_encryption = true ``` ### Logs ``` 2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ssh] start proxy success 2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [ss] start proxy success 2022/09/09 18:38:22 [I] [control.go:181] [0720c64330cda156] [webui] start proxy success 2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF 2022/09/09 18:40:29 [I] [control.go:316] [0720c64330cda156] control writer is closing 2022/09/09 18:40:29 [E] [control.go:159] [0720c64330cda156] work connection closed before response StartWorkConn message: EOF 2022/09/09 18:40:29 [I] [visitor_manager.go:60] [0720c64330cda156] gracefully shutdown visitor manager 2022/09/09 18:40:29 [I] [service.go:201] [0720c64330cda156] try to reconnect to server... 2022/09/09 18:40:39 [W] [service.go:204] [0720c64330cda156] reconnect to server error: dial tcp xx.xx.xx.xx(Server IP Address):443: i/o timeout, wait 1s for another retry 2022/09/09 18:40:43 [I] [service.go:201] [0720c64330cda156] try to reconnect to server... 2022/09/09 18:40:59 [W] [service.go:204] [0720c64330cda156] reconnect to server error: i/o deadline reached, wait 2s for another retry 2022/09/09 18:41:01 [I] [service.go:201] [0720c64330cda156] try to reconnect to server... ``` ### Steps to reproduce 1. Run server and client for a long time... 2. Maybe some temporary network unstable problem happened for a short time 3. And this happened (frpc stopped trying reconnect) ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:35:40 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 10, 2022):

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

<!-- gh-comment-id:1272669385 --> @github-actions[bot] commented on GitHub (Oct 10, 2022): 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#2479
No description provided.