[GH-ISSUE #2699] ip 不同的多个客户端无法同时连接同一服务端 #2152

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

Originally created by @Lehmaning on GitHub (Dec 13, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2699

Bug Description

使用场景:

  1. 内网客户端 A,坐标北京,没有配置代理服务,只设置了 common 块。
  2. 内网客户端 B,坐标泉州,与客户端 A 使用相同的配置以及 token。
  3. 服务端,同时监听 7000 的 TCP 和 UDP 端口,防火墙全部关闭。

问题描述

客户端 A 连接到服务端的时候,客户端 B 便无法连接到服务端了,提示连接被目标主机积极拒绝。

yyyy:mm:dd hh:mm:ss [W] [service.go:104] login to server failed: dial tcp [ip]:7000: connectex: No connection could be made because the target machine actively refused it.
dial tcp [ip]:7000: connectex: No connection could be made because the target machine actively refused it.

目前可以确定是服务端出现问题,但不知道如何解决,求教。

frpc Version

0.38.0

frps Version

0.38.0

System Architecture

windows/amd64

Configurations

服务端

[common]
bind_port = 7000
bind_udp_port = 7000
vhost_http_port= 7000
auto_token = frp

log_file = /var/log/frps.log

dashboard_addr = 127.0.0.1
dashboard_port = 7080
dashboard_user = user
dashboard_pwd = passwd

客户端 A

[common]
server_addr = [ip]
server_port = 7000
admin_port = 7400
auto_token =frp

客户端 B

与 A 相同

Logs

在客户端 A 已经连接上服务端,客户端 B 尝试连接的时候,服务端日志没有发现客户端 B 的登录记录。

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 @Lehmaning on GitHub (Dec 13, 2021). Original GitHub issue: https://github.com/fatedier/frp/issues/2699 ### Bug Description ### 使用场景: 1. 内网客户端 A,坐标北京,没有配置代理服务,只设置了 common 块。 2. 内网客户端 B,坐标泉州,与客户端 A 使用相同的配置以及 token。 3. 服务端,同时监听 7000 的 TCP 和 UDP 端口,防火墙全部关闭。 ### 问题描述 客户端 A 连接到服务端的时候,客户端 B 便无法连接到服务端了,提示连接被目标主机积极拒绝。 ```log yyyy:mm:dd hh:mm:ss [W] [service.go:104] login to server failed: dial tcp [ip]:7000: connectex: No connection could be made because the target machine actively refused it. dial tcp [ip]:7000: connectex: No connection could be made because the target machine actively refused it. ``` 目前可以确定是服务端出现问题,但不知道如何解决,求教。 ### frpc Version 0.38.0 ### frps Version 0.38.0 ### System Architecture windows/amd64 ### Configurations ### 服务端 ```ini [common] bind_port = 7000 bind_udp_port = 7000 vhost_http_port= 7000 auto_token = frp log_file = /var/log/frps.log dashboard_addr = 127.0.0.1 dashboard_port = 7080 dashboard_user = user dashboard_pwd = passwd ``` ### 客户端 A ```ini [common] server_addr = [ip] server_port = 7000 admin_port = 7400 auto_token =frp ``` ### 客户端 B 与 A 相同 ### Logs 在客户端 A 已经连接上服务端,客户端 B 尝试连接的时候,服务端日志没有发现客户端 B 的登录记录。 ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [x] Others
Author
Owner

@Lehmaning commented on GitHub (Dec 24, 2021):

看了下端口开放状态,似乎是防火墙的问题?
有一个客户端连接到 7000 端口后,这个端口对其它客户端就关闭了。

<!-- gh-comment-id:1000686952 --> @Lehmaning commented on GitHub (Dec 24, 2021): 看了下端口开放状态,似乎是防火墙的问题? 有一个客户端连接到 7000 端口后,这个端口对其它客户端就关闭了。
Author
Owner

@Lehmaning commented on GitHub (Jan 4, 2022):

问题看来是端口自主关闭了,没办法。。

<!-- gh-comment-id:1004796781 --> @Lehmaning commented on GitHub (Jan 4, 2022): 问题看来是端口自主关闭了,没办法。。
Author
Owner

@fatedier commented on GitHub (Jan 4, 2022):

没理解,什么叫端口自主关闭?

<!-- gh-comment-id:1004909092 --> @fatedier commented on GitHub (Jan 4, 2022): 没理解,什么叫端口自主关闭?
Author
Owner

@Lehmaning commented on GitHub (Jan 8, 2022):

没理解,什么叫端口自主关闭?

就是一个客户端连上服务端后,服务端的 7000 端口就对其它客户端关闭了。

<!-- gh-comment-id:1007950277 --> @Lehmaning commented on GitHub (Jan 8, 2022): > 没理解,什么叫端口自主关闭? 就是一个客户端连上服务端后,服务端的 7000 端口就对其它客户端关闭了。
Author
Owner

@fatedier commented on GitHub (Jan 8, 2022):

并不存在这种问题,可以看一下是否是其他方面的问题。

<!-- gh-comment-id:1007954893 --> @fatedier commented on GitHub (Jan 8, 2022): 并不存在这种问题,可以看一下是否是其他方面的问题。
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#2152
No description provided.