NBXplorer periodically disconnecting from bitcoind
See original GitHub issueAfter an update to the latest version NBXplorer keeps disconnecting and reconnecting to Bitcoind.
Steps to reproduce:
- Setup regtest instance with NBXplorer
- Mine 101 blocks
- Wait and see logs
- Optionally check
/v1/cryptos/btc/status
in a loop with 1-second sleep
Expected behavior
NBXplorer connects once and stays connected. After initial sync it keeps reporting fully synced
Actual behavior
NBXplorer disconnects and resyncs ~every second
Log
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked node
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Current Index Progress not found, start syncing from the header's chain tip (At height: 101)
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Starting scan at block 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NotStarted => NBXplorerSynching
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NBXplorerSynching => Ready
Nov 11 13:49:20 disp9630 nbxplorer[7276]: fail: Explorer: BTC: Connection unexpectedly failed: Unexpected exception while connecting to socket
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: Ready => NotStarted
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Testing RPC connection to http://127.0.0.1:18443/
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: RPC connection successful
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Full node version detected: 210100
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Loading chain from cache...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Trying to connect via the P2P protocol to trusted node (127.0.0.1:18444)...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: TCP Connection succeed, handshaking...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Loading chain from node
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Loading chain...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Chain loaded
Nov 11 13:49:20 disp9630 nbxplorer[7276]: warn: Explorer: BTC: Your NBXplorer server is not whitelisted by your node, you should add "whitelist=127.0.0.1" to the configuration file of your node. (Or use whitebind)
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked node
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Current Index Progress not found, start syncing from the header's chain tip (At height: 101)
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Starting scan at block 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: fail: Explorer: BTC: Connection unexpectedly failed: Unexpected exception while connecting to socket
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NotStarted => NBXplorerSynching
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NBXplorerSynching => NotStarted
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Testing RPC connection to http://127.0.0.1:18443/
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: RPC connection successful
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Full node version detected: 210100
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Loading chain from cache...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Trying to connect via the P2P protocol to trusted node (127.0.0.1:18444)...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: TCP Connection succeed, handshaking...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Loading chain from node
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Loading chain...
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Chain loaded
Nov 11 13:49:20 disp9630 nbxplorer[7276]: warn: Explorer: BTC: Your NBXplorer server is not whitelisted by your node, you should add "whitelist=127.0.0.1" to the configuration file of your node. (Or use whitebind)
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked node
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Current Index Progress not found, start syncing from the header's chain tip (At height: 101)
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Explorer: BTC: Starting scan at block 101
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NotStarted => NBXplorerSynching
Nov 11 13:49:20 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NBXplorerSynching => Ready
Nov 11 13:49:21 disp9630 nbxplorer[7276]: fail: Explorer: BTC: Connection unexpectedly failed: Unexpected exception while connecting to socket
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: Ready => NotStarted
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Testing RPC connection to http://127.0.0.1:18443/
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: RPC connection successful
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Full node version detected: 210100
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Loading chain from cache...
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Trying to connect via the P2P protocol to trusted node (127.0.0.1:18444)...
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: TCP Connection succeed, handshaking...
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Loading chain from node
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: Loading chain...
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: Chain loaded
Nov 11 13:49:21 disp9630 nbxplorer[7276]: warn: Explorer: BTC: Your NBXplorer server is not whitelisted by your node, you should add "whitelist=127.0.0.1" to the configuration file of your node. (Or use whitebind)
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Configuration: BTC: Height: 101
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: Handshaked node
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: Current Index Progress not found, start syncing from the header's chain tip (At height: 101)
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Explorer: BTC: Starting scan at block 101
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NotStarted => NBXplorerSynching
Nov 11 13:49:21 disp9630 nbxplorer[7276]: info: Events: BTC: Node state changed: NBXplorerSynching => Ready
Last known working version: 2.1.58 I managed to bisect it. It works in 2.2.4 and breaks in 2.2.5
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
new Apollo miner keeps disconnecting from WIFI
Seems to be working good, except once every 24-26 hours or so, it disconnects from my WIFI, and I have to manually reconnect...
Read more >bitcoind syncing headers but not blocks
Going to answer my own question. Looks like it is the prune= option that disables the NETWORK service and stops the node from...
Read more >BIP 0338 - Bitcoin Wiki
This BIP describes a change to the p2p protocol to allow a node to tell a peer that a connection will not be...
Read more >Running Bitcoind
Running Bitcoind shows users two variations of the original bitcoin program available; one with a graphical user interface (usually referred to as just ......
Read more >Bitcoin Core 22.0
If you are running an older version, shut it down. Wait until it has completely shut down (which might take a few minutes...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@farukterzioglu whitelisting is not only required for
mempool
, but to prevent your NBXplorer stop suddenly working. If your node isn’t whitelisted bitcoin core is free to kick you out anytime. (and it does) I could not issuemempool
command if not whitelisted, but this is just a time bomb.@NicolasDorier It looks like whitelisting is no longer optional. As you can see from this diff: https://github.com/dgarage/NBXplorer/compare/v2.2.4...v2.2.5
mempool
request has been added and bitcoin node requires whitelisting formempool
requests as mentioned in #344When I try to connect to a node (regtest) without
whitelist
it never connects and tries in an endless loop. At the same time when I check the bitcoin node I can see it disconnects (repeatedly) NBXplorer because of misbehavior:mempool request with bloom filters
and NBxplorer is being stuck like this;