[GH-ISSUE #4271] frp一段时间后失去连接 #3369

Closed
opened 2026-05-05 14:10:22 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ZJahon on GitHub (Jun 7, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4271

Bug Description

使用https2http插件后,设置了ssl证书,一开始网站可以访问,一段时间后不知道是什么原因,网站开始无法访问了。重启后几分钟内又可以访问,过段时间后又不能访问了。
start error: gen TLS config error: open ./etc/aaa.crt: no such file or directory。
证书可以确定是一直存在的。frps dashboard里显示客户端状态offline。
image

frpc Version

0.51.3

frps Version

0.53.2

System Architecture

linux/amd64 for openwrt

Configurations

server:
[common]
bind_port = a_port
token = token
tcp_mux = true
tls_only = false
bind_udp_port = b_port
kcp_bind_port = a_port
vhost_http_port = c_port
vhost_https_port = d_port
log_file = /var/log/frps.log
log_level = trace
log_max_days = 3
disable_log_color = false
max_ports_per_client = 0
dashboard_addr = 0.0.0.0
dashboard_port = 7500

client:
[common]
server_addr=server_addr
server_port=a_port
token=token
user=countryf2
log_level=info
log_max_days=3
protocol=kcp
log_file=/var/etc/frp/frpc.log
tcp_mux=true
tls_enable=true
login_fail_exit=false

[vc]
type=https
custom_domains=custom_domains
plugin=https2http
plugin_local_addr=localip:localport
plugin_crt_path=./etc/aaa.crt
plugin_key_path=./etc/aaa.key
plugin_host_header_rewrite=localip
plugin_header_X_From_Where=frp
use_encryption=true
use_compression=true

Logs

调整成trace后的日志:
2024/06/07 11:59:02 [D] [proxy_wrapper.go:255] [85e2959ba74a35c7] [countryf2.vc] start a new work connection, localAddr: 0.0.0.0:45843 remoteAddr: internetip:internetport
2024/06/07 11:59:02 [T] [proxy.go:135] [85e2959ba74a35c7] [countryf2.vc] handle tcp work connection, use_encryption: true, use_compression: true
2024/06/07 11:59:02 [D] [proxy.go:185] [85e2959ba74a35c7] [countryf2.vc] handle by plugin: https2http
2024/06/07 11:59:02 [D] [proxy.go:185] [85e2959ba74a35c7] [countryf2.vc] handle by plugin: https2http
2024/06/07 11:59:02 [D] [proxy.go:187] [85e2959ba74a35c7] [countryf2.vc] handle by plugin finished
2024/06/07 11:59:02 [D] [proxy.go:187] [85e2959ba74a35c7] [countryf2.vc] handle by plugin finished
2024/06/07 11:59:11 [D] [control.go:296] [85e2959ba74a35c7] send heartbeat to server
2024/06/07 11:59:11 [D] [control.go:329] [85e2959ba74a35c7] receive heartbeat from server
2024/06/07 11:59:41 [D] [control.go:296] [85e2959ba74a35c7] send heartbeat to server
2024/06/07 11:59:41 [D] [control.go:329] [85e2959ba74a35c7] receive heartbeat from server
2024/06/07 12:00:00 [I] [visitor_manager.go:77] [85e2959ba74a35c7] gracefully shutdown visitor manager
2024/06/07 12:00:00 [D] [control.go:228] [85e2959ba74a35c7] read from control connection EOF
2024/06/07 12:00:00 [I] [control.go:252] [85e2959ba74a35c7] control writer is closing
2024/06/07 12:00:00 [I] [root.go:236] frpc service for config file [/var/etc/frp/frpc.conf] stopped
2024/06/07 12:00:00 [T] [control.go:150] [85e2959ba74a35c7] work connection closed before response StartWorkConn message: EOF
2024/06/07 12:00:01 [I] [root.go:220] start frpc service for config file [/var/etc/frp/frpc.conf]
2024/06/07 12:00:01 [I] [service.go:301] [cbd167a1552a767e] login to server success, get run id [cbd167a1552a767e]
2024/06/07 12:00:01 [I] [proxy_manager.go:150] [cbd167a1552a767e] proxy added: [countryf2.vc]
2024/06/07 12:00:01 [T] [proxy_wrapper.go:195] [cbd167a1552a767e] [countryf2.vc] change status from [new] to [wait start]
2024/06/07 12:00:01 [W] [control.go:170] [cbd167a1552a767e] [countryf2.vc] start error: gen TLS config error: open ./etc/aaa.crt: no such file or directory
2024/06/07 12:00:31 [D] [control.go:296] [cbd167a1552a767e] send heartbeat to server
2024/06/07 12:00:31 [D] [control.go:329] [cbd167a1552a767e] receive heartbeat from server
2024/06/07 12:00:34 [T] [proxy_wrapper.go:195] [cbd167a1552a767e] [countryf2.vc] change status from [start error] to [wait start]
2024/06/07 12:00:34 [W] [control.go:170] [cbd167a1552a767e] [countryf2.vc] start error: gen TLS config error: open ./etc/aaa.crt: no such file or directory

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 @ZJahon on GitHub (Jun 7, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4271 ### Bug Description 使用https2http插件后,设置了ssl证书,一开始网站可以访问,一段时间后不知道是什么原因,网站开始无法访问了。重启后几分钟内又可以访问,过段时间后又不能访问了。 start error: gen TLS config error: open ./etc/aaa.crt: no such file or directory。 证书可以确定是一直存在的。frps dashboard里显示客户端状态offline。 ![image](https://github.com/fatedier/frp/assets/19531872/80bdacf9-09cf-4e94-8950-d5642284f048) ### frpc Version 0.51.3 ### frps Version 0.53.2 ### System Architecture linux/amd64 for openwrt ### Configurations server: [common] bind_port = a_port token = token tcp_mux = true tls_only = false bind_udp_port = b_port kcp_bind_port = a_port vhost_http_port = c_port vhost_https_port = d_port log_file = /var/log/frps.log log_level = trace log_max_days = 3 disable_log_color = false max_ports_per_client = 0 dashboard_addr = 0.0.0.0 dashboard_port = 7500 client: [common] server_addr=server_addr server_port=a_port token=token user=countryf2 log_level=info log_max_days=3 protocol=kcp log_file=/var/etc/frp/frpc.log tcp_mux=true tls_enable=true login_fail_exit=false [vc] type=https custom_domains=custom_domains plugin=https2http plugin_local_addr=localip:localport plugin_crt_path=./etc/aaa.crt plugin_key_path=./etc/aaa.key plugin_host_header_rewrite=localip plugin_header_X_From_Where=frp use_encryption=true use_compression=true ### Logs 调整成trace后的日志: 2024/06/07 11:59:02 [D] [proxy_wrapper.go:255] [85e2959ba74a35c7] [countryf2.vc] start a new work connection, localAddr: 0.0.0.0:45843 remoteAddr: internetip:internetport 2024/06/07 11:59:02 [T] [proxy.go:135] [85e2959ba74a35c7] [countryf2.vc] handle tcp work connection, use_encryption: true, use_compression: true 2024/06/07 11:59:02 [D] [proxy.go:185] [85e2959ba74a35c7] [countryf2.vc] handle by plugin: https2http 2024/06/07 11:59:02 [D] [proxy.go:185] [85e2959ba74a35c7] [countryf2.vc] handle by plugin: https2http 2024/06/07 11:59:02 [D] [proxy.go:187] [85e2959ba74a35c7] [countryf2.vc] handle by plugin finished 2024/06/07 11:59:02 [D] [proxy.go:187] [85e2959ba74a35c7] [countryf2.vc] handle by plugin finished 2024/06/07 11:59:11 [D] [control.go:296] [85e2959ba74a35c7] send heartbeat to server 2024/06/07 11:59:11 [D] [control.go:329] [85e2959ba74a35c7] receive heartbeat from server 2024/06/07 11:59:41 [D] [control.go:296] [85e2959ba74a35c7] send heartbeat to server 2024/06/07 11:59:41 [D] [control.go:329] [85e2959ba74a35c7] receive heartbeat from server 2024/06/07 12:00:00 [I] [visitor_manager.go:77] [85e2959ba74a35c7] gracefully shutdown visitor manager 2024/06/07 12:00:00 [D] [control.go:228] [85e2959ba74a35c7] read from control connection EOF 2024/06/07 12:00:00 [I] [control.go:252] [85e2959ba74a35c7] control writer is closing 2024/06/07 12:00:00 [I] [root.go:236] frpc service for config file [/var/etc/frp/frpc.conf] stopped 2024/06/07 12:00:00 [T] [control.go:150] [85e2959ba74a35c7] work connection closed before response StartWorkConn message: EOF 2024/06/07 12:00:01 [I] [root.go:220] start frpc service for config file [/var/etc/frp/frpc.conf] 2024/06/07 12:00:01 [I] [service.go:301] [cbd167a1552a767e] login to server success, get run id [cbd167a1552a767e] 2024/06/07 12:00:01 [I] [proxy_manager.go:150] [cbd167a1552a767e] proxy added: [countryf2.vc] 2024/06/07 12:00:01 [T] [proxy_wrapper.go:195] [cbd167a1552a767e] [countryf2.vc] change status from [new] to [wait start] 2024/06/07 12:00:01 [W] [control.go:170] [cbd167a1552a767e] [countryf2.vc] start error: gen TLS config error: open ./etc/aaa.crt: no such file or directory 2024/06/07 12:00:31 [D] [control.go:296] [cbd167a1552a767e] send heartbeat to server 2024/06/07 12:00:31 [D] [control.go:329] [cbd167a1552a767e] receive heartbeat from server 2024/06/07 12:00:34 [T] [proxy_wrapper.go:195] [cbd167a1552a767e] [countryf2.vc] change status from [start error] to [wait start] 2024/06/07 12:00:34 [W] [control.go:170] [cbd167a1552a767e] [countryf2.vc] start error: gen TLS config error: open ./etc/aaa.crt: no such file or directory ### 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:10:22 -06:00
Author
Owner

@xqzr commented on GitHub (Jun 8, 2024):

检查 ./etc/aaa.crt 文件是否存在

<!-- gh-comment-id:2155893078 --> @xqzr commented on GitHub (Jun 8, 2024): 检查 `./etc/aaa.crt` 文件是否存在
Author
Owner

@github-actions[bot] commented on GitHub (Jun 30, 2024):

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

<!-- gh-comment-id:2198386675 --> @github-actions[bot] commented on GitHub (Jun 30, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d 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#3369
No description provided.