[GH-ISSUE #1103] frpc p2p模式退出后连接一直保持 #864

Closed
opened 2026-05-05 12:32:58 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @Cyclonekid on GitHub (Feb 27, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1103

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

0.24.1

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

Linux amd64

OS Redhat 6.9

Configures you used:

A
[common]
server_addr = ...
server_port = 16000
token = **********

[p2p_ssh_11]
type = xtcp
sk = 111111111
local_ip = 127.0.0.1
local_port = 22

B
[common]
server_addr = ...
server_port = 16000
token = **********

[ssh_visitor_11]
type = xtcp
role = visitor
server_name = p2p_ssh_11
sk = 111111111
bind_addr = 0.0.0.0
bind_port = 6000

Steps to reproduce the issue:

  1. A,B点对点连接使用SSh,ssh客户端端正常退出后,A机上的TCP和UDP一直保持ESTABLISHED,在A机上会遗留大量的点对点的连接,(每登陆一次就产生2条ESTABLISHED连接)B机断开后连接不能正常关闭,需要重启A的frpc才能清除

Describe the results you received:

Describe the results you expected:

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

复现率100%

Can you point out what caused this issue (optional)

Originally created by @Cyclonekid on GitHub (Feb 27, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1103 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)?** 0.24.1 **What operating system and processor architecture are you using (`go env`)?** Linux amd64 OS Redhat 6.9 **Configures you used:** A [common] server_addr = ***.***.***.*** server_port = 16000 token = ********** [p2p_ssh_11] type = xtcp sk = 111111111 local_ip = 127.0.0.1 local_port = 22 B [common] server_addr = ***.***.***.*** server_port = 16000 token = ********** [ssh_visitor_11] type = xtcp role = visitor server_name = p2p_ssh_11 sk = 111111111 bind_addr = 0.0.0.0 bind_port = 6000 **Steps to reproduce the issue:** 1. A,B点对点连接使用SSh,ssh客户端端正常退出后,A机上的TCP和UDP一直保持ESTABLISHED,在A机上会遗留大量的点对点的连接,(每登陆一次就产生2条ESTABLISHED连接)B机断开后连接不能正常关闭,需要重启A的frpc才能清除 2. 3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** 复现率100% **Can you point out what caused this issue (optional)**
gitea-mirror 2026-05-05 12:32:58 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

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

本地无法复现。

<!-- gh-comment-id:469033911 --> @fatedier commented on GitHub (Mar 3, 2019): 本地无法复现。
Author
Owner

@Cyclonekid commented on GitHub (Mar 5, 2019):

image

我这产生的链接记录,客户端全部已经退出,但链接一直保持ES,除非重新启动A机的FRPC
打开debug日志后,日志只显示连接的日志,看不到有退出的相关日志
image

<!-- gh-comment-id:469502761 --> @Cyclonekid commented on GitHub (Mar 5, 2019): ![image](https://user-images.githubusercontent.com/17697818/53775192-783ec000-3f2c-11e9-831c-be7224c2abe4.png) 我这产生的链接记录,客户端全部已经退出,但链接一直保持ES,除非重新启动A机的FRPC 打开debug日志后,日志只显示连接的日志,看不到有退出的相关日志 ![image](https://user-images.githubusercontent.com/17697818/53775214-90164400-3f2c-11e9-9efa-9c64a0292222.png)
Author
Owner

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

在某些类型设备后确实会有问题,增加一个心跳包的机制,差不多 5 - 10 秒左右会释放这些连接。

下个版本中发布,但是 xtcp 将会不兼容旧版本的 frpc,需要两边的 frpc 都同步更新到新版本。

<!-- gh-comment-id:469522215 --> @fatedier commented on GitHub (Mar 5, 2019): 在某些类型设备后确实会有问题,增加一个心跳包的机制,差不多 5 - 10 秒左右会释放这些连接。 下个版本中发布,但是 xtcp 将会不兼容旧版本的 frpc,需要两边的 frpc 都同步更新到新版本。
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#864
No description provided.