connect() to 127.0.0.1:9050 failed after select(): Connection refused (111) #20439

issue Liongrass opened this issue on November 21, 2020
  1. Liongrass commented at 3:46 AM on November 21, 2020: none

    Expected behavior

    Until recently Core made outbound connections and I frequently saw up to 30 incoming connections via its onion address.

    Actual behavior

    Core is unable to connect through Tor or accept incoming connections through Tor. connect() to 127.0.0.1:9050 failed after select(): Connection refused (111)

    To reproduce

    I have configured Core to connect through the Tor Socks proxy at 127.0.0.1:9050. I have verified that the Tor Socks proxy is functional at this ip:port.

    bitcoin.conf

    listen=1
    externalip=rn2rjwuxfjzvjfkg2hmrduc2n7tjjpasrlianfskdhhhhfqqvf7kliyd.onion
    discover=1
    

    System information

    I'm running Bitcoin Core version v0.20.1, installed via Snap on Ubuntu 18.04.5 LTS

  2. Liongrass added the label Bug on Nov 21, 2020
  3. Saibato commented at 10:04 AM on November 21, 2020: contributor

    The onionrn2rjwuxfjzvjfkg2hmrduc2n7tjjpasrlianfskdhhhhfqqvf7kliyd.onion 8333is not reachable as of now over Tor, AFAICS

    Can u give some more hints, i.e. is ur node still running, from where u grabbed this onion address that u suppose is assigned to your running Tor instance and that is assigned to your bitcoin node?

    And most important, before u encountered that problem, did u restart or had to for any reasons had to restart your Bitcoin node with that configuration in the last week or so?

  4. Liongrass commented at 10:12 AM on November 21, 2020: none

    Correct, there is currently no service reachable behind that onion address, as all connections between Tor and Core fail

    The node is still running and up to date, I have connected it to a second node over the local network. Services on top of it (EPS, LND) are also running, LND uses the same Tor Socks proxy at the same port.

    The problem appeared as I was updating Ubuntu, below you can find a list of packages that were installed. I later also restarted Core and the computer.

    2020-11-20 13:44:11 install libdouble-conversion1:amd64 <none> 2.0.1-4ubuntu1
    2020-11-20 13:44:11 install libqt5core5a:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:12 install libqt5dbus5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:12 install libqt5network5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:12 install libxcb-xinerama0:amd64 <none> 1.13-2~ubuntu18.04
    2020-11-20 13:44:12 install libqt5gui5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:13 install libqt5widgets5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:13 install libqt5svg5:amd64 <none> 5.9.5-0ubuntu1
    2020-11-20 13:44:13 install libqt5xml5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:13 install libqt5designer5:amd64 <none> 5.9.5-0ubuntu1
    2020-11-20 13:44:13 install libqt5sql5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:14 install libqt5help5:amd64 <none> 5.9.5-0ubuntu1
    2020-11-20 13:44:14 install libqt5printsupport5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:14 install libqt5sql5-sqlite:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:14 install libqt5test5:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:14 install libsecp256k1-0:amd64 <none> 0.1~20170810-1
    2020-11-20 13:44:14 install python3-sip:amd64 <none> 4.19.7+dfsg-1ubuntu0.1
    2020-11-20 13:44:14 install python3-pyqt5:amd64 <none> 5.10.1+dfsg-1ubuntu2
    2020-11-20 13:44:15 install qt5-gtk-platformtheme:amd64 <none> 5.9.5+dfsg-0ubuntu2.5
    2020-11-20 13:44:15 install qttranslations5-l10n:all <none> 5.9.5-0ubuntu1
    
  5. Saibato commented at 10:23 AM on November 21, 2020: contributor

    The problem appeared as I was updating Ubuntu,

    Yup reboot, but probably unrelated to Ubuntu. could u tell me if u created the onion in torrc or with your bitcoins nodes call to the service api of your Tor instance?

    Would u mind to do some tests and not mind if we create a new onion? And I.e could u usenetcat -vv 127.0.0.1 9050and tell me if u have a connect? edit@saibato Did i read correct, LND running and has Tor inbound outbound?

  6. Liongrass commented at 10:30 AM on November 21, 2020: none

    Thanks for the netcat tip, this appears to be a Tor issue, I will investigate in that direction and close this issue. Although that does raise the issue of how LND is connecting through tor...

  7. Liongrass closed this on Nov 21, 2020

  8. Saibato commented at 10:45 AM on November 21, 2020: contributor

    Btw

    , I will investigate in that direction

    Tyi ur node is now up again .with that onion.

  9. Liongrass commented at 12:10 PM on November 21, 2020: none

    Yes, turned out to be a torrc config error. Sorry about the trouble, thanks for your help!

  10. eurobuddha commented at 7:51 AM on April 5, 2021: none

    what was the fix ihave the same issue?

  11. ghost commented at 6:24 PM on April 5, 2021: none

    I have exactly the same problem. I want to connect and accept connections using tor and running everything in docker.

    My config looks like:

    mainnet=1
    [main]
    printtoconsole=1
    rpcallowip=::/0
    rpcbind=0.0.0.0:8332
    rpcauth=xxx
    blockfilterindex=1
    mainnet=1
    whitelist=0.0.0.0/0
    rpcallowip=0.0.0.0/0
    zmqpubrawblock=tcp://0.0.0.0:28332
    zmqpubrawtx=tcp://0.0.0.0:28333
    listen=1
    discover=0
    torpassword=xxx
    onlynet=onion
    externalip=xxx.onion
    torcontrol=172.21.0.3:9051
    proxy=172.21.0.3:9050
    

    Wherein 172.21.0.3 is an ip to a docker container which is running tor 0.4.4 .

    What I want is a setup wherein only tor is used for inbound as well as outbound connections and run everything in docker.

    Somehow it constantly gives the error: connect() to 127.0.0.1:9050 failed after select(): Connection refused (111)

  12. DrahtBot locked this on Aug 18, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-19 18:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me