[GH-ISSUE #2665] 服务器端口占用时,客户端连接失败,但是 CPU 飙升 #2125

Closed
opened 2026-05-05 13:22:02 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @HR1025 on GitHub (Nov 18, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2665

Bug Description

当 frp 客户端由于服务器的端口已经被占用时,客户端连接不上服务器,但是客户端的CPU飙升,客户端 Linux ubuntu 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

现象:
08

frpc Version

0.38.0

frps Version

0.38.0

System Architecture

linux/x86

Configurations

[common]
# 连接服务端的地址
server_addr = x.x.x
# 连接服务端的端口
server_port = 8012
# 日志文件地址
#log_file = ./frpc.log
# 第一次登陆失败后是否退出
login_fail_exit = false
# 启用 TLS 协议加密连接
tls_enable = true
# 鉴权方式
authentication_method = token
token = 082116ea-1fcd-4737-944e-56e5078fa8fb
# 启用 AdminUI 监听的本地端口
admin_port = 25000
admin_user = root
admin_pwd = 123456

[netdata]
type = tcp
local_ip = 127.0.0.1
local_port = 19999
remote_port = 25000

Logs

2021/11/18 17:48:50 [I] [proxy_manager.go:144] [0c125c977e4226a1] proxy added: [netdata]
2021/11/18 17:48:50 [I] [service.go:134] admin server listen on 127.0.0.1:25000
2021/11/18 17:48:50 [W] [control.go:178] [0c125c977e4226a1] [netdata] start error: port already used
2021/11/18 17:49:23 [W] [control.go:178] [0c125c977e4226a1] [netdata] start error: port already used

Steps to reproduce

  1. 开启 frps
  2. 一台机 frpc 连接 frps 的 25000 端口
  3. 另一台机 frpc 连接 frps 的 25000 端口
  4. 另一台机由于端口占用连接不上,这没问题;但是几秒之后,另一台机的 CPU 就开始上升,而且接近满载。

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @HR1025 on GitHub (Nov 18, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2665 ### Bug Description 当 frp 客户端由于服务器的端口已经被占用时,客户端连接不上服务器,但是客户端的CPU飙升,客户端 **Linux ubuntu 5.4.0-90-generic #101-Ubuntu SMP Fri Oct 15 20:00:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux** 现象: ![08](https://user-images.githubusercontent.com/56127613/142392873-f2c40bc0-db02-45f3-9be1-1f692e65e8ee.png) ### frpc Version 0.38.0 ### frps Version 0.38.0 ### System Architecture linux/x86 ### Configurations ```ini [common] # 连接服务端的地址 server_addr = x.x.x # 连接服务端的端口 server_port = 8012 # 日志文件地址 #log_file = ./frpc.log # 第一次登陆失败后是否退出 login_fail_exit = false # 启用 TLS 协议加密连接 tls_enable = true # 鉴权方式 authentication_method = token token = 082116ea-1fcd-4737-944e-56e5078fa8fb # 启用 AdminUI 监听的本地端口 admin_port = 25000 admin_user = root admin_pwd = 123456 [netdata] type = tcp local_ip = 127.0.0.1 local_port = 19999 remote_port = 25000 ``` ### Logs 2021/11/18 17:48:50 [I] [proxy_manager.go:144] [0c125c977e4226a1] proxy added: [netdata] 2021/11/18 17:48:50 [I] [service.go:134] admin server listen on 127.0.0.1:25000 2021/11/18 17:48:50 [W] [control.go:178] [0c125c977e4226a1] [netdata] start error: port already used 2021/11/18 17:49:23 [W] [control.go:178] [0c125c977e4226a1] [netdata] start error: port already used ### Steps to reproduce 1. 开启 frps 2. 一台机 frpc 连接 frps 的 25000 端口 3. 另一台机 frpc 连接 frps 的 25000 端口 4. 另一台机由于端口占用连接不上,这没问题;但是几秒之后,另一台机的 CPU 就开始上升,而且接近满载。 ### 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:22:02 -06:00
Author
Owner

@fatedier commented on GitHub (Nov 18, 2021):

是否可稳定复现?

<!-- gh-comment-id:972726209 --> @fatedier commented on GitHub (Nov 18, 2021): 是否可稳定复现?
Author
Owner

@HR1025 commented on GitHub (Nov 18, 2021):

明天我拿多几台机测试下,获取一下数据。

---原始邮件---
发件人: @.>
发送时间: 2021年11月18日(周四) 晚上6:16
收件人: @.
>;
抄送: "haorui @.@.>;
主题: Re: [fatedier/frp] 服务器端口占用时,客户端连接失败,但是 CPU 飙升 (Issue #2665)

是否可稳定复现?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

<!-- gh-comment-id:972728939 --> @HR1025 commented on GitHub (Nov 18, 2021): 明天我拿多几台机测试下,获取一下数据。 ---原始邮件--- 发件人: ***@***.***&gt; 发送时间: 2021年11月18日(周四) 晚上6:16 收件人: ***@***.***&gt;; 抄送: "haorui ***@***.******@***.***&gt;; 主题: Re: [fatedier/frp] 服务器端口占用时,客户端连接失败,但是 CPU 飙升 (Issue #2665) 是否可稳定复现? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
Author
Owner

@HR1025 commented on GitHub (Nov 19, 2021):

复现不出来,之后有出现再记录了。

<!-- gh-comment-id:973635969 --> @HR1025 commented on GitHub (Nov 19, 2021): 复现不出来,之后有出现再记录了。
Author
Owner

@blizard863 commented on GitHub (Nov 20, 2021):

没有复现出来。

<!-- gh-comment-id:974581745 --> @blizard863 commented on GitHub (Nov 20, 2021): 没有复现出来。
Author
Owner

@github-actions[bot] commented on GitHub (Dec 21, 2021):

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

<!-- gh-comment-id:998371519 --> @github-actions[bot] commented on GitHub (Dec 21, 2021): 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#2125
No description provided.