[GH-ISSUE #4805] frpc reload后,老会话依然存在,导致路由到的还是老服务 #3795

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

Originally created by @whisperGu on GitHub (May 21, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4805

Bug Description

proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30001
remotePort = 30005

修改为
proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30002
remotePort = 30005

见reload成功,我还是等待了20s
Image

但是使用之前的连接还是能访问到旧会话,开启无痕或等待超时老化后才可以路由到新的服务
Image

为了验证我的想法,我抓取了reload前后两次tcp的连接:
Hello from 30001
本地地址: 127.0.0.1:54530 | 远程地址: 127.0.0.1:30001 | 状态: ESTABLISHED
Hello from 30001
本地地址: 127.0.0.1:54530 | 远程地址: 127.0.0.1:30001 | 状态: ESTABLISHED
当采用这种方式调用才会立即生效:
req, err := http.NewRequest("GET", "http://127.0.0.1:30005/hello", nil)
if err != nil {
t.Fatal(err)
}
req.Close = true // 调用后立即关闭连接

frpc Version

master

frps Version

master

System Architecture

windows/amd64

Configurations

proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30001
remotePort = 30005

修改为
proxies
name = "test-tcp"
type = "tcp"
localIP = "127.0.0.1"
localPort = 30002
remotePort = 30005

Logs

No response

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 @whisperGu on GitHub (May 21, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4805 ### Bug Description [[proxies]] name = "test-tcp" type = "tcp" localIP = "127.0.0.1" localPort = 30001 remotePort = 30005 修改为 [[proxies]] name = "test-tcp" type = "tcp" localIP = "127.0.0.1" localPort = 30002 remotePort = 30005 见reload成功,我还是等待了20s ![Image](https://github.com/user-attachments/assets/35b7e667-74d7-4b8c-a3e9-79f98643ffc4) 但是使用之前的连接还是能访问到旧会话,开启无痕或等待超时老化后才可以路由到新的服务 ![Image](https://github.com/user-attachments/assets/3cf77da9-2e10-4f0d-bbd3-f2c070e54dbc) 为了验证我的想法,我抓取了reload前后两次tcp的连接: Hello from 30001 本地地址: 127.0.0.1:54530 | 远程地址: 127.0.0.1:30001 | 状态: ESTABLISHED Hello from 30001 本地地址: 127.0.0.1:54530 | 远程地址: 127.0.0.1:30001 | 状态: ESTABLISHED 当采用这种方式调用才会立即生效: req, err := http.NewRequest("GET", "http://127.0.0.1:30005/hello", nil) if err != nil { t.Fatal(err) } req.Close = true // 调用后立即关闭连接 ### frpc Version master ### frps Version master ### System Architecture windows/amd64 ### Configurations [[proxies]] name = "test-tcp" type = "tcp" localIP = "127.0.0.1" localPort = 30001 remotePort = 30005 修改为 [[proxies]] name = "test-tcp" type = "tcp" localIP = "127.0.0.1" localPort = 30002 remotePort = 30005 ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 14:25:45 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 5, 2025):

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

<!-- gh-comment-id:2942237147 --> @github-actions[bot] commented on GitHub (Jun 5, 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#3795
No description provided.