Can't Connect to Peers #21360

issue adu-web3 opened this issue on March 4, 2021
  1. adu-web3 commented at 12:25 PM on March 4, 2021: none

    node can't connect to peers and start to sync node keeps get erros :socket recv error Connection reset by peer (104) logs: 021-03-04T12:04:37Z Opening LevelDB in /home/XXX/bitcoin-0.19.1/data/indexes/txindex 2021-03-04T12:04:37Z Opened LevelDB successfully 2021-03-04T12:04:37Z Using obfuscation key for /home/XXX/bitcoin-0.19.1/data/indexes/txindex: 0000000000000000 2021-03-04T12:04:37Z init message: Loading wallet... 2021-03-04T12:04:37Z BerkeleyEnvironment::Open: LogDir=/home/XXX/bitcoin-0.19.1/data/database ErrorFile=/home/meiya/bitcoin-0.19.1/data/db.log 2021-03-04T12:04:37Z txindex thread start 2021-03-04T12:04:37Z txindex is enabled at height 0 2021-03-04T12:04:37Z txindex thread exit 2021-03-04T12:04:37Z [default wallet] Wallet File Version = 169900 2021-03-04T12:04:37Z [default wallet] Keys: 2001 plaintext, 0 encrypted, 2001 w/ metadata, 2001 total. Unknown wallet records: 0 2021-03-04T12:04:37Z [default wallet] Wallet completed loading in 150ms 2021-03-04T12:04:37Z [default wallet] setKeyPool.size() = 2000 2021-03-04T12:04:37Z [default wallet] mapWallet.size() = 0 2021-03-04T12:04:37Z [default wallet] mapAddressBook.size() = 0 2021-03-04T12:04:37Z block tree size = 1 2021-03-04T12:04:37Z nBestHeight = 0 2021-03-04T12:04:37Z Imported mempool transactions from disk: 0 succeeded, 0 failed, 0 expired, 0 already there 2021-03-04T12:04:37Z torcontrol thread start 2021-03-04T12:04:37Z Bound to [::]:38330 2021-03-04T12:04:37Z Bound to 0.0.0.0:38330 2021-03-04T12:04:37Z init message: Loading P2P addresses... 2021-03-04T12:04:37Z Loaded 211 addresses from peers.dat 1ms 2021-03-04T12:04:37Z init message: Starting network threads... 2021-03-04T12:04:37Z net thread start 2021-03-04T12:04:37Z dnsseed thread start 2021-03-04T12:04:37Z init message: Done loading 2021-03-04T12:04:37Z opencon thread start 2021-03-04T12:04:37Z addcon thread start 2021-03-04T12:04:37Z msghand thread start 2021-03-04T12:04:38Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:38Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:45Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:45Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:46Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:48Z Loading addresses from DNS seed seed.bitcoin.sipa.be 2021-03-04T12:04:48Z Loading addresses from DNS seed dnsseed.bitcoin.dashjr.org 2021-03-04T12:04:49Z Loading addresses from DNS seed dnsseed.bluematt.me 2021-03-04T12:04:53Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:55Z socket recv error Connection reset by peer (104) 2021-03-04T12:04:57Z socket recv error Connection reset by peer (104) ^C2021-03-04T12:04:58Z tor: Thread interrupt 2021-03-04T12:04:58Z Shutdown: In progress... 2021-03-04T12:04:58Z dnsseed thread exit 2021-03-04T12:04:58Z torcontrol thread exit 2021-03-04T12:04:58Z addcon thread exit 2021-03-04T12:04:58Z msghand thread exit 2021-03-04T12:04:58Z net thread exit 2021-03-04T12:04:58Z opencon thread exit 2021-03-04T12:04:59Z scheduler thread interrupt 2021-03-04T12:04:59Z Dumped mempool: 3e-06s to copy, 0.037136s to dump 2021-03-04T12:04:59Z [default wallet] Releasing wallet 2021-03-04T12:04:59Z Shutdown: done

    cmd: bin/bitcoind -datadir="./data" -txindex=1 -listen=1 -server=1 -port=38330 -upnp -rpcport=8030 -rpcbind="0.0.0.0" -rpcallowip="0.0.0.0/0" -rpcuser="admin" -rpcpassword="admin"

  2. adu-web3 added the label Bug on Mar 4, 2021
  3. jarolrod commented at 2:19 PM on March 4, 2021: member

    what is your Operating System? some more context behind how you run bitcoin? Maybe check your firewall settings as it seems Peer connections are automatically disconnected.

    Seems related: https://github.com/bitcoin/bitcoin/issues/17247

  4. MarcoFalke commented at 3:35 PM on March 4, 2021: member

    Which hardware? The peers could be disconnected due to timeout?

  5. adu-web3 commented at 9:41 AM on March 5, 2021: none

    a server in a private network , with ubuntu 18 os It seems that the bitcoind was identified as trojan so connections kept get reset After I added bitcoind to whitelist however, the net thread seemed hang up and was never able to connect to other peers or log any errors this is the logs: 2021-03-05T09:40:46Z loadblk thread exit 2021-03-05T09:40:46Z Bound to [::]:8333 2021-03-05T09:40:46Z Bound to 0.0.0.0:8333 2021-03-05T09:40:46Z Bound to 127.0.0.1:8334 2021-03-05T09:40:46Z init message: Loading P2P addresses... 2021-03-05T09:40:46Z torcontrol thread start 2021-03-05T09:40:46Z Loaded 0 addresses from peers.dat 0ms 2021-03-05T09:40:46Z ERROR: DeserializeFileDB: Failed to open file /home/meiya/bitcoin-0.21.0/bitcoin_data/anchors.dat 2021-03-05T09:40:46Z 0 block-relay-only anchors will be tried for connections. 2021-03-05T09:40:46Z init message: Starting network threads... 2021-03-05T09:40:46Z net thread start 2021-03-05T09:40:46Z dnsseed thread start 2021-03-05T09:40:46Z addcon thread start 2021-03-05T09:40:46Z init message: Done loading 2021-03-05T09:40:46Z opencon thread start 2021-03-05T09:40:46Z Loading addresses from DNS seed dnsseed.bitcoin.dashjr.org 2021-03-05T09:40:46Z msghand thread start 2021-03-05T09:40:47Z Loading addresses from DNS seed seed.bitcoin.wiz.biz 2021-03-05T09:40:49Z Loading addresses from DNS seed dnsseed.bluematt.me 2021-03-05T09:40:49Z Loading addresses from DNS seed seed.bitcoin.sprovoost.nl 2021-03-05T09:40:51Z Loading addresses from DNS seed seed.bitcoin.jonasschnelli.ch 2021-03-05T09:40:51Z Loading addresses from DNS seed seed.bitcoin.sipa.be 2021-03-05T09:40:53Z Loading addresses from DNS seed seed.bitcoinstats.com 2021-03-05T09:40:53Z Loading addresses from DNS seed seed.btc.petertodd.org 2021-03-05T09:40:54Z Loading addresses from DNS seed dnsseed.emzy.de 2021-03-05T09:40:54Z 237 addresses found from DNS seeds 2021-03-05T09:40:54Z dnsseed thread exit

    after "dnsseed thread exit", there was no any other logs

  6. adu-web3 commented at 3:14 AM on March 8, 2021: none

    After I restart with debug opetion "-debug=net", I got these logs

    2021-03-08T03:13:40Z trying connection [2a03:b0c0:3:d0::f00:d001]:8333 lastseen=107.5hrs 2021-03-08T03:13:40Z connect() to [2a03:b0c0:3:d0::f00:d001]:8333 failed: Network is unreachable (101) 2021-03-08T03:13:40Z trying connection 77.134.172.81:8333 lastseen=101.8hrs 2021-03-08T03:13:40Z Added connection peer=13 2021-03-08T03:13:40Z sending version (102 bytes) peer=13 2021-03-08T03:13:40Z send version message: version 70016, blocks=0, us=[::]:0, peer=13 2021-03-08T03:13:40Z socket recv error for peer=13: Connection reset by peer (104) 2021-03-08T03:13:40Z disconnecting peer=13 2021-03-08T03:13:40Z Cleared nodestate for peer=13 2021-03-08T03:13:41Z trying connection 213.148.199.23:8333 lastseen=184.4hrs 2021-03-08T03:13:41Z Added connection peer=14 2021-03-08T03:13:41Z sending version (102 bytes) peer=14 2021-03-08T03:13:41Z send version message: version 70016, blocks=0, us=[::]:0, peer=14 2021-03-08T03:13:41Z socket recv error for peer=14: Connection reset by peer (104) 2021-03-08T03:13:41Z disconnecting peer=14 2021-03-08T03:13:41Z Cleared nodestate for peer=14 2021-03-08T03:13:42Z trying connection [240e:38a:85b5:8600:b403:ed05:b2aa:f01f]:8333 lastseen=145.6hrs 2021-03-08T03:13:42Z connect() to [240e:38a:85b5:8600:b403:ed05:b2aa:f01f]:8333 failed: Network is unreachable (101) 2021-03-08T03:13:42Z trying connection 185.209.70.17:8333 lastseen=120.5hrs 2021-03-08T03:13:42Z Added connection peer=15 2021-03-08T03:13:42Z sending version (102 bytes) peer=15 2021-03-08T03:13:42Z send version message: version 70016, blocks=0, us=[::]:0, peer=15 2021-03-08T03:13:42Z socket recv error for peer=15: Connection reset by peer (104) 2021-03-08T03:13:42Z disconnecting peer=15 2021-03-08T03:13:42Z Cleared nodestate for peer=15 2021-03-08T03:13:43Z trying connection [2001:0:4137:9e76:34bb:2f1f:a952:3394]:8333 lastseen=85.1hrs 2021-03-08T03:13:43Z connect() to [2001:0:4137:9e76:34bb:2f1f:a952:3394]:8333 failed: Network is unreachable (101) 2021-03-08T03:13:43Z trying connection 188.25.205.82:8333 lastseen=106.6hrs 2021-03-08T03:13:44Z connect() to 188.25.205.82:8333 failed after select(): Connection refused (111) 2021-03-08T03:13:44Z trying connection [2001:0:4137:9e76:9:139:ad7e:c3bf]:8333 lastseen=73.6hrs 2021-03-08T03:13:44Z connect() to [2001:0:4137:9e76:9:139:ad7e:c3bf]:8333 failed: Network is unreachable (101)

  7. jarolrod commented at 3:18 AM on March 8, 2021: member

    @Muggle-Du Are you running this on a corporate or university network? It seems as though this is related to a Firewall or ISP blocking the connection to the network.

  8. jarolrod commented at 3:27 AM on March 8, 2021: member

    @Muggle-Du One thing to try following from this comment, what happens if you add -onlynet=ipv4

  9. adu-web3 commented at 11:41 AM on March 8, 2021: none

    Yes, in a corporate network Well, I could "telnet 'peer' 8333" and scan the tcp port with nmap, but I just kept getting reset by peers and -onlynet=ipv4 doesn't work

  10. jonatack commented at 1:35 PM on March 30, 2021: member

    @Muggle-Du is this resolved?

  11. MarcoFalke commented at 5:54 PM on March 30, 2021: member

    This is probably a network rule on your private network

  12. MarcoFalke closed this on Mar 30, 2021

  13. bg002h commented at 5:10 AM on April 3, 2021: none

    I noticed a similar issue running an offline set of nodes getting fed data from Blockstream satellite (a fork of core 0.19). If I hook up my home satellite node network to the internet, all nodes can make connections to the outside world. But running offline (satellite only), perplexingly 2 of the 3 nodes won’t connect to each other (but both connect to the remaining node), despite firewall being configured correctly & whitelisted & even addnode= & connect= in the config file doesn’t work.

    For my use case it is inconsequential (I have satellite data multicast to every node on the switch), but I thought it odd behavior.

  14. maximlomans commented at 12:56 PM on May 2, 2022: none

    Depends on your network setup; i.e. if you're connecting through isp's gateway or if you have a router behind it, which would create a conflict between nat / port farwding | isp gateway fw rules which you should have access to....

  15. DrahtBot locked this on May 2, 2023

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-26 09:14 UTC

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