[GH-ISSUE #1248] 群晖部署frp,经常会断开连接。 #986

Closed
opened 2026-05-05 12:38:09 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @snowdream on GitHub (May 14, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1248

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.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

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)?
frpc frps
0.27.0

What operating system and processor architecture are you using (go env)?

Configures you used:
frps.ini

# [common] is integral section
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = 2222
# udp port used for kcp protocol, it can be same with 'bind_port'
# if not set, kcp is disabled in frps
kcp_bind_port = 2222
# if you want to configure or reload frps by dashboard, dashboard_port must be set
dashboard_port = 6443
# dashboard assets directory(only for debug mode)
dashboard_user = *****(隐藏)
dashboard_pwd = *****(隐藏)
# assets_dir = ./static
vhost_http_port = 5000
vhost_https_port = 5001
# console or real logFile path like ./frps.log
log_file = /root/frps.log
# debug, info, warn, error
log_level = info
log_max_days = 3
# auth token
token = IZduangyDp6sAUJz
# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
#allow_ports = 1-65535
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
max_pool_count = 10
# if tcp stream multiplexing is used, default is true
tcp_mux = true
# if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file
# when subdomain is test, the host used by routing is test.frps.com
subdomain_host = *****(隐藏)                     

frpc.ini

[common]
server_addr = *****(隐藏)
server_port = 2222
token = IZduangyDp6sAUJz
pool_count = 5

log_file = /tmp/frpc.log
log_level = info
log_max_days = 3

admin_addr = 127.0.0.1
admin_port = 7400

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 8022
use_encryption = true
use_compression = true

[http]
type = http
local_port = 5000
subdomain = www
use_encryption = true
use_compression = true

[range:tcp_port]
type = tcp
local_ip = 127.0.0.1
local_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001
remote_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001
use_encryption = true
use_compression = true

[range:udp_port]
type = udp
local_ip = 127.0.0.1
local_port = 1900,5000,5001,5353,6001-6006,50001,50002
remote_port = 1900,5000,5001,5353,6001-6006,50001,50002
use_encryption = true
use_compression = true

Steps to reproduce the issue:

  1. 在群晖部署frpc,在centos服务器部署frps
  2. 运行frps和frpc
  3. 等待

Describe the results you received:
frp无规律断开连接,不可用。

Describe the results you expected:
frp稳定可用

Additional information you deem important (e.g. issue happens only occasionally):
frpc.log

2019/05/14 21:38:17 [W] [service.go:82] login to server failed: dial tcp: lookup www.mydms.cn on 211.136.192.6:53: read udp 192.168.1.105:54942->211.136.192.6:53: i/o timeout

frps.log
http://149.28.72.57:8080/frps.log

[root@vultr ~]# systemctl status frps
● frps.service - Frp Server Service
   Loaded: loaded (/usr/lib/systemd/system/frps.service; enabled; vendor preset: disabled)
   Active: active (running) since Sat 2019-05-11 11:17:38 UTC; 3 days ago
 Main PID: 2784 (frps)
   CGroup: /system.slice/frps.service
           └─2784 /usr/bin/frps -c /etc/frp/frps.ini

May 11 11:17:38 vultr.guest systemd[1]: Started Frp Server Service.

Can you point out what caused this issue (optional)
frps dashboard

Originally created by @snowdream on GitHub (May 14, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1248 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. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) 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)?** frpc frps 0.27.0 **What operating system and processor architecture are you using (`go env`)?** **Configures you used:** frps.ini ``` # [common] is integral section [common] # A literal address or host name for IPv6 must be enclosed # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80" bind_addr = 0.0.0.0 bind_port = 2222 # udp port used for kcp protocol, it can be same with 'bind_port' # if not set, kcp is disabled in frps kcp_bind_port = 2222 # if you want to configure or reload frps by dashboard, dashboard_port must be set dashboard_port = 6443 # dashboard assets directory(only for debug mode) dashboard_user = *****(隐藏) dashboard_pwd = *****(隐藏) # assets_dir = ./static vhost_http_port = 5000 vhost_https_port = 5001 # console or real logFile path like ./frps.log log_file = /root/frps.log # debug, info, warn, error log_level = info log_max_days = 3 # auth token token = IZduangyDp6sAUJz # only allow frpc to bind ports you list, if you set nothing, there won't be any limit #allow_ports = 1-65535 # pool_count in each proxy will change to max_pool_count if they exceed the maximum value max_pool_count = 10 # if tcp stream multiplexing is used, default is true tcp_mux = true # if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file # when subdomain is test, the host used by routing is test.frps.com subdomain_host = *****(隐藏) ``` frpc.ini ``` [common] server_addr = *****(隐藏) server_port = 2222 token = IZduangyDp6sAUJz pool_count = 5 log_file = /tmp/frpc.log log_level = info log_max_days = 3 admin_addr = 127.0.0.1 admin_port = 7400 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 8022 use_encryption = true use_compression = true [http] type = http local_port = 5000 subdomain = www use_encryption = true use_compression = true [range:tcp_port] type = tcp local_ip = 127.0.0.1 local_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001 remote_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001 use_encryption = true use_compression = true [range:udp_port] type = udp local_ip = 127.0.0.1 local_port = 1900,5000,5001,5353,6001-6006,50001,50002 remote_port = 1900,5000,5001,5353,6001-6006,50001,50002 use_encryption = true use_compression = true ``` **Steps to reproduce the issue:** 1. 在群晖部署frpc,在centos服务器部署frps 2. 运行frps和frpc 3. 等待 **Describe the results you received:** frp无规律断开连接,不可用。 **Describe the results you expected:** frp稳定可用 **Additional information you deem important (e.g. issue happens only occasionally):** frpc.log ``` 2019/05/14 21:38:17 [W] [service.go:82] login to server failed: dial tcp: lookup www.mydms.cn on 211.136.192.6:53: read udp 192.168.1.105:54942->211.136.192.6:53: i/o timeout ``` frps.log [http://149.28.72.57:8080/frps.log](http://149.28.72.57:8080/frps.log) ``` [root@vultr ~]# systemctl status frps ● frps.service - Frp Server Service Loaded: loaded (/usr/lib/systemd/system/frps.service; enabled; vendor preset: disabled) Active: active (running) since Sat 2019-05-11 11:17:38 UTC; 3 days ago Main PID: 2784 (frps) CGroup: /system.slice/frps.service └─2784 /usr/bin/frps -c /etc/frp/frps.ini May 11 11:17:38 vultr.guest systemd[1]: Started Frp Server Service. ``` **Can you point out what caused this issue (optional)** ![frps dashboard](https://user-images.githubusercontent.com/737958/57710373-6baeb480-769f-11e9-9d39-2ea615d87a7f.png)
Author
Owner

@wxlg1117 commented on GitHub (May 15, 2019):

干嘛要放这么多端口出去? 走vpn啊那就

<!-- gh-comment-id:492471002 --> @wxlg1117 commented on GitHub (May 15, 2019): 干嘛要放这么多端口出去? 走vpn啊那就
Author
Owner

@snowdream commented on GitHub (May 15, 2019):

群晖本身就一大堆端口。

Synology 服务使用哪些网络端口?
https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/Network/What_network_ports_are_used_by_Synology_services

我想用户有需求开这么多端口,这个不应该限制吧。

<!-- gh-comment-id:492479188 --> @snowdream commented on GitHub (May 15, 2019): 群晖本身就一大堆端口。 Synology 服务使用哪些网络端口? https://www.synology.com/zh-cn/knowledgebase/DSM/tutorial/Network/What_network_ports_are_used_by_Synology_services 我想用户有需求开这么多端口,这个不应该限制吧。
Author
Owner

@zqlanly commented on GitHub (May 15, 2019):

用V0.24 吧,其它0.24以上版本全部不稳定

<!-- gh-comment-id:492662270 --> @zqlanly commented on GitHub (May 15, 2019): 用V0.24 吧,其它0.24以上版本全部不稳定
Author
Owner

@fatedier commented on GitHub (Jun 4, 2019):

frpc 的日志显示你的本地 DNS 服务有问题,不可用。

建议检查你的 DNS 配置,或不使用域名,直接使用 IP 来连接服务端。

<!-- gh-comment-id:498514012 --> @fatedier commented on GitHub (Jun 4, 2019): frpc 的日志显示你的本地 DNS 服务有问题,不可用。 建议检查你的 DNS 配置,或不使用域名,直接使用 IP 来连接服务端。
Author
Owner

@snowdream commented on GitHub (Jun 4, 2019):

  1. 降级版本到v0.24.1
  2. 关闭kcp设置
    目前运行比较稳定。
<!-- gh-comment-id:498532484 --> @snowdream commented on GitHub (Jun 4, 2019): 1. 降级版本到v0.24.1 2. 关闭kcp设置 目前运行比较稳定。
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#986
No description provided.