[GH-ISSUE #2905] dial tcp IP:PORT: i/o timeout #2315

Closed
opened 2026-05-05 13:29:36 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @azbub on GitHub (Apr 20, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/2905

Bug Description

Set-up the server side of the proxy with this command ./frps -c ./frps.ini and this frps.ini config :

[common]
bind_port = 7000

I get this ouput :

2022/04/20 17:08:48 [I] [root.go:200] frps uses config file: ./frps.ini
2022/04/20 17:08:48 [I] [service.go:194] frps tcp listen on 0.0.0.0:7000
2022/04/20 17:08:48 [I] [root.go:209] frps started successfully

I run the local server with this command ./frpc -c ./frpc.ini and this frpc.ini config :

[common]
server_addr = SERVER_IP
server_port = 7000

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

I get this output :

dial tcp SERVER_IP:7000: i/o timeout

I have added bind_addr to bin to 127.0.01 / server public IP / server private IP without success.
I made sure the instance ports are all open and ufw has been disabled.

frpc Version

0.41.0

frps Version

0.41.0

System Architecture

linux/amd64 && mac/arm64

Configurations

Local :

[common]
server_addr = SERVER_IP
server_port = 7000

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000

server :

[common]
bind_port = 7000

Logs

server :

2022/04/20 17:08:48 [I] [root.go:200] frps uses config file: ./frps.ini
2022/04/20 17:08:48 [I] [service.go:194] frps tcp listen on 0.0.0.0:7000
2022/04/20 17:08:48 [I] [root.go:209] frps started successfully

local :

dial tcp SERVER_IP:7000: i/o timeout

Steps to reproduce

  1. default server set-up and run the command
  2. edit local server to point to server ip
  3. run the local server
    ...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @azbub on GitHub (Apr 20, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/2905 ### Bug Description Set-up the server side of the proxy with this command `./frps -c ./frps.ini` and this frps.ini config : ``` [common] bind_port = 7000 ``` I get this ouput : ``` 2022/04/20 17:08:48 [I] [root.go:200] frps uses config file: ./frps.ini 2022/04/20 17:08:48 [I] [service.go:194] frps tcp listen on 0.0.0.0:7000 2022/04/20 17:08:48 [I] [root.go:209] frps started successfully ``` I run the local server with this command `./frpc -c ./frpc.ini` and this frpc.ini config : ``` [common] server_addr = SERVER_IP server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 ``` I get this output : `dial tcp SERVER_IP:7000: i/o timeout` I have added `bind_addr` to bin to 127.0.01 / server public IP / server private IP without success. I made sure the instance ports are all open and ufw has been disabled. ### frpc Version 0.41.0 ### frps Version 0.41.0 ### System Architecture linux/amd64 && mac/arm64 ### Configurations Local : ``` [common] server_addr = SERVER_IP server_port = 7000 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 6000 ``` server : ``` [common] bind_port = 7000 ``` ### Logs server : ``` 2022/04/20 17:08:48 [I] [root.go:200] frps uses config file: ./frps.ini 2022/04/20 17:08:48 [I] [service.go:194] frps tcp listen on 0.0.0.0:7000 2022/04/20 17:08:48 [I] [root.go:209] frps started successfully ``` local : `dial tcp SERVER_IP:7000: i/o timeout` ### Steps to reproduce 1. default server set-up and run the command 2. edit local server to point to server ip 3. run the local server ... ### Affected area - [ ] Docs - [X] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:29:36 -06:00
Author
Owner

@Becods commented on GitHub (Apr 25, 2022):

Check if the server port is successfully opened

Use tcping or other tools

<!-- gh-comment-id:1108487829 --> @Becods commented on GitHub (Apr 25, 2022): Check if the server port is successfully opened Use `tcping` or other tools
Author
Owner

@azbub commented on GitHub (Apr 25, 2022):

Check if the server port is successfully opened

Use tcping or other tools

The port is closed, that's the issue.
I made sure the instance security group allows inbound and outbound traffic on the 7000 TCP port.

<!-- gh-comment-id:1108630670 --> @azbub commented on GitHub (Apr 25, 2022): > Check if the server port is successfully opened > > Use `tcping` or other tools The port is closed, that's the issue. I made sure the instance security group allows inbound and outbound traffic on the 7000 TCP port.
Author
Owner

@github-actions[bot] commented on GitHub (May 26, 2022):

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

<!-- gh-comment-id:1138014927 --> @github-actions[bot] commented on GitHub (May 26, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@wlf-darkmatter commented on GitHub (May 30, 2022):

我也遇到这个情况,就是
[W] [service.go:128] login to server failed: dial tcp [$IP]:7000: i/o timeout

一般是服务器的防火墙设置问题,我使用的是腾讯的轻量级服务器,通过指令可以成功开启

查看防火墙打开情况
firewall-cmd --zone=public --list-ports

添加防火墙开启端口 TCP协议 7000-7009端口
firewall-cmd --zone=public --add-port=7000-7009/tcp --permanent

更新防火墙配置
firewall-cmd --reload

<!-- gh-comment-id:1141380146 --> @wlf-darkmatter commented on GitHub (May 30, 2022): 我也遇到这个情况,就是 `[W] [service.go:128] login to server failed: dial tcp [$IP]:7000: i/o timeout` 一般是服务器的防火墙设置问题,我使用的是腾讯的轻量级服务器,通过指令可以成功开启 *查看防火墙打开情况* `firewall-cmd --zone=public --list-ports` *添加防火墙开启端口 TCP协议 7000-7009端口* `firewall-cmd --zone=public --add-port=7000-7009/tcp --permanent` *更新防火墙配置* `firewall-cmd --reload`
Author
Owner

@github-actions[bot] commented on GitHub (Jul 1, 2022):

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

<!-- gh-comment-id:1171801368 --> @github-actions[bot] commented on GitHub (Jul 1, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@liam-pat commented on GitHub (Sep 11, 2022):

  1. Login tecent server.
  2. Edit the firewall rule.
  3. Allow port 7000 and port 6000.
<!-- gh-comment-id:1242918128 --> @liam-pat commented on GitHub (Sep 11, 2022): 1. Login tecent server. 2. Edit the firewall rule. 3. Allow port 7000 and port 6000.
Author
Owner

@wshidaijingshen commented on GitHub (Mar 25, 2023):

我是客户端的 公网ip 地址写错了,好好检查下
I solved this by correcting the server_addr in frpc.ini .
Then problems gone.

The firewall (or security group) on cloud servers may cause this problem.check them wisely .
还有一种,是防火墙不通,telnet 一下服务器 看看 。
云服务器有 安全组策略,或者 防火墙策略,默认是很严格的,要放开一下。

<!-- gh-comment-id:1483873272 --> @wshidaijingshen commented on GitHub (Mar 25, 2023): 我是客户端的 公网ip 地址写错了,好好检查下 I solved this by correcting the `server_addr` in `frpc.ini` . Then problems gone. The `firewall (or security group)` on cloud servers may cause this problem.check them wisely . 还有一种,是防火墙不通,telnet 一下服务器 看看 。 云服务器有 安全组策略,或者 防火墙策略,默认是很严格的,要放开一下。
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#2315
No description provided.