[GH-ISSUE #1930] frpc连接超时但端口均已开放 #1531

Closed
opened 2026-05-05 12:58:11 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @Doci233 on GitHub (Aug 3, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1930

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
0.28.2

What operating system and processor architecture are you using (go env)?
(gcc version 4.8.5 20150623 (Red Hat 4.8.5-39)) x86_64 阿里云

Configures you used:
Frps.ini:
[common]
bind_port = 6490
token = xxx

Frpc.ini
[common]
token = xxx
server_addr = 172.1.0.1
server_port = 6490
pool_count = 200
tls_enable = true

admin_addr = 172.1.0.3
admin_port = 7400

Steps to reproduce the issue:
1.使用docker运行frp,使用的是glzjin/frp镜像
2.连接成功且正常运行
3.宝塔安装docker管理器
4.镜像全无但重新运行frp时,frps显示开启成功且正常监听端口,frpc一直超时

Describe the results you received:

Frps's logs:
2020/08/03 03:56:08 [I] [service.go:146] frps tcp listen on 0.0.0.0:6490
2020/08/03 03:56:08 [I] [root.go:204] Start frps success

Frpc's logs
2020/08/03 04:41:06 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out
dial tcp 172.1.0.1:6490: connect: connection timed out
2020/08/03 04:43:15 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out
dial tcp 172.1.0.1:6490: connect: connection timed out
2020/08/03 04:45:23 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out
dial tcp 172.1.0.1:6490: connect: connection timed out
2020/08/03 04:47:32 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out
dial tcp 172.1.0.1:6490: connect: connection timed out
一直是这样的,之前连接时是完全没问题的

Describe the results you expected:
希望各位能帮帮我解决这个frpc一直超时的问题

Additional information you deem important (e.g. issue happens only occasionally):
我之前阿里的安全组端口全开,且能正常运行。后来镜像全无重新弄的时候,就一直显示超时,于是我又单独开启6490和7400端口,又开了宝塔里的端口,都不行。服务器上也没开防火墙。。。

Can you point out what caused this issue (optional)

Originally created by @Doci233 on GitHub (Aug 3, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1930 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** 0.28.2 **What operating system and processor architecture are you using (`go env`)?** (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39)) x86_64 阿里云 **Configures you used:** Frps.ini: [common] bind_port = 6490 token = xxx Frpc.ini [common] token = xxx server_addr = 172.1.0.1 server_port = 6490 pool_count = 200 tls_enable = true admin_addr = 172.1.0.3 admin_port = 7400 **Steps to reproduce the issue:** 1.使用docker运行frp,使用的是glzjin/frp镜像 2.连接成功且正常运行 3.宝塔安装docker管理器 4.镜像全无但重新运行frp时,frps显示开启成功且正常监听端口,frpc一直超时 **Describe the results you received:** Frps's logs: 2020/08/03 03:56:08 [I] [service.go:146] frps tcp listen on 0.0.0.0:6490 2020/08/03 03:56:08 [I] [root.go:204] Start frps success Frpc's logs 2020/08/03 04:41:06 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out dial tcp 172.1.0.1:6490: connect: connection timed out 2020/08/03 04:43:15 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out dial tcp 172.1.0.1:6490: connect: connection timed out 2020/08/03 04:45:23 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out dial tcp 172.1.0.1:6490: connect: connection timed out 2020/08/03 04:47:32 [W] [service.go:82] login to server failed: dial tcp 172.1.0.1:6490: connect: connection timed out dial tcp 172.1.0.1:6490: connect: connection timed out 一直是这样的,之前连接时是完全没问题的 **Describe the results you expected:** 希望各位能帮帮我解决这个frpc一直超时的问题 **Additional information you deem important (e.g. issue happens only occasionally):** 我之前阿里的安全组端口全开,且能正常运行。后来镜像全无重新弄的时候,就一直显示超时,于是我又单独开启6490和7400端口,又开了宝塔里的端口,都不行。服务器上也没开防火墙。。。 **Can you point out what caused this issue (optional)**
gitea-mirror 2026-05-05 12:58:11 -06:00
Author
Owner

@fatedier commented on GitHub (Aug 3, 2020):

通过网络调试工具验证 172.1.0.1:6490 的连通性。

<!-- gh-comment-id:667825576 --> @fatedier commented on GitHub (Aug 3, 2020): 通过网络调试工具验证 `172.1.0.1:6490` 的连通性。
Author
Owner

@Doci233 commented on GitHub (Aug 3, 2020):

通过网络调试工具验证 172.1.0.1:6490 的连通性。

用nc试了一下
nc -l 172.1.0.1 6490
Ncat: bind to 172.1.0.1:6490: Address already in use. QUITTING.

用另一台正常连接的服务器测试,也是一样的结果

<!-- gh-comment-id:667834078 --> @Doci233 commented on GitHub (Aug 3, 2020): > 通过网络调试工具验证 `172.1.0.1:6490` 的连通性。 用nc试了一下 nc -l 172.1.0.1 6490 Ncat: bind to 172.1.0.1:6490: Address already in use. QUITTING. 用另一台正常连接的服务器测试,也是一样的结果
Author
Owner

@fatedier commented on GitHub (Aug 3, 2020):

测试是否能连通,不是绑定。

<!-- gh-comment-id:667848549 --> @fatedier commented on GitHub (Aug 3, 2020): 测试是否能连通,不是绑定。
Author
Owner

@Doci233 commented on GitHub (Aug 3, 2020):

测试是否能连通,不是绑定。

[root@iZbp1505h9bgshp619qhalZ ~]# telnet 172.1.0.1 6490
Trying 172.1.0.1...
Connected to 172.1.0.1.
Escape character is '^]'.
Connection closed by foreign host.

[root@iZbp1505h9bgshp619qhalZ ~]# tcping 172.1.0.1 6490
172.1.0.1 port 6490 open.

两台机子都一样的结果

<!-- gh-comment-id:667859304 --> @Doci233 commented on GitHub (Aug 3, 2020): > 测试是否能连通,不是绑定。 [root@iZbp1505h9bgshp619qhalZ ~]# telnet 172.1.0.1 6490 Trying 172.1.0.1... Connected to 172.1.0.1. Escape character is '^]'. Connection closed by foreign host. [root@iZbp1505h9bgshp619qhalZ ~]# tcping 172.1.0.1 6490 172.1.0.1 port 6490 open. 两台机子都一样的结果
Author
Owner

@fatedier commented on GitHub (Aug 3, 2020):

在 frpc 的运行环境中执行此命令。

<!-- gh-comment-id:667878244 --> @fatedier commented on GitHub (Aug 3, 2020): 在 frpc 的运行环境中执行此命令。
Author
Owner

@Doci233 commented on GitHub (Aug 3, 2020):

在 frpc 的运行环境中执行此命令。
不好意思,我这里没有看到命令欸

<!-- gh-comment-id:667896368 --> @Doci233 commented on GitHub (Aug 3, 2020): > 在 frpc 的运行环境中执行此命令。 不好意思,我这里没有看到命令欸
Author
Owner

@fatedier commented on GitHub (Aug 3, 2020):

那可以尝试不使用 docker,直接运行 frp 测试。总之,需要控制变量,找出问题,明确可能的问题点后再去搜索解决方案。

<!-- gh-comment-id:667899835 --> @fatedier commented on GitHub (Aug 3, 2020): 那可以尝试不使用 docker,直接运行 frp 测试。总之,需要控制变量,找出问题,明确可能的问题点后再去搜索解决方案。
Author
Owner

@Doci233 commented on GitHub (Aug 3, 2020):

那可以尝试不使用 docker,直接运行 frp 测试。总之,需要控制变量,找出问题,明确可能的问题点后再去搜索解决方案。

好的,谢谢

<!-- gh-comment-id:667911778 --> @Doci233 commented on GitHub (Aug 3, 2020): > 那可以尝试不使用 docker,直接运行 frp 测试。总之,需要控制变量,找出问题,明确可能的问题点后再去搜索解决方案。 好的,谢谢
Author
Owner

@weituotian commented on GitHub (Mar 22, 2022):

@fatedier
我在windows开发机上能正常使用frpc连接外网公网服务器的frps。
我在内网的服务器装了个frpc,登录时显示超时,应该是被内网一些路由设备限制了出的端口,外网的7000端口是开放了的。
内网服务器可以ping的外网服务器的ip
那么可以指定frpc的本地端口,去连接服务器的7000端口吗?

<!-- gh-comment-id:1074584868 --> @weituotian commented on GitHub (Mar 22, 2022): @fatedier 我在windows开发机上能正常使用frpc连接外网公网服务器的frps。 我在内网的服务器装了个frpc,登录时显示超时,应该是被内网一些路由设备限制了出的端口,外网的7000端口是开放了的。 内网服务器可以ping的外网服务器的ip 那么可以指定frpc的本地端口,去连接服务器的7000端口吗?
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#1531
No description provided.