The electrs logs show it waiting for bitcoind to finish its IBD (but no amount of waiting here will help; again, bitcoind above is not showing any further updates):
This seems to be the key: "Leaving InitialBlockDownload"
Now electrs can do its thing:
...
electrs | WARN - waiting for bitcoind sync to finish: 116/116 blocks, verification progress: 100.000%
electrs | WARN - waiting for bitcoind sync to finish: 116/116 blocks, verification progress: 100.000%
electrs | DEBUG - opening DB at "./db/regtest/newindex/txstore"
electrs | DEBUG - 0 blocks were added
electrs | DEBUG - opening DB at "./db/regtest/newindex/history"
electrs | DEBUG - 0 blocks were indexed
electrs | DEBUG - opening DB at "./db/regtest/newindex/cache"
electrs | DEBUG - downloading all block headers up to 148a310f9b7441b3dcdd67360d7563b2d9c43a0ad5d677b85f71370997ff06e7
electrs | TRACE - downloading 118 block headers
electrs | INFO - hash=148a310f9b7441b3dcdd67360d7563b2d9c43a0ad5d677b85f71370997ff06e7 height=117 @ 2024-01-27T18:17:04Z (118 left to index)
electrs | DEBUG - adding transactions from 118 blocks using Bitcoind
electrs | DEBUG - hash=148a310f9b7441b3dcdd67360d7563b2d9c43a0ad5d677b85f71370997ff06e7 height=117 @ 2024-01-27T18:17:04Z (118 left to index)
electrs | DEBUG - writing 700 rows to RocksDB { path: "./db/regtest/newindex/txstore" }, flush=Disable
And now everything is fine again.
It's not every time I start/stop nigiri. I did upgrade Docker just before this so perhaps the container and/or one of these processes went through an ugly shutdown?
Just leaving this here in case anyone else runs into a similar problem.
Running latest
nigiri
with various regtest blocks and wallets created.Stop nigiri.
Start nigiri.
bitcoind logs show normal startup actions, but then it just sits here without proceeding:
The electrs logs show it waiting for bitcoind to finish its IBD (but no amount of waiting here will help; again, bitcoind above is not showing any further updates):
esplora front end just shows an error, as expected (if electrs hasn't successfully connected to bitcoind, esplora will be out of luck).
But bitcoind never moves on. RPC responds to
getblockchaininfo
andgetconnectioncount
etc so it is still running.chopsticks logs:
The workaround
Finally I poke it by calling
nigiri rpc -generate 1
. Now suddenly things start moving:This seems to be the key: "Leaving InitialBlockDownload"
Now electrs can do its thing:
And now everything is fine again.
It's not every time I start/stop nigiri. I did upgrade Docker just before this so perhaps the container and/or one of these processes went through an ugly shutdown?
Just leaving this here in case anyone else runs into a similar problem.