-
Notifications
You must be signed in to change notification settings - Fork 63
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
Reconnections fail (perhaps only via tor) #205
Comments
It may be helpful if you could provide some Tor logs too, I'm pretty clueless otherwise. Also, does this happens only with your tower? Have you tried others running over Tor? (e.g. #158 (comment)) |
I currently only use my own tower. |
I actually meant logs from the Tor daemon (on the client site indeed). You may also increase deps verbosity to see if something is being logged in the plugin logs. |
deps verbosity? |
Oh sorry, nvm, we only have that distinction on the tower-side, not on the client side (the tower side does only log lines regarding dependencies if they are above warning). Increasing the debug verbosity might help indeed. |
Eh. Well. We'll see.
after a few seconds... Previously I didn't see it retrying at all. |
This is more the expected behavior. If a post request times out or cannot reach its destination, a retrier is created and data is passed to it. The retrier implements an exponential backoff strategy until the data is finally delivered, or it ends up giving up. |
I still think something is amiss here. |
I don't think I follow
Code-wise we don't do anything out of the ordinary here. If a proxy is provided, we just proxy the request through it. I'm not an expert using Tor though so I may be missing something. Let me know if there is anything I can help with, I've been running a tower on Tor for months so if something is iffy I may be able to find some useful logs. |
Yeah, ok. What I was thinking that when the tower is abandoned and re-registered the reconnection attempt is different from a retry. I have no detailed insights into tor either (and I haven't checked what you do in the code), but afaik re-creating the connection to the tor socks proxy will result in requesting a new circuit, while re-use won't. So, if the circuit is broken making the reconnect fail, abandonment will likely necessarily discard the connection and re-registration will create a new connection to the socks proxy thereby resulting in a new circuit being built. |
Nope, the only piece of network related info we store for a tower is its onion address. No circuit/connection info. Thus, abandoning a tower shouldn't do anything special. One question though: can an application using Tor as a proxy only (no access to control port) request a new circuit? |
I think I already answered your question above. :) |
My bad xD.
This means we actually use a new circuit every post request. rust-teos/watchtower-plugin/src/net/http.rs Lines 166 to 172 in 886e0ff
|
I don't know how it works behind the scenes. Some APIs cache and reuse sockets. I think the magic on the tor side relies on the client address (this does not work for unix domain sockets, but that can be disregarded here). So, to get a new circuit one needs to change the source port of the call. |
I've recently started to use this. I set up a teosd service with tor support (using communication with tor's control port). The cln client (v22.11) always uses a proxy.
The problem is that it works for a while and then just stops. I get like repeats of
This goes on for hours.
Abandoning the tower on the client side and re-registering it makes it work for a while again - without touching the server.
The client and server are on different systems, different Internet links, and use different tor daemons (for clarity). Both sides use tor v0.4.7.13.
The text was updated successfully, but these errors were encountered: