[GH-ISSUE #3364] 成功建立连接后每隔一段时间断开报 i/o deadline reached #2691

Closed
opened 2026-05-05 13:44:04 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @leitingsd on GitHub (Mar 16, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3364

Bug Description

frps位于香港阿里云公网环境,frpc位于境内电信内网环境。每次启动frps/c并成功建立连接10-30分钟后就以每5-10分钟一次的间隔断开连接并报告 i/o deadline reached错误,frps的dashboard显示连接离线。每次错误持续约两分钟后重新连接成功,10-30分钟后以此反复。
查阅Issues与CSDN的相同问题提出的解决方案,包括tls加密、改用TCP协议等方式,均无法解决该问题。
运行frpc的服务器存在两套frpc,一个指向位于香港的frps,即存在本问题的frp;另一个指向位于境内公网服务器的另一frps,从未出现过类似问题,两套frps均使用相同版本。

frpc Version

0.46.1

frps Version

0.46.1

System Architecture

frps: linux/amd64,frpc: windows/amd64

Configurations

frps:
[common]
bind_addr = [域名]
bind_port = [端口]
tls_only = true

token = [token]

authentication_timeout = 0

dashboard_port = [port]
dashboard_user = [user]
dashboard_pwd = [pwd]

tcp_keepalive = -1

log_file = ./frps.log

log_level = info
#log max days
log_max_days = 7

frpc:
[common]
server_addr = [域名]
server_port = [端口]

tls_enable = true

token = [token]

protocol = tcp

dial_server_keepalive = -1

[survival]
type = tcp
local_ip = [ip]
local_port = [port]
remote_port = [port]

Logs

在每次重启frps与frpc后,都能成功建立连接:
2023/03/16 01:48:43 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0]
2023/03/16 01:48:43 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival]
2023/03/16 01:48:43 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success
过一段时间后,便开始反复出现该问题:
2023/03/16 02:13:32 [I] [control.go:242] [7671129ad72b2d73] control writer is closing
2023/03/16 02:13:32 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager
2023/03/16 02:13:32 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:13:42 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry
2023/03/16 02:13:43 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:13:43 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0]
2023/03/16 02:13:43 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival]
2023/03/16 02:13:43 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success
2023/03/16 02:22:54 [I] [control.go:242] [7671129ad72b2d73] control writer is closing
2023/03/16 02:22:54 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager
2023/03/16 02:22:54 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:23:04 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry
2023/03/16 02:23:05 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:23:15 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 2s for another retry
2023/03/16 02:23:17 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:23:27 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 4s for another retry
2023/03/16 02:23:31 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:23:42 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 8s for another retry
2023/03/16 02:23:50 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:24:00 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 16s for another retry
2023/03/16 02:24:16 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:24:26 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 20s for another retry
2023/03/16 02:24:45 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:24:50 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0]
2023/03/16 02:24:50 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival]
2023/03/16 02:24:50 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success
2023/03/16 02:32:39 [I] [control.go:242] [7671129ad72b2d73] control writer is closing
2023/03/16 02:32:39 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager
2023/03/16 02:32:39 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:32:49 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0]
2023/03/16 02:32:49 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival]
2023/03/16 02:33:08 [I] [control.go:242] [7671129ad72b2d73] control writer is closing
2023/03/16 02:33:08 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager
2023/03/16 02:33:09 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:33:19 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry
2023/03/16 02:33:20 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:33:30 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 2s for another retry
2023/03/16 02:33:32 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:33:42 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 4s for another retry
2023/03/16 02:33:46 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:33:49 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0]
2023/03/16 02:33:49 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival]
2023/03/16 02:34:09 [I] [control.go:242] [7671129ad72b2d73] control writer is closing
2023/03/16 02:34:09 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager
2023/03/16 02:34:09 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:34:19 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry
2023/03/16 02:34:20 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:34:30 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 2s for another retry
2023/03/16 02:34:32 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:34:42 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0]
2023/03/16 02:34:42 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival]
2023/03/16 02:34:42 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success
2023/03/16 02:37:42 [I] [control.go:242] [7671129ad72b2d73] control writer is closing
2023/03/16 02:37:42 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager
2023/03/16 02:37:43 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server...
2023/03/16 02:37:53 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s 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 @leitingsd on GitHub (Mar 16, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3364 ### Bug Description frps位于香港阿里云公网环境,frpc位于境内电信内网环境。每次启动frps/c并成功建立连接10-30分钟后就以每5-10分钟一次的间隔断开连接并报告 i/o deadline reached错误,frps的dashboard显示连接离线。每次错误持续约两分钟后重新连接成功,10-30分钟后以此反复。 查阅Issues与CSDN的相同问题提出的解决方案,包括tls加密、改用TCP协议等方式,均无法解决该问题。 运行frpc的服务器存在两套frpc,一个指向位于香港的frps,即存在本问题的frp;另一个指向位于境内公网服务器的另一frps,从未出现过类似问题,两套frps均使用相同版本。 ### frpc Version 0.46.1 ### frps Version 0.46.1 ### System Architecture frps: linux/amd64,frpc: windows/amd64 ### Configurations frps: [common] bind_addr = [域名] bind_port = [端口] tls_only = true token = [token] authentication_timeout = 0 dashboard_port = [port] dashboard_user = [user] dashboard_pwd = [pwd] tcp_keepalive = -1 log_file = ./frps.log log_level = info #log max days log_max_days = 7 frpc: [common] server_addr = [域名] server_port = [端口] tls_enable = true token = [token] protocol = tcp dial_server_keepalive = -1 [survival] type = tcp local_ip = [ip] local_port = [port] remote_port = [port] ### Logs 在每次重启frps与frpc后,都能成功建立连接: 2023/03/16 01:48:43 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0] 2023/03/16 01:48:43 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival] 2023/03/16 01:48:43 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success 过一段时间后,便开始反复出现该问题: 2023/03/16 02:13:32 [I] [control.go:242] [7671129ad72b2d73] control writer is closing 2023/03/16 02:13:32 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager 2023/03/16 02:13:32 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:13:42 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry 2023/03/16 02:13:43 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:13:43 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0] 2023/03/16 02:13:43 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival] 2023/03/16 02:13:43 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success 2023/03/16 02:22:54 [I] [control.go:242] [7671129ad72b2d73] control writer is closing 2023/03/16 02:22:54 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager 2023/03/16 02:22:54 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:23:04 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry 2023/03/16 02:23:05 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:23:15 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 2s for another retry 2023/03/16 02:23:17 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:23:27 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 4s for another retry 2023/03/16 02:23:31 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:23:42 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 8s for another retry 2023/03/16 02:23:50 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:24:00 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 16s for another retry 2023/03/16 02:24:16 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:24:26 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 20s for another retry 2023/03/16 02:24:45 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:24:50 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0] 2023/03/16 02:24:50 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival] 2023/03/16 02:24:50 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success 2023/03/16 02:32:39 [I] [control.go:242] [7671129ad72b2d73] control writer is closing 2023/03/16 02:32:39 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager 2023/03/16 02:32:39 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:32:49 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0] 2023/03/16 02:32:49 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival] 2023/03/16 02:33:08 [I] [control.go:242] [7671129ad72b2d73] control writer is closing 2023/03/16 02:33:08 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager 2023/03/16 02:33:09 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:33:19 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry 2023/03/16 02:33:20 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:33:30 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 2s for another retry 2023/03/16 02:33:32 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:33:42 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 4s for another retry 2023/03/16 02:33:46 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:33:49 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0] 2023/03/16 02:33:49 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival] 2023/03/16 02:34:09 [I] [control.go:242] [7671129ad72b2d73] control writer is closing 2023/03/16 02:34:09 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager 2023/03/16 02:34:09 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:34:19 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry 2023/03/16 02:34:20 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:34:30 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 2s for another retry 2023/03/16 02:34:32 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:34:42 [I] [service.go:298] [7671129ad72b2d73] login to server success, get run id [7671129ad72b2d73], server udp port [0] 2023/03/16 02:34:42 [I] [proxy_manager.go:142] [7671129ad72b2d73] proxy added: [survival] 2023/03/16 02:34:42 [I] [control.go:172] [7671129ad72b2d73] [survival] start proxy success 2023/03/16 02:37:42 [I] [control.go:242] [7671129ad72b2d73] control writer is closing 2023/03/16 02:37:42 [I] [visitor_manager.go:60] [7671129ad72b2d73] gracefully shutdown visitor manager 2023/03/16 02:37:43 [I] [service.go:210] [7671129ad72b2d73] try to reconnect to server... 2023/03/16 02:37:53 [W] [service.go:213] [7671129ad72b2d73] reconnect to server error: i/o deadline reached, wait 1s for another retry ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [x] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:44:04 -06:00
Author
Owner

@Becods commented on GitHub (Mar 16, 2023):

有没有一种可能是你被间歇性阻断了

<!-- gh-comment-id:1472226706 --> @Becods commented on GitHub (Mar 16, 2023): 有没有一种可能是你被间歇性阻断了
Author
Owner

@xqzr commented on GitHub (Mar 17, 2023):

QUIC

<!-- gh-comment-id:1474050307 --> @xqzr commented on GitHub (Mar 17, 2023): QUIC
Author
Owner

@leitingsd commented on GitHub (Mar 20, 2023):

有没有一种可能是你被间歇性阻断了

草 这有办法排查确认吗 以及如果确定间歇性阻断有没有方法绕过 穿的TCP流量给Minecraft用的(

<!-- gh-comment-id:1475529739 --> @leitingsd commented on GitHub (Mar 20, 2023): > 有没有一种可能是你被间歇性阻断了 草 这有办法排查确认吗 以及如果确定间歇性阻断有没有方法绕过 穿的TCP流量给Minecraft用的(
Author
Owner

@github-actions[bot] commented on GitHub (Apr 20, 2023):

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

<!-- gh-comment-id:1515549922 --> @github-actions[bot] commented on GitHub (Apr 20, 2023): 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#2691
No description provided.