[GH-ISSUE #1155] do one health check failed: xxx socket: too many open files #904

Closed
opened 2026-05-05 12:34:34 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @edsion1107 on GitHub (Mar 25, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1155

What version of frp are you using (./frpc -v or ./frps -v)?
0.25.1

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

Configures you used:

# file: frpc.ini
[sentry]
type=http
local_port=9000
#custom_domains=i1hao.com
custom_domains=sentry.i1hao.com

# 启用健康检查,类型为 http
health_check_type = http
# 健康检查发送 http 请求的 url,后端服务需要返回 2xx 的 http 状态码
health_check_url = /_health/
health_check_interval_s = 10
health_check_max_failed = 3
health_check_timeout_s = 3

# file: sentry.ini
[Service]
Type=simple
WorkingDirectory=/home/edsion/frp_0.25.1_linux_amd64
ExecStart=/home/edsion/frp_0.25.1_linux_amd64/frpc -c sentry.ini
ExecReload=/home/edsion/frp_0.25.1_linux_amd64/frpc reload -c sentry.ini
Restart=always
RestartSec=20s
User=nobody

# file:  log.txt
Mar 23 14:45:56 Gen8.local systemd[1]: Started Sentry.
Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [service.go:221] login to server success, get run id [2f43bd0325ceb6bc], server udp port [0]
Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [proxy_manager.go:137] [2f43bd0325ceb6bc] proxy added: [sentry]
Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [service.go:109] admin server listen on 127.0.0.1:7400
Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [health.go:115] [2f43bd0325ceb6bc] [sentry] health check status change to success
Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [proxy_wrapper.go:206] [2f43bd0325ceb6bc] [sentry] health check success
Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [control.go:144] [sentry] start proxy success
Mar 23 15:21:28 Gen8.local frpc[42316]: 2019/03/23 15:21:28 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: EOF
Mar 23 15:21:38 Gen8.local frpc[42316]: 2019/03/23 15:21:38 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: connect: connection refused
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [E] [control.go:127] work connection closed, EOF
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [control.go:224] control writer is closing
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [service.go:127] try to reconnect to server...
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [service.go:221] login to server success, get run id [2f43bd0325ceb6bc], server udp port [0]
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [proxy_manager.go:137] [2f43bd0325ceb6bc] proxy added: [sentry]
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [health.go:115] [2f43bd0325ceb6bc] [sentry] health check status change to success
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [proxy_wrapper.go:206] [2f43bd0325ceb6bc] [sentry] health check success
Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [control.go:144] [sentry] start proxy success
Mar 23 22:08:00 Gen8.local frpc[42316]: 2019/03/23 22:08:00 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:08:10 Gen8.local frpc[42316]: 2019/03/23 22:08:10 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:08:20 Gen8.local frpc[42316]: 2019/03/23 22:08:20 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:08:20 Gen8.local frpc[42316]: 2019/03/23 22:08:20 [W] [health.go:127] [2f43bd0325ceb6bc] [sentry] health check status change to failed
Mar 23 22:08:20 Gen8.local frpc[42316]: 2019/03/23 22:08:20 [I] [proxy_wrapper.go:217] [2f43bd0325ceb6bc] [sentry] health check failed
Mar 23 22:08:30 Gen8.local frpc[42316]: 2019/03/23 22:08:30 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:08:40 Gen8.local frpc[42316]: 2019/03/23 22:08:40 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:08:50 Gen8.local frpc[42316]: 2019/03/23 22:08:50 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:09:00 Gen8.local frpc[42316]: 2019/03/23 22:09:00 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:09:10 Gen8.local frpc[42316]: 2019/03/23 22:09:10 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files
Mar 23 22:09:20 Gen8.local frpc[42316]: 2019/03/23 22:09:20 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files

Steps to reproduce the issue:

  1. 我使用了systemd作为“守护进程”来启动frpc,配置和log在上面
    2.当frpc运行一段时间后,提示我socket: too many open files

所以,这里是frpc报的错误吗?需要修改systemd的limits?还是[sentry]这个服务的错误?

Originally created by @edsion1107 on GitHub (Mar 25, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1155 **What version of frp are you using (./frpc -v or ./frps -v)?** 0.25.1 **What operating system and processor architecture are you using (`go env`)?** **Configures you used:** ``` # file: frpc.ini [sentry] type=http local_port=9000 #custom_domains=i1hao.com custom_domains=sentry.i1hao.com # 启用健康检查,类型为 http health_check_type = http # 健康检查发送 http 请求的 url,后端服务需要返回 2xx 的 http 状态码 health_check_url = /_health/ health_check_interval_s = 10 health_check_max_failed = 3 health_check_timeout_s = 3 # file: sentry.ini [Service] Type=simple WorkingDirectory=/home/edsion/frp_0.25.1_linux_amd64 ExecStart=/home/edsion/frp_0.25.1_linux_amd64/frpc -c sentry.ini ExecReload=/home/edsion/frp_0.25.1_linux_amd64/frpc reload -c sentry.ini Restart=always RestartSec=20s User=nobody ``` ``` # file: log.txt Mar 23 14:45:56 Gen8.local systemd[1]: Started Sentry. Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [service.go:221] login to server success, get run id [2f43bd0325ceb6bc], server udp port [0] Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [proxy_manager.go:137] [2f43bd0325ceb6bc] proxy added: [sentry] Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [service.go:109] admin server listen on 127.0.0.1:7400 Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [health.go:115] [2f43bd0325ceb6bc] [sentry] health check status change to success Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [proxy_wrapper.go:206] [2f43bd0325ceb6bc] [sentry] health check success Mar 23 14:45:57 Gen8.local frpc[42316]: 2019/03/23 14:45:57 [I] [control.go:144] [sentry] start proxy success Mar 23 15:21:28 Gen8.local frpc[42316]: 2019/03/23 15:21:28 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: EOF Mar 23 15:21:38 Gen8.local frpc[42316]: 2019/03/23 15:21:38 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: connect: connection refused Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [E] [control.go:127] work connection closed, EOF Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [control.go:224] control writer is closing Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [service.go:127] try to reconnect to server... Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [service.go:221] login to server success, get run id [2f43bd0325ceb6bc], server udp port [0] Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [proxy_manager.go:137] [2f43bd0325ceb6bc] proxy added: [sentry] Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [health.go:115] [2f43bd0325ceb6bc] [sentry] health check status change to success Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [proxy_wrapper.go:206] [2f43bd0325ceb6bc] [sentry] health check success Mar 23 19:53:47 Gen8.local frpc[42316]: 2019/03/23 19:53:47 [I] [control.go:144] [sentry] start proxy success Mar 23 22:08:00 Gen8.local frpc[42316]: 2019/03/23 22:08:00 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:08:10 Gen8.local frpc[42316]: 2019/03/23 22:08:10 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:08:20 Gen8.local frpc[42316]: 2019/03/23 22:08:20 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:08:20 Gen8.local frpc[42316]: 2019/03/23 22:08:20 [W] [health.go:127] [2f43bd0325ceb6bc] [sentry] health check status change to failed Mar 23 22:08:20 Gen8.local frpc[42316]: 2019/03/23 22:08:20 [I] [proxy_wrapper.go:217] [2f43bd0325ceb6bc] [sentry] health check failed Mar 23 22:08:30 Gen8.local frpc[42316]: 2019/03/23 22:08:30 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:08:40 Gen8.local frpc[42316]: 2019/03/23 22:08:40 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:08:50 Gen8.local frpc[42316]: 2019/03/23 22:08:50 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:09:00 Gen8.local frpc[42316]: 2019/03/23 22:09:00 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:09:10 Gen8.local frpc[42316]: 2019/03/23 22:09:10 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files Mar 23 22:09:20 Gen8.local frpc[42316]: 2019/03/23 22:09:20 [W] [health.go:122] [2f43bd0325ceb6bc] [sentry] do one health check failed: Get http://127.0.0.1:9000/_health/: dial tcp 127.0.0.1:9000: socket: too many open files ``` **Steps to reproduce the issue:** 1. 我使用了systemd作为“守护进程”来启动frpc,配置和log在上面 2.当frpc运行一段时间后,提示我`socket: too many open files` 所以,这里是frpc报的错误吗?需要修改systemd的limits?还是[sentry]这个服务的错误?
gitea-mirror 2026-05-05 12:34:34 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@fatedier commented on GitHub (Mar 25, 2019):

这是一个 bug,暂时先不要配置,稍后会修复重新发布一个新的版本。

<!-- gh-comment-id:476066487 --> @fatedier commented on GitHub (Mar 25, 2019): 这是一个 bug,暂时先不要配置,稍后会修复重新发布一个新的版本。
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#904
No description provided.