[GH-ISSUE #4593] Linux 客户端开启KCP后无法与服务器进行连接 #3629

Closed
opened 2026-05-05 14:19:50 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @qq761861 on GitHub (Dec 18, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4593

Bug Description

2024-12-18 12:39:16.427 [I] [client/service.go:295] try to connect to server...
2024-12-18 12:39:26.430 [W] [client/service.go:298] connect to server error: connection write timeout
2024-12-18 12:39:26.431 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped
2024-12-18 12:39:31.682 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml]
2024-12-18 12:39:31.683 [I] [client/service.go:295] try to connect to server...
2024-12-18 12:39:41.686 [W] [client/service.go:298] connect to server error: connection write timeout
2024-12-18 12:39:41.686 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped
2024-12-18 12:39:46.926 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml]
2024-12-18 12:39:46.927 [I] [client/service.go:295] try to connect to server...
2024-12-18 12:39:56.930 [W] [client/service.go:298] connect to server error: connection write timeout
2024-12-18 12:39:56.931 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped
2024-12-18 12:40:02.186 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml]
2024-12-18 12:40:02.186 [I] [client/service.go:295] try to connect to server...
2024-12-18 12:40:12.188 [W] [client/service.go:298] connect to server error: connection write timeout
2024-12-18 12:40:12.189 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped
2024-12-18 12:40:17.426 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml]
2024-12-18 12:40:17.427 [I] [client/service.go:295] try to connect to server...
image

取消客户端配置文件中的transport.protocol = "kcp"参数就可以恢复正常链接

客户端可以通过nmap扫描到服务端端口是启用状态的
客户端配置如下

serverAddr = "..*.*手动打码"
serverPort = 7098
auth.token = "123456"
log.to = "/var/log/frpc.log"
log.level = "info"
log.maxDays = 7
transport.protocol = "kcp"
loginFailExit = true

proxies
name = "conf1"
type = "tcp"
localIP = "127.0.0.1"
localPort = 9090
remotePort = 9090

服务端配置如下
bindPort = 7098
kcpBindPort = 7098
auth.token = "123456"
log.to = "/var/log/frps.log"
log.level = "debug"
log.maxDays = 15

frpc Version

0.61.1

frps Version

0.61.1

System Architecture

linux/amd64 linux/arm64

Configurations

客户端配置如下

serverAddr = "..*.*手动打码"
serverPort = 7098
auth.token = "123456"
log.to = "/var/log/frpc.log"
log.level = "info"
log.maxDays = 7
transport.protocol = "kcp"
loginFailExit = true

proxies
name = "conf1"
type = "tcp"
localIP = "127.0.0.1"
localPort = 9090
remotePort = 9090

服务端配置如下
bindPort = 7098
kcpBindPort = 7098
auth.token = "123456"
log.to = "/var/log/frps.log"
log.level = "debug"
log.maxDays = 15

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 @qq761861 on GitHub (Dec 18, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4593 ### Bug Description 2024-12-18 12:39:16.427 [I] [client/service.go:295] try to connect to server... 2024-12-18 12:39:26.430 [W] [client/service.go:298] connect to server error: connection write timeout 2024-12-18 12:39:26.431 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped 2024-12-18 12:39:31.682 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml] 2024-12-18 12:39:31.683 [I] [client/service.go:295] try to connect to server... 2024-12-18 12:39:41.686 [W] [client/service.go:298] connect to server error: connection write timeout 2024-12-18 12:39:41.686 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped 2024-12-18 12:39:46.926 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml] 2024-12-18 12:39:46.927 [I] [client/service.go:295] try to connect to server... 2024-12-18 12:39:56.930 [W] [client/service.go:298] connect to server error: connection write timeout 2024-12-18 12:39:56.931 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped 2024-12-18 12:40:02.186 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml] 2024-12-18 12:40:02.186 [I] [client/service.go:295] try to connect to server... 2024-12-18 12:40:12.188 [W] [client/service.go:298] connect to server error: connection write timeout 2024-12-18 12:40:12.189 [I] [sub/root.go:160] frpc service for config file [/data/frp/frpc.toml] stopped 2024-12-18 12:40:17.426 [I] [sub/root.go:142] start frpc service for config file [/data/frp/frpc.toml] 2024-12-18 12:40:17.427 [I] [client/service.go:295] try to connect to server... ![image](https://github.com/user-attachments/assets/928d7d79-6ee8-450c-bbf2-657cc58dbf43) 取消客户端配置文件中的transport.protocol = "kcp"参数就可以恢复正常链接 客户端可以通过nmap扫描到服务端端口是启用状态的 客户端配置如下 serverAddr = "*.*.*.*手动打码" serverPort = 7098 auth.token = "123456" log.to = "/var/log/frpc.log" log.level = "info" log.maxDays = 7 transport.protocol = "kcp" loginFailExit = true [[proxies]] name = "conf1" type = "tcp" localIP = "127.0.0.1" localPort = 9090 remotePort = 9090 服务端配置如下 bindPort = 7098 kcpBindPort = 7098 auth.token = "123456" log.to = "/var/log/frps.log" log.level = "debug" log.maxDays = 15 ### frpc Version 0.61.1 ### frps Version 0.61.1 ### System Architecture linux/amd64 linux/arm64 ### Configurations 客户端配置如下 serverAddr = "*.*.*.*手动打码" serverPort = 7098 auth.token = "123456" log.to = "/var/log/frpc.log" log.level = "info" log.maxDays = 7 transport.protocol = "kcp" loginFailExit = true [[proxies]] name = "conf1" type = "tcp" localIP = "127.0.0.1" localPort = 9090 remotePort = 9090 服务端配置如下 bindPort = 7098 kcpBindPort = 7098 auth.token = "123456" log.to = "/var/log/frps.log" log.level = "debug" log.maxDays = 15 ### 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:19:50 -06:00
Author
Owner

@xqzr commented on GitHub (Dec 20, 2024):

开放 UDP 7098

<!-- gh-comment-id:2557660803 --> @xqzr commented on GitHub (Dec 20, 2024): 开放 UDP 7098
Author
Owner

@qq761861 commented on GitHub (Dec 21, 2024):

开放 UDP 7098

防火墙是关闭状态的

<!-- gh-comment-id:2558034740 --> @qq761861 commented on GitHub (Dec 21, 2024): > 开放 UDP 7098 防火墙是关闭状态的
Author
Owner

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

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

<!-- gh-comment-id:2571454075 --> @github-actions[bot] commented on GitHub (Jan 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#3629
No description provided.