-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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
Tons of Socks5() connect to x.x.x.x:8333 failed: connection refused-messages when i use TOR - why? #29759
Comments
Installed as described on https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service AND 1.) "usermod -a -G debian-tor BITCOIN_USER" instead of "usermod -a -G tor BITCOIN_USER" 2.) Then a OS restart after that user / group permission change thing |
(BITCOIN_USER = root) |
Maybe the problem is that IPv6 is disabled via sysctl.conf on that system? |
Similar problem here? |
Nobody knows what the problem is? |
What exact commit did you compile from? Does it include #29649 ? |
How can i get the version number from the source i've got from master GIT repo i've compiled? |
`git rev-parse HEAD`
…On Fri, Mar 29, 2024 at 6:19 PM Patrick Meier ***@***.***> wrote:
How can i get the version number from the source i've got from master GIT
repo i've compiled?
—
Reply to this email directly, view it on GitHub
<#29759 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAP46KDMFYCP5IMQHMOLDOLY2XLEVAVCNFSM6AAAAABFNGD3QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRXG44DOMJTGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I also get these errors sometimes when running with Tor. While they appear on some outgoing connection attempts, other connections are successful, so there seems to be nothing wrong on my end fundamentally. While a timout does not lead to a log entry in debug.log, answers from the SOCKS5 proxy with "general failure" and "connection refused" are logged, and it is not clear to me when which of the three happens. So I wonder if this happens every time and you can't make successful connections, or only sporadically (in which case the only problem might be overzealous logging). |
…essages when i use TOR - why? Fixes bitcoin#29759
As @mzumsande mentioned above, some errors like these are normal because they are printed whenever we fail to connect to a Tor peer. Not all Tor peers are online all the time. Does If you cannot establish any connection to a Tor node, then there is a real problem in your setup.
This error comes from the Socks5 proxy (aka the Tor daemon) if it cannot connect to the destination we asked for. Do you get only IP addresses in those messages ( There is an inconsistency wrt logging connection failures: IPv4 and IPv6 connection failures are logged only if running with Line 551 in 3b987d0
Line 574 in 3b987d0
whereas Tor connection failures are logged as errors unconditionally: Line 448 in 3b987d0
PS this is different from #25094 - the current issue is about errors when trying to establish outbound connections. That issue is about not being able to accept incoming connections (because we couldn't communicate properly to the Tor daemon where to redirect those incoming connections to). |
For me, the Tor daemon also behaves inconsistently (Ubuntu). |
The source code from the master branch i've compiled is: |
|
"Do you get only IP addresses in those messages (x.x.x.x) or also onion addresses (e.g. ydvbxdzs6w5wefifiqsqntpbd7tliofenqih5hlnz34546fvy4ab7iid.onion)?" No, only for IP addresses as shown on post above. (other kind of message, but same host / ip and also same port) @vasild |
Maybe it's an idea to check these servers (they will be listed via console output) via "telnet [IP_ADDRESS] 8333"... If i dont get an anwser from telnet (TCP), then the problem is on these hosts / servers. If i get an answser, there is a problem on my side |
It is expected to have some Bitcoin nodes unreachable some of the time. A failure to connect to an IPv4 or IPv6 node is already properly logged under category=net/severity=debug. Do the same when a connection fails when using a SOCKS5 proxy. This could be either to an .onion address or to an IPv4 or IPv6 address (via a Tor exit node). Related: bitcoin#29759
Addressed in #30064 |
ok thx |
It is expected to have some Bitcoin nodes unreachable some of the time. A failure to connect to an IPv4 or IPv6 node is already properly logged under category=net/severity=debug. Do the same when a connection fails when using a SOCKS5 proxy. This could be either to an .onion address or to an IPv4 or IPv6 address (via a Tor exit node). Related: bitcoin#29759
closed |
Is there an existing issue for this?
Current behaviour
Gets tons of Socks5() connect to x.x.x.x:8333 failed: connection refused-messages
Expected behaviour
No messages like that
Steps to reproduce
install tor via apt-get
add that to /etc/tor/torrc file:
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
restart tor service
add that to ~/.bitcoin/bitcoin.conf file:
proxy=127.0.0.1:9050
listen=1
bind=127.0.0.1
start bitcoind service
Relevant log output
Many lines like that:
Socks5() connect to x.x.x.x:8333 failed: connection refused
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
Most current
Operating system and version
Debian 12.5.x
Machine specifications
Oracle VirtualBox VM, Debian 12.5.x on Windows 10 Pro x64 Host System
The text was updated successfully, but these errors were encountered: