[GH-ISSUE #1667] CentOS8 frp0.31.2, frps无法监听21端口 #1320

Closed
opened 2026-05-05 12:50:26 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @shenlijun on GitHub (Feb 20, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1667

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 将会直接关闭。)
(请不要在 issue 评论中出现无意义的 加1我也是 等内容,将会被直接删除。)
(由于个人精力有限,和系统环境,网络环境等相关的求助问题请转至其他论坛或社交平台。)

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)?
frps 0.31.2

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

Configures you used:
单纯
frpc:
[range:FTP]
type = tcp
local_ip = 127.0.0.1
local_port = 50000-50010,21
remote_port = 50000-50010,21

或者单纯
frps:
[common]
bind_port = 21

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:
CentOS8防火墙关闭,确认21未占用,frps都不可以监听
如果frps绑定21,服务无法启动
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)

Originally created by @shenlijun on GitHub (Feb 20, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1667 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 将会直接关闭。) (请不要在 issue 评论中出现无意义的 **加1**,**我也是** 等内容,将会被直接删除。) (由于个人精力有限,和系统环境,网络环境等相关的求助问题请转至其他论坛或社交平台。) 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)?** frps 0.31.2 **What operating system and processor architecture are you using (`go env`)?** CentOS 8.1911 **Configures you used:** 单纯 frpc: [range:FTP] type = tcp local_ip = 127.0.0.1 local_port = 50000-50010,21 remote_port = 50000-50010,21 或者单纯 frps: [common] bind_port = 21 **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** CentOS8防火墙关闭,确认21未占用,frps都不可以监听 如果frps绑定21,服务无法启动 **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)**
Author
Owner

@shenlijun commented on GitHub (Feb 20, 2020):

也可能是VPS的问题,之前CentOS 7没有这个问题

<!-- gh-comment-id:588852103 --> @shenlijun commented on GitHub (Feb 20, 2020): 也可能是VPS的问题,之前CentOS 7没有这个问题
Author
Owner

@shenlijun commented on GitHub (Feb 20, 2020):

nc -l 21是可以的,应该不是系统的限制

<!-- gh-comment-id:588882523 --> @shenlijun commented on GitHub (Feb 20, 2020): nc -l 21是可以的,应该不是系统的限制
Author
Owner

@fatedier commented on GitHub (Feb 20, 2020):

Describe the results you received: 错误日志

<!-- gh-comment-id:588975666 --> @fatedier commented on GitHub (Feb 20, 2020): Describe the results you received: 错误日志
Author
Owner

@shenlijun commented on GitHub (Feb 20, 2020):

奇怪的是直接命令行frps -c frps.ini就没问题,用服务启动就不可以

<!-- gh-comment-id:589003182 --> @shenlijun commented on GitHub (Feb 20, 2020): 奇怪的是直接命令行frps -c frps.ini就没问题,用服务启动就不可以
Author
Owner

@fatedier commented on GitHub (Feb 20, 2020):

贴一下错误信息更容易看出来是什么问题。

<!-- gh-comment-id:589006314 --> @fatedier commented on GitHub (Feb 20, 2020): 贴一下错误信息更容易看出来是什么问题。
Author
Owner

@shenlijun commented on GitHub (Feb 20, 2020):

@fatedier
服务里面用的是nobody,不能监听21端口
奇怪的是以前centos 7就可以。但是按理说linux都不可以监听1024以下才对,诡异

<!-- gh-comment-id:589014269 --> @shenlijun commented on GitHub (Feb 20, 2020): @fatedier 服务里面用的是nobody,不能监听21端口 奇怪的是以前centos 7就可以。但是按理说linux都不可以监听1024以下才对,诡异
Author
Owner

@shenlijun commented on GitHub (Feb 20, 2020):

@fatedier 可能我在以前的VPS改过忘记了,额……打扰了

<!-- gh-comment-id:589018650 --> @shenlijun commented on GitHub (Feb 20, 2020): @fatedier 可能我在以前的VPS改过忘记了,额……打扰了
Author
Owner

@shenlijun commented on GitHub (Feb 20, 2020):

@fatedier
不知道在将后的release里面service文件加上AmbientCapabilities=CAP_NET_BIND_SERVICE会不会好一点?

<!-- gh-comment-id:589020676 --> @shenlijun commented on GitHub (Feb 20, 2020): @fatedier 不知道在将后的release里面service文件加上AmbientCapabilities=CAP_NET_BIND_SERVICE会不会好一点?
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#1320
No description provided.