Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frp一段时间后失去连接 #4271

Open
11 tasks
ZJahon opened this issue Jun 7, 2024 · 1 comment
Open
11 tasks

frp一段时间后失去连接 #4271

ZJahon opened this issue Jun 7, 2024 · 1 comment

Comments

@ZJahon
Copy link

ZJahon commented Jun 7, 2024

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
@xqzr
Copy link

xqzr commented Jun 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants