[GH-ISSUE #982] connect: no route to host #779

Closed
opened 2026-05-05 12:29:56 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @guodong1994 on GitHub (Nov 23, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/982

使用的是 frp_0.21.0版本, 服务器和客户端均在64位Linux系统中运行
服务器端启动了服务后,在客户端中启动服务时,报出
[W] [control.go:113] login to server failed: dial tcp ...:7000: connect: no route to host
尝试过0.20,也是同样的错误,在客户端中通过ping服务器端ip是可以ping同的,请问这是什么原因导致的?

Originally created by @guodong1994 on GitHub (Nov 23, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/982 使用的是 frp_0.21.0版本, 服务器和客户端均在64位Linux系统中运行 服务器端启动了服务后,在客户端中启动服务时,报出 [W] [control.go:113] login to server failed: dial tcp *.*.*.*:7000: connect: no route to host 尝试过0.20,也是同样的错误,在客户端中通过ping服务器端ip是可以ping同的,请问这是什么原因导致的?
Author
Owner

@kasuganosoras commented on GitHub (Nov 24, 2018):

检查你的配置文件
并且启动的时候要指定配置文件名,例如 frpc.ini

./frpc -c frpc.ini

根据你的描述来看应该是服务器地址没填对

<!-- gh-comment-id:441390062 --> @kasuganosoras commented on GitHub (Nov 24, 2018): 检查你的配置文件 并且启动的时候要指定配置文件名,例如 frpc.ini ```bash ./frpc -c frpc.ini ``` 根据你的描述来看应该是服务器地址没填对
Author
Owner

@wangxianfeng commented on GitHub (Nov 25, 2018):

今天我也遇到这个问题,我的是因为服务器开了防火墙,导致客户端连不上,你可以试试关闭服务器防火墙
centos可以使用如下命令systemctl stop firewalld.service 其他操作系统自行度娘

<!-- gh-comment-id:441410323 --> @wangxianfeng commented on GitHub (Nov 25, 2018): 今天我也遇到这个问题,我的是因为服务器开了防火墙,导致客户端连不上,你可以试试关闭服务器防火墙 centos可以使用如下命令systemctl stop firewalld.service 其他操作系统自行度娘
Author
Owner

@skylovele commented on GitHub (Apr 3, 2020):

今天我也遇到这个问题,我的是因为服务器开了防火墙,导致客户端连不上,你可以试试关闭服务器防火墙
centos可以使用如下命令systemctl stop firewalld.service 其他操作系统自行度娘

谢谢

<!-- gh-comment-id:608216729 --> @skylovele commented on GitHub (Apr 3, 2020): > 今天我也遇到这个问题,我的是因为服务器开了防火墙,导致客户端连不上,你可以试试关闭服务器防火墙 > centos可以使用如下命令systemctl stop firewalld.service 其他操作系统自行度娘 谢谢
Author
Owner

@jiangwenfan commented on GitHub (Nov 24, 2020):

1.首先使用nmap扫描一下vps主机的端口,如果端口状态是filtered,几乎可以确定是防火墙没有没有放行端口。

[root@jwf frp]# nmap 19.29.39.10 -p 80
Starting Nmap 6.40 ( http://nmap.org ) at 2020-11-24 16:29 +09
Nmap scan report for 119.29.194.108
Host is up (0.035s latency).
PORT STATE SERVICE
80/tcp filtered http
Nmap done: 1 IP address (1 host up) scanned in 0.66 seconds

2.去云平台放行端口
3.在自己vps上关闭防火墙,清空防火墙规则。

systemctl stop firewalld
iptables -F

也可以顺带使用getenforce看一下Selinux是不是关闭,虽然这个似乎没啥影响。

<!-- gh-comment-id:732723068 --> @jiangwenfan commented on GitHub (Nov 24, 2020): 1.首先使用nmap扫描一下vps主机的端口,如果端口状态是filtered,几乎可以确定是防火墙没有没有放行端口。 [root@jwf frp]# nmap 19.29.39.10 -p 80 Starting Nmap 6.40 ( http://nmap.org ) at 2020-11-24 16:29 +09 Nmap scan report for 119.29.194.108 Host is up (0.035s latency). PORT STATE SERVICE 80/tcp filtered http Nmap done: 1 IP address (1 host up) scanned in 0.66 seconds 2.去云平台放行端口 3.在自己vps上关闭防火墙,清空防火墙规则。 systemctl stop firewalld iptables -F 也可以顺带使用getenforce看一下Selinux是不是关闭,虽然这个似乎没啥影响。
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#779
No description provided.