mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[GH-ISSUE #1505] 配置为ubuntu服务后,每次重启系统,提示路由冲突 #1187
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#1187
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 @at2008 on GitHub (Nov 7, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1505
应用场景说明
一个服务器端(公网),两个客户端(一个在局域网,一个在公网),
情况说明
局域网端 frpc 配置为ubuntu服务后,每次重启系统或者手工命令行方式重启frpc.service,提示路由冲突;
临时解决方法
需要服务器端先重启一次,然后客户端再 重启一次,这样才能正常启动客户端代理
What version of frp are you using (./frpc -v or ./frps -v)?
0.29.0
What operating system and processor architecture are you using (
go env)?ubuntu 18.04
Configures you used:
/etc/systemd/system/frpc.service
[Unit]
Description=frp-client daemon
Wants=NetworkManager-wait-online.service network-online.target
After=NetworkManager-wait-online.service network.target network-online.target
[Service]
Type=simple
Restart=on-failure
RestartSec=5s
WorkingDirectory=/home/username/frp
ExecStart=/home/username/frp/frpc -c /home/username/frp/frpc.ini
ExecReload=/home/username/frp/frpc reload -c /home/username/frp/frpc.ini
[Install]
WantedBy=multi-user.target
==============frps=============
frps.ini
[common]
bind_port = 11001
kcp_bind_port = 11001
vhost_http_port = 80
vhost_https_port = 443
==============frpc=============
frpc.ini
[common]
server_addr = x.x.x.x
server_port = 11001
protocol = kcp
[hos-http-m.mydomain.cn]
type = http
local_port = 8000
custom_domains = m.mydomain.cn
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)
@fatedier commented on GitHub (Nov 7, 2019):
这个和使用 kcp 协议有关系,服务端没有感知到连接的中断,只能依靠心跳超时来判断,这样会有一定的延时。目前已经采用了在关闭程序前会主动 close 自身,但是网络环境不同,会导致可能某些情况下没有起作用。
这种情况,建议在 frpc.ini 中加上
login_fail_exit = false。一般在达到心跳超时后会自动恢复。
@at2008 commented on GitHub (Nov 7, 2019):
多谢大神,我暂时取消
kcp了,一切正常了!