[GH-ISSUE #2973] frpc断网之后不会自动与frps重连 #2372

Closed
opened 2026-05-05 13:31:34 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @linengjie on GitHub (Jun 8, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2973

Bug Description

windows cmd启动frpc,断开外网几分钟,然后在恢复外网,frpc不会自动重连frps,心跳的debug日志也会停止打印。
在cmd中按下crtl+c,日志开始打印并且开始尝试重连

frpc Version

0.42.0

frps Version

0.42.0

System Architecture

frps: linux/amd64 frpc: windows/amd64

Configurations

frps.ini
[common]
bind_port = 20001
token = ******
dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin

frpc.ini
[common]
token = ******
server_addr = ******
server_port = 20001
admin_addr = 0.0.0.0
admin_port = 7400
admin_user = admin
admin_pwd = admin
log_level=debug

[bbb01]
type = tcp
local_ip = 172.28.150.15
local_port = 12581
remote_port = 32345

Logs

2022/06/08 14:38:27 [I] [service.go:349] [68845021ccbd266f] login to server success, get run id [68845021ccbd266f], server udp port [0]
2022/06/08 14:38:27 [I] [proxy_manager.go:144] [68845021ccbd266f] proxy added: [bbb03]
2022/06/08 14:38:27 [I] [service.go:158] admin server listen on 0.0.0.0:7400
2022/06/08 14:38:27 [I] [control.go:181] [68845021ccbd266f] [bbb03] start proxy success
2022/06/08 14:38:57 [D] [control.go:360] [68845021ccbd266f] send heartbeat to server
2022/06/08 14:38:57 [D] [control.go:391] [68845021ccbd266f] receive heartbeat from server
2022/06/08 14:39:27 [D] [control.go:360] [68845021ccbd266f] send heartbeat to server
2022/06/08 14:39:37 [E] [control.go:159] [68845021ccbd266f] work connection closed before response StartWorkConn message: EOF
2022/06/08 14:39:37 [D] [control.go:292] [68845021ccbd266f] read from control connection EOF
2022/06/08 14:44:31 [D] [control.go:360] [68845021ccbd266f] send heartbeat to server
2022/06/08 14:44:31 [W] [control.go:321] [68845021ccbd266f] write message to control connection error: stream closed
2022/06/08 14:44:31 [I] [visitor_manager.go:60] [68845021ccbd266f] gracefully shutdown visitor manager
2022/06/08 14:44:31 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server...
2022/06/08 14:44:31 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 1s for another retry
2022/06/08 14:44:32 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server...
2022/06/08 14:44:32 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 2s for another retry
2022/06/08 14:44:34 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server...
2022/06/08 14:44:34 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 4s for another retry
2022/06/08 14:44:39 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server...
2022/06/08 14:44:39 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 8s for another retry
2022/06/08 14:44:47 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server...
2022/06/08 14:46:24 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 16s for another retry
2022/06/08 14:46:40 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server...
2022/06/08 14:55:23 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 20s for another retry

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @linengjie on GitHub (Jun 8, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2973 ### Bug Description windows cmd启动frpc,断开外网几分钟,然后在恢复外网,frpc不会自动重连frps,心跳的debug日志也会停止打印。 在cmd中按下crtl+c,日志开始打印并且开始尝试重连 ### frpc Version 0.42.0 ### frps Version 0.42.0 ### System Architecture frps: linux/amd64 frpc: windows/amd64 ### Configurations frps.ini [common] bind_port = 20001 token = ****** dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin frpc.ini [common] token = ****** server_addr = ****** server_port = 20001 admin_addr = 0.0.0.0 admin_port = 7400 admin_user = admin admin_pwd = admin log_level=debug [bbb01] type = tcp local_ip = 172.28.150.15 local_port = 12581 remote_port = 32345 ### Logs 2022/06/08 14:38:27 [I] [service.go:349] [68845021ccbd266f] login to server success, get run id [68845021ccbd266f], server udp port [0] 2022/06/08 14:38:27 [I] [proxy_manager.go:144] [68845021ccbd266f] proxy added: [bbb03] 2022/06/08 14:38:27 [I] [service.go:158] admin server listen on 0.0.0.0:7400 2022/06/08 14:38:27 [I] [control.go:181] [68845021ccbd266f] [bbb03] start proxy success 2022/06/08 14:38:57 [D] [control.go:360] [68845021ccbd266f] send heartbeat to server 2022/06/08 14:38:57 [D] [control.go:391] [68845021ccbd266f] receive heartbeat from server 2022/06/08 14:39:27 [D] [control.go:360] [68845021ccbd266f] send heartbeat to server 2022/06/08 14:39:37 [E] [control.go:159] [68845021ccbd266f] work connection closed before response StartWorkConn message: EOF 2022/06/08 14:39:37 [D] [control.go:292] [68845021ccbd266f] read from control connection EOF 2022/06/08 14:44:31 [D] [control.go:360] [68845021ccbd266f] send heartbeat to server 2022/06/08 14:44:31 [W] [control.go:321] [68845021ccbd266f] write message to control connection error: stream closed 2022/06/08 14:44:31 [I] [visitor_manager.go:60] [68845021ccbd266f] gracefully shutdown visitor manager 2022/06/08 14:44:31 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server... 2022/06/08 14:44:31 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 1s for another retry 2022/06/08 14:44:32 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server... 2022/06/08 14:44:32 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 2s for another retry 2022/06/08 14:44:34 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server... 2022/06/08 14:44:34 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 4s for another retry 2022/06/08 14:44:39 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server... 2022/06/08 14:44:39 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 8s for another retry 2022/06/08 14:44:47 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server... 2022/06/08 14:46:24 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 16s for another retry 2022/06/08 14:46:40 [I] [service.go:201] [68845021ccbd266f] try to reconnect to server... 2022/06/08 14:55:23 [W] [service.go:204] [68845021ccbd266f] reconnect to server error: dial tcp 172.18.40.173:20001: connectex: A socket operation was attempted to an unreachable host., wait 20s for another retry ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:31:34 -06:00
Author
Owner

@tlsalex commented on GitHub (Jul 6, 2022):

我也遇到了,用systemd 做开机启动,启动后可能网络还没连通,它就停止了,并没有在一段时间后重试。

<!-- gh-comment-id:1175783665 --> @tlsalex commented on GitHub (Jul 6, 2022): 我也遇到了,用systemd 做开机启动,启动后可能网络还没连通,它就停止了,并没有在一段时间后重试。
Author
Owner

@github-actions[bot] commented on GitHub (Aug 6, 2022):

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

<!-- gh-comment-id:1207105843 --> @github-actions[bot] commented on GitHub (Aug 6, 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#2372
No description provided.