mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1842] Sleep can break ability to reconnect #1454
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1454
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @keyoti on GitHub (Jun 5, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1842
I am seeing a lot of this in my logs
What version of frp are you using (./frpc -v or ./frps -v)?
0.33.0
What operating system and processor architecture are you using (
go env)?Server is Ubuntu x64, client is Windows 10
Configures you used:
Running FRPS as a TCP backend node behind HAProxy
HTTPS proxy service only
Steps to reproduce the issue:
Describe the results you received:
frpc cannot reconnect properly, it keeps trying to reconnect and stalls. User must kill frpc manually and restart it.
Describe the results you expected:
frpc should be able to reconnect like normal
Additional information you deem important (e.g. issue happens only occasionally):
I am new at Go, but I suspect the problem is because of this:
In server Service.RegisterControl, you do
In my situation I don't think ctl.Start() is ever called because oldCtl.allShutdown.WaitDone() is hanging.
oldCtl.allShutdown.WaitDone() is:
Is it true that a channel can block indefinitely if the TCP connection is dead? Is it possible to time it out?
Thanks!
@fatedier commented on GitHub (Jun 5, 2020):
You can check if your log has
client exit successmessage? It means your old control was stopped andallShutdown.Done()has been called.So
allShutdown.WaitDone()will not be blocked.Set log_level to
debugto see more info. You may also see if your client relogin success from logs of frpc.@keyoti commented on GitHub (Jun 11, 2020):
It is logging
client exit successfor some clients at some times. But I just reproduced the problem and for my client it is not logging that.I set it to trace and this is what I am seeing right now on my server and client:
FRPS:
FRPC:
I will try to debug further tomorrow, hopefully I can see on the client what is happening.
@keyoti commented on GitHub (Jun 11, 2020):
Ok, I'm sorry it seems to only be present in my fork, because I added to client admin API the ability to close proxies; The reconnect issue is only present when there are no proxies in use.
So I will figure it out, but in case it is of any use to anyone here is how I remove proxies in client/admin_api.go
@fatedier commented on GitHub (Jun 12, 2020):
@keyoti Maybe we can support
add, update, deleteproxies API in the future.Now frpc only support reload proxies configures by configuration file. The simple way to do this is to translate
add, update, deleteoperation to modify configurion file and call reload API. So frpc will compare the difference and do corresponding operations.