Bitcoin Core stuck starting. Rebuild index?

Hi there, hope someone cal help with this.

Bitcoin core seems to be stuck starting. Can’t get it back up nor lnd. Have tried several things (including updating umbrel to v1) but nothing works.

Here’s the error I get in the log:

bitcoin_bitcoind_1     | 2024-08-07T14:02:08Z Opened LevelDB successfully
bitcoin_bitcoind_1     | 2024-08-07T14:02:08Z Using obfuscation key for /data/.bitcoin/indexes/blockfilter/basic/db: 0000000000000000
bitcoin_bitcoind_1     | 2024-08-07T14:02:08Z Error: txindex: best block of the index not found. Please rebuild the index.
bitcoin_bitcoind_1     | 2024-08-07T14:02:08Z Shutdown: In progress...
bitcoin_bitcoind_1     | Error: txindex: best block of the index not found. Please rebuild the index.

I also get ip2d errors (Something about not being able to get to the next hop).

And resetting to the default values through the ‘advanced settings’ throws out ‘Something went wrong while attempting to change the configuration of Bitcoin Node’

Is the index corrupted? How do I reindex?

The issue is happening after an update of bitcoin core to v27 and also a black out (file corruption?)

Any help greatly appreciated

**Edit - FYI: changes to .conf (below) now showing Reindexing in progress… banner up in Bitcoin core App (Re-syncing :slight_smile:

Hi JackAT,
I have very similar issue as yours… and facing the exact same issue by the looks of things…

It looks like there is no option i can find other than to -reindex or -reindex-chainstate and/or download the entire btc blockchain and clear mempool in the process…

I am looking for a last hail marry before i manually sudo nano bitcoin-config.json file and change "reindex" : "false", to:

{
// ...
"reindex" : "true",
//...
}

Then force a reboot, as soon as I can then get shell access, head back to the config and switch back via sudo nano bitcoin-config.json and change
{
//...
"reindex": "false",
// ...
}

To hopefully trigger a complete bitcoin core reindex… I have to say moving from v0.5.3 > 1.2.2 has been a nightmare…
The upgrade process itself was straight forward, backup wallet.dat/ channels_bak/seedphrase, simple reflash and upgrading! but not if things are slow and don’t work out of the box… My v0.53 umbrel node uptime was in the months… Since upgrade I don’t think this node has been rebooted as many times in its entire life. x)

If you like I’ll pull the trigger first and report back here (or you go first and report your findings here to me :wink:

Hi there, I finally managed to reindex bitcoin core. I used this command (through ssh or the UI in umbrelOS):

sudo sed -i 's/includeconf=umbrel-bitcoin.conf/includeconf=umbrel-bitcoin.conf\nreindex=1/' ~/umbrel/app-data/bitcoin/data/bitcoin/bitcoin.conf

you’ll need to know the root password.

Then I restarted the bitcoin node service (not umbrel) and it started reindexing.

When it’s synced again, remember to remove ‘reindex=1’, otherwise it will resync the entire chain again on the next service start up

1 Like

Hi there BTC colleagues. Although my RPi 4 full node seems to be running smoothly, I am suspicious that my blockchain file is partially corrupt or incomplete. I recently had the node lose power without a prior proper shutdown. Also, the new Umbrel OS says I am 83% synchronized, and is stuck at that figure for days now, while Bitcoin Core27.0 says I am 100% synchronized, and did so even right after getting the node back up after the outage; I think the node was out of commission for at least a couple days. Anyway, I would like to initiate a reindex, or otherwise determine if the blockchain file is OK. I am running latest Umbrel version via its GUI. I cannot figure out how to issue commands like you are using above. I have not been able to access the node via ssh from on my laptop. I can access it via its Tor address, but just get the usual GUI. In short, how do I tell it to reindex and enter commands in general? Thank you so much for your help. - Paul

Hi there, you should use the UmbrelOS UI.

Go to Settings icon → Advanced Settings → Terminal → and on the App drop down, pick Bitcoin Core.

That will open a pseudo terminal windows where you can enter bitcoin cli commands

Hope that helps

1 Like

Thank you!

This advice gets me to Umbrel and Bitcoin Core terminal windows, but the commands given above to initiate reindexing do not work on my Umbrel node. Any further advice on reindexing would be appreciated.

I was able to issue a getblockinfo command to Bitcoin Core. Everything looked normal, including no warnings. Given this, how likely is it that my blockchain file is imperfect and needs reindexing? Will I have to go through entire log file to look for errors, etc., to really determine this? Thank you friends.

Hey, I’m far from being an expert on this. Give it a try on Umbrel’s discord. That’s where I got the commands and help that worked for me