[GH-ISSUE #4947] heartbeatTimeout 设置后导致 0.58 之后 的版本不触发 ping 操作 #3899

Closed
opened 2026-05-05 14:29:20 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @change41 on GitHub (Aug 20, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4947

Bug Description

当 frpc 配置 transport.heartbeatTimeout = 90 , 0.58.0 之后的版本不会向服务端发送 ping 健康检查

Image Image

当换成 0.57 后

Image Image

看了一下版本更新日志,应该是和这个优化有关系

Image

frpc Version

0.58.0

frps Version

0.63.0

System Architecture

linux/amd64

Configurations

【frps】version: 0.63.0
#基础服务配置
bindAddr = "0.0.0.0"
bindPort = 7000
kcpBindPort = 7002

quicBindPort = 7000
transport.quic.keepalivePeriod = 10
transport.quic.maxIdleTimeout = 30
transport.quic.maxIncomingStreams = 100000

transport.maxPoolCount = 50
maxPortsPerClient = 0
subDomainHost = "frps.com"
udpPacketSize = 1500

transport.tcpMux = true
transport.tcpMuxKeepaliveInterval = 60
tcpmuxHTTPConnectPort = 7004
tcpmuxPassthrough = true

心跳设置

transport.heartbeatTimeout = 90

transport.tcpKeepalive = 180

虚拟主机相关配置,一般用于http/https 默认端口

vhostHTTPPort = 80
vhostHTTPSPort = 443

webServer.addr = "0.0.0.0"
webServer.port = 7002
webServer.user = "admin"
webServer.password = "password"

认证相关配置

auth.method = "token"

auth.additionalScopes = ["HeartBeats", "NewWorkConns"]

auth.token = "token123456"

Logs

【0.58.0】
root@zhiqingde:/etc/frp# ./frpc -v
0.58.0
root@zhiqingde:/etc/frp# systemctl restart frpc;tail -f /tmp/frpc.log
2025-08-20 21:24:22.380 [I] [sub/root.go:142] start frpc service for config file [/etc/frp/frpc.toml]
2025-08-20 21:24:22.380 [I] [client/service.go:295] try to connect to server...
2025-08-20 21:24:22.380 [I] [client/service.go:174] admin server listen on 0.0.0.0:7400
2025-08-20 21:24:22.485 [I] [client/service.go:287] [353d16b9426c2817] login to server success, get run id [353d16b9426c2817]
2025-08-20 21:24:22.485 [I] [proxy/proxy_manager.go:173] [353d16b9426c2817] proxy added: [zhy.ssh2]
2025-08-20 21:24:22.485 [I] [health/health.go:123] [353d16b9426c2817] [zhy.ssh2] health check status change to success
2025-08-20 21:24:22.486 [I] [proxy/proxy_wrapper.go:239] [353d16b9426c2817] [zhy.ssh2] health check success
2025-08-20 21:24:23.022 [I] [client/control.go:168] [353d16b9426c2817] [zhy.ssh2] start proxy success

2025-08-20 21:25:52.525 [I] [client/service.go:295] [353d16b9426c2817] try to connect to server...
2025-08-20 21:25:52.637 [I] [client/service.go:287] [353d16b9426c2817] login to server success, get run id [353d16b9426c2817]
2025-08-20 21:25:52.637 [I] [proxy/proxy_manager.go:173] [353d16b9426c2817] proxy added: [zhy.ssh2]
2025-08-20 21:25:52.637 [I] [health/health.go:123] [353d16b9426c2817] [zhy.ssh2] health check status change to success
2025-08-20 21:25:52.637 [I] [proxy/proxy_wrapper.go:239] [353d16b9426c2817] [zhy.ssh2] health check success
2025-08-20 21:25:53.171 [I] [client/control.go:168] [353d16b9426c2817] [zhy.ssh2] start proxy success
^C
root@zhiqingde:/etc/frp#
【frps】
2025-08-20 21:22:56,494 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '71d68ded403bcf7b'}, 'run_id': '71d68ded403bcf7b'}}
2025-08-20 21:24:22,472 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}
2025-08-20 21:24:22,472 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}
2025-08-20 21:25:52,626 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}
2025-08-20 21:25:52,626 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}
2025-08-20 21:27:22,821 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}

===========================================================

【0.57.0】

root@zhiqingde:/etc/frp# ./frpc -v
0.57.0
root@zhiqingde:/etc/frp# systemctl restart frpc;tail -f /tmp/frpc.log
2025-08-20 21:27:42.275 [I] [sub/root.go:142] start frpc service for config file [/etc/frp/frpc.toml]
2025-08-20 21:27:42.275 [I] [client/service.go:294] try to connect to server...
2025-08-20 21:27:42.393 [I] [client/service.go:286] [9652c9453297ca7b] login to server success, get run id [9652c9453297ca7b]
2025-08-20 21:27:42.393 [I] [proxy/proxy_manager.go:173] [9652c9453297ca7b] proxy added: [zhy.ssh2]
2025-08-20 21:27:42.393 [I] [client/service.go:184] admin server listen on 0.0.0.0:7400
2025-08-20 21:27:42.396 [I] [health/health.go:123] [9652c9453297ca7b] [zhy.ssh2] health check status change to success
2025-08-20 21:27:42.396 [I] [proxy/proxy_wrapper.go:239] [9652c9453297ca7b] [zhy.ssh2] health check success
2025-08-20 21:27:42.928 [I] [client/control.go:170] [9652c9453297ca7b] [zhy.ssh2] start proxy success

【frps】
2025-08-20 21:27:22,821 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}
2025-08-20 21:27:22,821 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}}
2025-08-20 21:27:42,380 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}, 'run_id': '9652c9453297ca7b'}}
2025-08-20 21:27:42,380 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}, 'run_id': '9652c9453297ca7b'}}
2025-08-20 21:27:42,383 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}}
2025-08-20 21:27:42,383 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}}
2025-08-20 21:28:12,382 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}}
2025-08-20 21:28:12,382 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}}

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @change41 on GitHub (Aug 20, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4947 ### Bug Description 当 frpc 配置 transport.heartbeatTimeout = 90 , 0.58.0 之后的版本不会向服务端发送 ping 健康检查 <img width="1304" height="569" alt="Image" src="https://github.com/user-attachments/assets/7ee9060c-9e64-4d60-a729-4eb9ae7c2655" /> <img width="1705" height="144" alt="Image" src="https://github.com/user-attachments/assets/c3cd6698-caf4-4035-96c8-a9a89a3dd32c" /> 当换成 0.57 后 <img width="1234" height="445" alt="Image" src="https://github.com/user-attachments/assets/fc2eef6c-a214-455b-8724-6d12245cc149" /> <img width="1679" height="170" alt="Image" src="https://github.com/user-attachments/assets/55bb8a0e-1e90-48ac-9062-457a43e1844e" /> 看了一下版本更新日志,应该是和这个优化有关系 <img width="978" height="630" alt="Image" src="https://github.com/user-attachments/assets/86feb648-e67c-4f77-8338-c00090b7e70f" /> ### frpc Version > 0.58.0 ### frps Version 0.63.0 ### System Architecture linux/amd64 ### Configurations 【frps】version: 0.63.0 #基础服务配置 bindAddr = "0.0.0.0" bindPort = 7000 kcpBindPort = 7002 quicBindPort = 7000 transport.quic.keepalivePeriod = 10 transport.quic.maxIdleTimeout = 30 transport.quic.maxIncomingStreams = 100000 transport.maxPoolCount = 50 maxPortsPerClient = 0 subDomainHost = "frps.com" udpPacketSize = 1500 transport.tcpMux = true transport.tcpMuxKeepaliveInterval = 60 tcpmuxHTTPConnectPort = 7004 tcpmuxPassthrough = true # 心跳设置 transport.heartbeatTimeout = 90 transport.tcpKeepalive = 180 # 虚拟主机相关配置,一般用于http/https 默认端口 vhostHTTPPort = 80 vhostHTTPSPort = 443 webServer.addr = "0.0.0.0" webServer.port = 7002 webServer.user = "admin" webServer.password = "password" # 认证相关配置 auth.method = "token" # auth.additionalScopes = ["HeartBeats", "NewWorkConns"] auth.token = "token123456" ### Logs 【0.58.0】 root@zhiqingde:/etc/frp# ./frpc -v 0.58.0 root@zhiqingde:/etc/frp# systemctl restart frpc;tail -f /tmp/frpc.log 2025-08-20 21:24:22.380 [I] [sub/root.go:142] start frpc service for config file [/etc/frp/frpc.toml] 2025-08-20 21:24:22.380 [I] [client/service.go:295] try to connect to server... 2025-08-20 21:24:22.380 [I] [client/service.go:174] admin server listen on 0.0.0.0:7400 2025-08-20 21:24:22.485 [I] [client/service.go:287] [353d16b9426c2817] login to server success, get run id [353d16b9426c2817] 2025-08-20 21:24:22.485 [I] [proxy/proxy_manager.go:173] [353d16b9426c2817] proxy added: [zhy.ssh2] 2025-08-20 21:24:22.485 [I] [health/health.go:123] [353d16b9426c2817] [zhy.ssh2] health check status change to success 2025-08-20 21:24:22.486 [I] [proxy/proxy_wrapper.go:239] [353d16b9426c2817] [zhy.ssh2] health check success 2025-08-20 21:24:23.022 [I] [client/control.go:168] [353d16b9426c2817] [zhy.ssh2] start proxy success 2025-08-20 21:25:52.525 [I] [client/service.go:295] [353d16b9426c2817] try to connect to server... 2025-08-20 21:25:52.637 [I] [client/service.go:287] [353d16b9426c2817] login to server success, get run id [353d16b9426c2817] 2025-08-20 21:25:52.637 [I] [proxy/proxy_manager.go:173] [353d16b9426c2817] proxy added: [zhy.ssh2] 2025-08-20 21:25:52.637 [I] [health/health.go:123] [353d16b9426c2817] [zhy.ssh2] health check status change to success 2025-08-20 21:25:52.637 [I] [proxy/proxy_wrapper.go:239] [353d16b9426c2817] [zhy.ssh2] health check success 2025-08-20 21:25:53.171 [I] [client/control.go:168] [353d16b9426c2817] [zhy.ssh2] start proxy success ^C root@zhiqingde:/etc/frp# 【frps】 2025-08-20 21:22:56,494 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '71d68ded403bcf7b'}, 'run_id': '71d68ded403bcf7b'}} 2025-08-20 21:24:22,472 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} 2025-08-20 21:24:22,472 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} 2025-08-20 21:25:52,626 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} 2025-08-20 21:25:52,626 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} 2025-08-20 21:27:22,821 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} =========================================================== 【0.57.0】 root@zhiqingde:/etc/frp# ./frpc -v 0.57.0 root@zhiqingde:/etc/frp# systemctl restart frpc;tail -f /tmp/frpc.log 2025-08-20 21:27:42.275 [I] [sub/root.go:142] start frpc service for config file [/etc/frp/frpc.toml] 2025-08-20 21:27:42.275 [I] [client/service.go:294] try to connect to server... 2025-08-20 21:27:42.393 [I] [client/service.go:286] [9652c9453297ca7b] login to server success, get run id [9652c9453297ca7b] 2025-08-20 21:27:42.393 [I] [proxy/proxy_manager.go:173] [9652c9453297ca7b] proxy added: [zhy.ssh2] 2025-08-20 21:27:42.393 [I] [client/service.go:184] admin server listen on 0.0.0.0:7400 2025-08-20 21:27:42.396 [I] [health/health.go:123] [9652c9453297ca7b] [zhy.ssh2] health check status change to success 2025-08-20 21:27:42.396 [I] [proxy/proxy_wrapper.go:239] [9652c9453297ca7b] [zhy.ssh2] health check success 2025-08-20 21:27:42.928 [I] [client/control.go:170] [9652c9453297ca7b] [zhy.ssh2] start proxy success 【frps】 2025-08-20 21:27:22,821 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} 2025-08-20 21:27:22,821 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '353d16b9426c2817'}, 'run_id': '353d16b9426c2817'}} 2025-08-20 21:27:42,380 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}, 'run_id': '9652c9453297ca7b'}} 2025-08-20 21:27:42,380 - INFO - {'version': '0.1.0', 'op': 'NewWorkConn', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}, 'run_id': '9652c9453297ca7b'}} 2025-08-20 21:27:42,383 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}} 2025-08-20 21:27:42,383 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}} 2025-08-20 21:28:12,382 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}} 2025-08-20 21:28:12,382 - INFO - {'version': '0.1.0', 'op': 'Ping', 'content': {'user': {'user': 'zhy', 'metas': None, 'run_id': '9652c9453297ca7b'}}} ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [x] Performance and Scalability - [ ] Security - [x] User Experience - [ ] Test and Release - [x] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:29:20 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 4, 2025):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:3251219479 --> @github-actions[bot] commented on GitHub (Sep 4, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
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#3899
No description provided.