mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1813] 请问,为什么我搭的frp总是过一段时间断开,然后又重新连上 #1430
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1430
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @frederichen01 on GitHub (May 19, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1813
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.33.0
What operating system and processor architecture are you using (
go env)?ubuntu16
Configures you used:
[common]
server_addr = 47.102.200.64
server_port = 7000
[ssh6001]
type = tcp
local_port = 22
local_add = 127.0.0.1
remote_port = 6001
[common]
bind_port = 7000
vhost_http_port = 5000
vhost_https_port = 5001
dashboard_port = 7500
dashboard_user = ***
dashboard_pwd = ***
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Can you point out what caused this issue (optional)
@frederichen01 commented on GitHub (May 19, 2020):
这是日志 ssh6001是以前的 现在的端口设置成了6000 但是ssh6001总是出黄色的那个错误,远程连的主机也不知道在哪关
@frederichen01 commented on GitHub (May 19, 2020):
把端口换成10000/12000了 就是这个输出日志
@blizard863 commented on GitHub (May 19, 2020):
frpc 的日志也提供下。
@frederichen01 commented on GitHub (May 19, 2020):
frpc没有用service启动,用得nohup ./frpc -c ./frpc.ini 怎么看日志呢
@blizard863 commented on GitHub (May 19, 2020):
最简单的办法, 不用 nohup ,直接运行 frpc,看输出的什么日志。
建议先熟悉下命令行,shell ,Linux 这些基本概念, 不然沟通效率比较低。
@frederichen01 commented on GitHub (May 19, 2020):
这是这次断开frpc的日志
这是这次断开frps的日志
@blizard863 commented on GitHub (May 19, 2020):
错误很详细了, 换个端口试试。
@frederichen01 commented on GitHub (May 19, 2020):
换了个端口还是一样


这个是frpc的日志
这个是frps的日志
@blizard863 commented on GitHub (May 19, 2020):
我当前比较怀疑是防火墙导致的, 因为 frpc 是登录了frps 的,可以检查下。
如果发现不出来, 可以在 frpc 和 frps 两台机器分别 tcpdump/wireshark 抓包看下。
@frederichen01 commented on GitHub (May 19, 2020):
防火墙应该不会,因为之前用过还挺稳定的,就是实验室停了一次电,再用就出现这个问题了


这是正常的frps的连接状态
断了之后就这样了
我在想是不是我之前设置的frpc开机自启动然后占用了啥的的问题,因为我在连接上的时候pkill -9 frpc的时候出现这个情况(下图)

@frederichen01 commented on GitHub (May 19, 2020):
这台机器只有我一个人在用frpc,frpc只可能是我创建的
@frederichen01 commented on GitHub (May 19, 2020):
可能真是我校园网的问题 我在我本地搭建穿透完全没问题
@frederichen01 commented on GitHub (May 19, 2020):
感谢回复
@blizard863 commented on GitHub (May 20, 2020):
建议还是在两边抓个包分析下, 看看是两端的问题,还是中间链路出了问题。
@frederichen01 commented on GitHub (May 21, 2020):
真的很奇妙,学校的是电信网,然后我这边也换成了电信网就好了,我之前连的这边是移动的网,测速各种都没问题,也没丢包,网速也有10几M;大佬下次遇到这个提问不妨让换成同一个运营商的网试试
@frederichen01 commented on GitHub (May 21, 2020):
高兴得太早了。。。还是一样
@fatedier commented on GitHub (May 21, 2020):
可以尝试更换 protocol 为 kcp,以及开启 TLS 看是否有效果。
@frederichen01 commented on GitHub (May 21, 2020):
还是没用 可能是两会校园网的缘故
@HellowBoy commented on GitHub (Feb 7, 2025):
我是这样解决的,目前测试没问题了。
1、客户端和服务器端关闭端口复用,下面只给出了服务端的配置,客户端也有相应的设置
transport.tcpMux = false
transport.tcpMuxKeepaliveInterval = 60
transport.heartbeatTimeout = 60
2、部分客户端插件注册间隔时间设置为0。如openwrt中
大家可以试试,有用点赞呢