Error: The node is not in a connected state
See original GitHub issueHello everybody,
I have difficulty getting NBXplorer to connect to a running bitcoind instance running in Docker. I setup NBXplorer and bitcoind in docker instances, both running on the same machine.
Bitcoind is setup with rpc username and password.
When I use the standard docker-compose file, I get the message
fail: Configuration: BTC: Error connecting to RPC server Response status code does not indicate success: 401 (Unauthorized).
Which makes sense of course.
I tried to add username and password directly to the docker-compose file via:
NBXPLORER_BTCRPCURL: http://username:password@bitcoind:18443/
Which gave the same result.
I then added the information to the settings.config file like this: btc.rpc.user=username btc.rpc.password=password
The result is this error message:
info: Configuration: Data Directory: /datadir
info: Configuration: Configuration File: /datadir/RegTest/settings.config
info: Configuration: Network: Regtest
info: Configuration: Supported chains: BTC
info: Configuration: Network: Regtest
info: Configuration: Supported chains: BTC
info: Configuration: BTC: Testing RPC connection to http://172.18.0.2:18443/
Hosting environment: Production
Content root path: /app/
Now listening on: http://0.0.0.0:32838
Application started. Press Ctrl+C to shut down.
info: Configuration: BTC: RPC connection successful
info: Configuration: BTC: Full node version detected: 170000
info: Configuration: BTC: Trying to connect via the P2P protocol to trusted node (bitcoind:3000)...
info: Explorer: BTC: TCP Connection succeed, handshaking...
fail: Configuration: BTC: Unhandled in Waiter loop
System.OperationCanceledException: Loading the chain from the node timed out ---> System.InvalidOperationException: The node is not in a connected state
at NBitcoin.Protocol.NodeListener.ReceivePayload[TPayload](CancellationToken cancellationToken)
at NBitcoin.Protocol.Node.VersionHandshake(NodeRequirement requirements, CancellationToken cancellationToken)
at NBXplorer.BitcoinDWaiter.ConnectToBitcoinD(CancellationToken cancellation)
--- End of inner exception stack trace ---
at NBXplorer.BitcoinDWaiter.ConnectToBitcoinD(CancellationToken cancellation) in /source/NBXplorer/BitcoinDWaiter.cs:line 530
at NBXplorer.BitcoinDWaiter.StepAsync(CancellationToken token) in /source/NBXplorer/BitcoinDWaiter.cs:line 305
at NBXplorer.BitcoinDWaiter.StartLoop(CancellationToken token, Signaler tick) in /source/NBXplorer/BitcoinDWaiter.cs:line 208
info: Configuration: BTC: Testing again in 5 seconds
The notification The node is not in a connected state
is not clear to me as I can connect via ElectrumX with no problem.
Any idea what I might do wrong here? Your help is much appreciated!
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (7 by maintainers)
Thank you for that tip! In the end it was so easy…
port
needed to be specifically defined for regtest. I changedport=39388
toregtest.port=39388
and then it worked. Note, I previously usedport=3000
but that resulted in a different error resulting from a script running within the container.Thanks a lot for your support!
Hello i seem to have the same issue https://github.com/dgarage/NBXplorer/issues/310 , and the rpc credentials seem correct: