[GH-ISSUE #3371] 使用过程中重复断联,连接保持时间不超过5分钟,断开后显示connection refused #2695

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

Originally created by @Lumtp on GitHub (Mar 26, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3371

Bug Description

1.通过ssh可以短暂连接,短暂连接后断联
2.断联后约20min通过ssh再次连接均显示ssh: connect to host xx.xxxx.xxx.xx port 6002: Connection refused

frpc Version

frp_0.41.0_linux_amd64

frps Version

frp_0.41.0_linux_amd64

System Architecture

linux/amd64 Ubuntu 20.04 LTS

Configurations

frpc:
[common]
server_addr = xx.xxxx.xxx.xx
server_port = 7000
tls_enable = true
log_file =./frpc.log
log_level = info [ssh2]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6002

frps:
bind_port = 7000 dashboard_port = 7500
dashboard_user = admin
dashboard_pwd = admin
enable_prometheus = true
tls_enable = true log_file = ./frps.log
log_level = info
max_ports_per_client = 50
max_pool_count = 50
~

Logs

frpc日志:

2023/03/26 20:48:47 [I] [control.go:289] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:48:47 [E] [control.go:158] [c95a8eac9e8b7538] work connection closed before response StartWorkConn message: EOF
2023/03/26 20:48:47 [I] [service.go:174] [c95a8eac9e8b7538] try to reconnect to server... 2023/03/26 20:48:47 [I] [visitor_manager.go:60] [c95a8eac9e8b7538] gracefully shutdown visitor manager 2023/03/26 20:50:58 [W] [service.go:177] [c95a8eac9e8b7538] reconnect to server error: dial tcp xx.xxxx.xxx.xx:7000: connect: connection timed out
2023/03/26 20:50:59 [I] [service.go:174] [c95a8eac9e8b7538] try to reconnect to server... 2023/03/26 20:53:09 [W] [service.go:177] [c95a8eac9e8b7538] reconnect to server error: dial tcp xx.xxxx.xxx.xx:7000: connect: connection timed out
2023/03/26 20:53:11 [I] [service.go:174] [c95a8eac9e8b7538] try to reconnect to server... 2023/03/26 20:53:42 [I] [service.go:301] [c95a8eac9e8b7538] login to server success, get run id [c95a8eac9e8b7538], server udp port [0]
2023/03/26 20:53:42 [I] [proxy_manager.go:144] [c95a8eac9e8b7538] proxy added: [ssh2] 2023/03/26 20:53:42 [I] [control.go:180] [c95a8eac9e8b7538] [ssh2] start proxy success 2023/03/26 20:54:52 [I] [control.go:289] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:54:52 [E] [control.go:158] [c95a8eac9e8b7538] work connection closed before response Start

frps日志:
2023/03/26 20:37:21 [I] [proxy.go:179] [c95a8eac9e8b7538] [ssh2] get a user connection [aaa.aa.aa.aaa:9195] 2023/03/26 20:47:39 [I] [proxy.go:179] [c95a8eac9e8b7538] [ssh2] get a user connection [aaa.aa.aa.aaa:6761] 2023/03/26 20:49:06 [I] [control.go:307] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:49:06 [I] [proxy.go:88] [c95a8eac9e8b7538] [ssh2] proxy closing 2023/03/26 20:49:06 [W] [proxy.go:176] [c95a8eac9e8b7538] [ssh2] listener is closed: accept tcp [::]:6002: use of closed network connection
2023/03/26 20:49:06 [I] [control.go:396] [c95a8eac9e8b7538] client exit success 2023/03/26 20:53:42 [I] [service.go:450] [c95a8eac9e8b7538] client login info: ip [cc.ccc.ccc.c:2549] version [0.38.0] hostname [] os [linux] arch [amd64] 2023/03/26 20:53:42 [I] [tcp.go:64] [c95a8eac9e8b7538] [ssh2] tcp proxy listen port [6002] 2023/03/26 20:53:42 [I] [control.go:465] [c95a8eac9e8b7538] new proxy [ssh2] success 2023/03/26 20:54:52 [I] [control.go:307] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:54:52 [I] [proxy.go:88] [c95a8eac9e8b7538] [ssh2] proxy closing 2023/03/26 20:54:52 [W] [proxy.go:176] [c95a8eac9e8b7538] [ssh2] listener is closed: accept tcp [::]:6002: use of closed network connection
2023/03/26 20:54:52 [I] [control.go:396] [c95a8eac9e8b7538]

Steps to reproduce

  1. 进行ssh连接,连接后很快连接中断
  2. 再次进行ssh连接到内网服务端显示ssh: connect to host xx.xxxx.xxx.xx port 6002: Connection refused

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @Lumtp on GitHub (Mar 26, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3371 ### Bug Description 1.通过ssh可以短暂连接,短暂连接后断联 2.断联后约20min通过ssh再次连接均显示ssh: connect to host xx.xxxx.xxx.xx port 6002: Connection refused ### frpc Version frp_0.41.0_linux_amd64 ### frps Version frp_0.41.0_linux_amd64 ### System Architecture linux/amd64 Ubuntu 20.04 LTS ### Configurations frpc: [common] server_addr = xx.xxxx.xxx.xx server_port = 7000 tls_enable = true log_file =./frpc.log log_level = info [ssh2] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6002 frps: bind_port = 7000 dashboard_port = 7500 dashboard_user = admin dashboard_pwd = admin enable_prometheus = true tls_enable = true log_file = ./frps.log log_level = info max_ports_per_client = 50 max_pool_count = 50 ~ ### Logs frpc日志: 2023/03/26 20:48:47 [I] [control.go:289] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:48:47 [E] [control.go:158] [c95a8eac9e8b7538] work connection closed before response StartWorkConn message: EOF 2023/03/26 20:48:47 [I] [service.go:174] [c95a8eac9e8b7538] try to reconnect to server... 2023/03/26 20:48:47 [I] [visitor_manager.go:60] [c95a8eac9e8b7538] gracefully shutdown visitor manager 2023/03/26 20:50:58 [W] [service.go:177] [c95a8eac9e8b7538] reconnect to server error: dial tcp xx.xxxx.xxx.xx:7000: connect: connection timed out 2023/03/26 20:50:59 [I] [service.go:174] [c95a8eac9e8b7538] try to reconnect to server... 2023/03/26 20:53:09 [W] [service.go:177] [c95a8eac9e8b7538] reconnect to server error: dial tcp xx.xxxx.xxx.xx:7000: connect: connection timed out 2023/03/26 20:53:11 [I] [service.go:174] [c95a8eac9e8b7538] try to reconnect to server... 2023/03/26 20:53:42 [I] [service.go:301] [c95a8eac9e8b7538] login to server success, get run id [c95a8eac9e8b7538], server udp port [0] 2023/03/26 20:53:42 [I] [proxy_manager.go:144] [c95a8eac9e8b7538] proxy added: [ssh2] 2023/03/26 20:53:42 [I] [control.go:180] [c95a8eac9e8b7538] [ssh2] start proxy success 2023/03/26 20:54:52 [I] [control.go:289] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:54:52 [E] [control.go:158] [c95a8eac9e8b7538] work connection closed before response Start frps日志: 2023/03/26 20:37:21 [I] [proxy.go:179] [c95a8eac9e8b7538] [ssh2] get a user connection [aaa.aa.aa.aaa:9195] 2023/03/26 20:47:39 [I] [proxy.go:179] [c95a8eac9e8b7538] [ssh2] get a user connection [aaa.aa.aa.aaa:6761] 2023/03/26 20:49:06 [I] [control.go:307] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:49:06 [I] [proxy.go:88] [c95a8eac9e8b7538] [ssh2] proxy closing 2023/03/26 20:49:06 [W] [proxy.go:176] [c95a8eac9e8b7538] [ssh2] listener is closed: accept tcp [::]:6002: use of closed network connection 2023/03/26 20:49:06 [I] [control.go:396] [c95a8eac9e8b7538] client exit success 2023/03/26 20:53:42 [I] [service.go:450] [c95a8eac9e8b7538] client login info: ip [cc.ccc.ccc.c:2549] version [0.38.0] hostname [] os [linux] arch [amd64] 2023/03/26 20:53:42 [I] [tcp.go:64] [c95a8eac9e8b7538] [ssh2] tcp proxy listen port [6002] 2023/03/26 20:53:42 [I] [control.go:465] [c95a8eac9e8b7538] new proxy [ssh2] success 2023/03/26 20:54:52 [I] [control.go:307] [c95a8eac9e8b7538] control writer is closing 2023/03/26 20:54:52 [I] [proxy.go:88] [c95a8eac9e8b7538] [ssh2] proxy closing 2023/03/26 20:54:52 [W] [proxy.go:176] [c95a8eac9e8b7538] [ssh2] listener is closed: accept tcp [::]:6002: use of closed network connection 2023/03/26 20:54:52 [I] [control.go:396] [c95a8eac9e8b7538] ### Steps to reproduce 1. 进行ssh连接,连接后很快连接中断 2. 再次进行ssh连接到内网服务端显示ssh: connect to host xx.xxxx.xxx.xx port 6002: Connection refused ### 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:44:16 -06:00
Author
Owner

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

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

<!-- gh-comment-id:1522594668 --> @github-actions[bot] commented on GitHub (Apr 26, 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#2695
No description provided.