Bitcoin Forum
May 01, 2024, 04:09:38 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Rapid disconnections when connecting to Node  (Read 167 times)
Septem151 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 3


View Profile
November 01, 2019, 04:37:31 AM
Last edit: November 01, 2019, 04:57:23 AM by Septem151
Merited by OmegaStarScream (2), ABCbits (1)
 #1

Bitcoin Client Software and Version Number: Bitcoin Core v0.18.1
Operating System: Raspbian Buster Lite (Debian-based Linux ARM)
System Hardware Specs: Raspberry Pi 3B
Description of Problem:

Hello all,

I'm having a bit of a problem with my Bitcoin Core/LND node on rPi 3B.
I get consistent "socket recv error Connection reset by peer (104)" errors no matter what, and after it's been running for at least an hour+, when trying to connect to my node via Bisq, BRD wallet, etc., the connection rapidly shows disconnecting/reconnecting until I restart my node. I've scoured through search engines, stack overflow, and GitHub issues but cannot find any relevant information about the issue I'm having.

Here is my log file directly after rebooting my node:
Code:
04:09:50Z BerkeleyEnvironment::Open: LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
04:09:50Z init message: Loading banlist...
04:09:50Z Cache configuration:
04:09:50Z * Using 2.0 MiB for block index database
04:09:50Z * Using 8.0 MiB for chain state database
04:09:50Z * Using 90.0 MiB for in-memory UTXO set (plus up to 47.7 MiB of unused mempool space)
04:09:50Z init message: Loading block index...
04:09:50Z Opening LevelDB in /home/bitcoin/.bitcoin/blocks/index
04:09:51Z Opened LevelDB successfully
04:09:51Z Using obfuscation key for /home/bitcoin/.bitcoin/blocks/index: 0000000000000000
04:10:16Z LoadBlockIndexDB: last block file = 1847
04:10:16Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=38, size=48580126, heights=601823...601860, time=2019-10-31...2019-11-01)
04:10:16Z Checking all blk files are present...
04:10:19Z Opening LevelDB in /home/bitcoin/.bitcoin/chainstate
04:10:20Z Opened LevelDB successfully
04:10:20Z Using obfuscation key for /home/bitcoin/.bitcoin/chainstate: cab539f6ff7d156c
04:10:20Z Loaded best chain: hashBestChain=0000000000000000000ec48f0769d1bf63e7e7279383a586692a2e102e39af41 height=601860 date=2019-11-01T03:53:18Z progress=0.999992
04:10:20Z init message: Rewinding blocks...
04:10:23Z init message: Verifying blocks...
04:10:23Z Verifying last 6 blocks at level 3
04:10:23Z [0%]...[16%]...[33%]...[50%]...[66%]...[83%]...[99%]...[DONE].
04:12:15Z No coin database inconsistencies in last 6 blocks (15397 transactions)
04:12:15Z  block index          144777ms
04:12:15Z init message: Loading wallet...
04:12:15Z BerkeleyEnvironment::Open: LogDir=/home/bitcoin/.bitcoin/database ErrorFile=/home/bitcoin/.bitcoin/db.log
04:12:16Z [default wallet] nFileVersion = 180100
04:12:16Z [default wallet] Keys: 2004 plaintext, 0 encrypted, 8038 w/ metadata, 2004 total. Unknown wallet records: 0
04:12:16Z [default wallet] Wallet completed loading in             939ms
04:12:16Z [default wallet] setKeyPool.size() = 2000
04:12:16Z [default wallet] mapWallet.size() = 39
04:12:16Z [default wallet] mapAddressBook.size() = 6037
04:12:16Z mapBlockIndex.size() = 601890
04:12:16Z nBestHeight = 601860
04:12:16Z torcontrol thread start
04:12:16Z Bound to [::]:8333
04:12:16Z Bound to 0.0.0.0:8333
04:12:16Z init message: Loading P2P addresses...
04:12:16Z Leaving InitialBlockDownload (latching to false)
04:12:18Z Loaded 66644 addresses from peers.dat  1975ms
04:12:18Z init message: Starting network threads...
04:12:18Z dnsseed thread start
04:12:18Z addcon thread start
04:12:18Z net thread start
04:12:18Z opencon thread start
04:12:18Z init message: Done loading
04:12:18Z msghand thread start
04:12:29Z Loading addresses from DNS seeds (could take a while)
04:12:33Z New outbound peer connected: version: 70015, blocks=601861, peer=0
04:12:34Z New outbound peer connected: version: 70015, blocks=601861, peer=3
04:12:35Z 294 addresses found from DNS seeds
04:12:35Z dnsseed thread exit
04:13:02Z UpdateTip: new best=000000000000000000038fe8985eb2eef57c6909464013f90d091eec80113de6 height=601861 version=0x20000000 log2_work=91.282404 tx=470403581 date='2019-11-01T04:06:43Z' progress=0.999997 cache=1.1MiB(9625txo) warning='55 of last 100 blocks have unexpected version'
04:13:09Z New outbound peer connected: version: 70015, blocks=601861, peer=12
04:13:10Z New outbound peer connected: version: 70015, blocks=601861, peer=14
04:13:22Z New outbound peer connected: version: 70015, blocks=601861, peer=15
04:13:46Z New outbound peer connected: version: 70015, blocks=601860, peer=22
04:13:57Z New outbound peer connected: version: 70015, blocks=601861, peer=25
04:14:23Z socket recv error Connection reset by peer (104)
04:14:29Z New outbound peer connected: version: 70015, blocks=601861, peer=30
04:14:31Z New outbound peer connected: version: 70015, blocks=601861, peer=31
04:16:01Z New outbound peer connected: version: 70015, blocks=601861, peer=35
04:18:31Z socket recv error Connection reset by peer (104)
04:21:26Z New outbound peer connected: version: 70015, blocks=601861, peer=61
04:22:06Z socket recv error Connection reset by peer (104)
04:22:33Z New outbound peer connected: version: 70015, blocks=601861, peer=66
04:26:00Z New outbound peer connected: version: 70015, blocks=601861, peer=86
04:26:15Z ERROR: AcceptBlock: bad-witness-nonce-size, ContextualCheckBlock : invalid witness reserved value size (code 16)
04:26:15Z ERROR: ProcessNewBlock: AcceptBlock FAILED (bad-witness-nonce-size, ContextualCheckBlock : invalid witness reserved value size (code 16))
04:28:46Z Pre-allocating up to position 0x4000000 in blk01847.dat
04:29:29Z UpdateTip: new best=0000000000000000000e075cf8652dc96e8de7af288200c49f3159f1fdff99f7 height=601862 version=0x20000000 log2_work=91.282432 tx=470404928 date='2019-11-01T04:25:39Z' progress=0.999998 cache=7.1MiB(62668txo) warning='55 of last 100 blocks have unexpected version'
04:30:04Z UpdateTip: new best=000000000000000000047611e4add9f40a68345130a16fafc9a421f733d385c4 height=601863 version=0x20c00000 log2_work=91.28246 tx=470406814 date='2019-11-01T04:26:10Z' progress=0.999998 cache=7.6MiB(67331txo) warning='56 of last 100 blocks have unexpected version'
04:31:05Z Imported mempool transactions from disk: 6671 succeeded, 1576 failed, 0 expired, 5 already there

Any idea what's causing this? I've already tried uninstalling Bitcoin Core and reinstalling the latest version (0.18.1 as of the time of writing). I have port 8333 open to the IP of the Pi, and configured my firewall in the following manner:
Code:
To                         Action      From
--                         ------      ----
22                         ALLOW       10.0.0.0/24                # allow SSH from local LAN
Anywhere                   ALLOW       10.0.0.0/24 1900/udp       # allow local LAN SSDP for UPnP discovery
9735                       ALLOW       Anywhere                   # allow Lightning
8333                       ALLOW       Anywhere                   # allow Bitcoin mainnet
18333                      ALLOW       Anywhere                   # allow Bitcoin testnet
50002                      ALLOW       10.0.0.0/24                # allow EPS from local network
9735 (v6)                  ALLOW       Anywhere (v6)              # allow Lightning
8333 (v6)                  ALLOW       Anywhere (v6)              # allow Bitcoin mainnet
18333 (v6)                 ALLOW       Anywhere (v6)              # allow Bitcoin testnet

Edit: My network's external IP uses IPv4, if that makes a difference. I have yet to try running the node through Tor.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714579778
Hero Member
*
Offline Offline

Posts: 1714579778

View Profile Personal Message (Offline)

Ignore
1714579778
Reply with quote  #2

1714579778
Report to moderator
pereira4
Legendary
*
Offline Offline

Activity: 1610
Merit: 1183


View Profile
November 02, 2019, 02:14:14 AM
Last edit: November 02, 2019, 02:25:54 AM by pereira4
 #2

The socket recv error Connection reset by peer (104) message happened to me while having Comodo Firewall enabled. So do this:


1) Close Comodo Firewall
2) Delete "chainstate" folder
3) Delete "peers.dat"

It will take a while as it generates the fresh files. I told you to delete those to generate them from scratch just in case. While it syncs be sure to disable ALL posible firewalls (and this may include going into the actual router setup, not only on your linux file) and watch the log again.

Edit: I see it's a Pi.

Well other things to try, discard it's an I/O error... can you plug another HDD and try a fresh install there?

And are you using an VPS?

And another thing to try.. can you try with 0.17? Some things changed since 0.18 so maybe you have something wrong in your config, for instance:

The rpcallowip option can no longer be used to automatically listen on all network interfaces. Instead, the rpcbind parameter must be used to specify the IP addresses to listen on. Listening for RPC commands over a public network connection is insecure and should be disabled, so a warning is now printed if a user selects such a configuration. If you need to expose RPC in order to use a tool like Docker, ensure you only bind RPC to your localhost, e.g. docker run [...] -p 127.0.0.1:8332:8332 (this is an extra :8332 over the normal Docker port specification).


Deathwing
Legendary
*
Offline Offline

Activity: 1638
Merit: 1328


Stultorum infinitus est numerus


View Profile WWW
November 02, 2019, 04:28:03 AM
 #3

Is your Raspberry Pi running a full bitcoin node? If so, it might be your Pi is being overloaded. Also, if you have the blockchain installed on an external USB it is likely that your Power Supply for the Raspberry Pi probably can't provide enough constant power to the HDD. It provides power but as soon as HDD starts to spin and actually work, it fails to receive enough power. These are my hypothesis though.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!