Thread 'main' panicked at 'reader failed:

Still having issues to update to any version higher than 0.4.3-build-1c80170. As a part me learning and investigating the issue I ran the command to reindex (sudo systemctl stop umbrel-startup && sudo rm -rf ~/umbrel/electrs/!(electrs.toml) && sudo systemctl start umbrel-startup) which gives me the following error below. Does that perhaps mean that the file blk00540.dat is corrupt? Shouldn’t the reindexing fix such error? How can that get fixed? Any help would be much appreciated.

BTW: Reindexing always stops at the same file(blk00540.dat) and starts over and over again from the beginning.

electrs | TRACE - indexed “/data/.bitcoin/blocks/blk00538.dat”: 0 rows
electrs | DEBUG - no more blocks to index
electrs | DEBUG - no more blocks to index
electrs | TRACE - indexed “/data/.bitcoin/blocks/blk00539.dat”: 0 rows
electrs | DEBUG - no more blocks to index
electrs | DEBUG - no more blocks to index
electrs | TRACE - indexed “/data/.bitcoin/blocks/blk00540.dat”: 0 rows
electrs | thread ‘main’ panicked at ‘reader failed: Error(Msg(“failed to read “/data/.bitcoin/blocks/blk00541.dat””), State { next_error: Some(Os { code: 5, kind: Other, message: “Input/output error” }), backtrace: InternalBacktrace { backtrace: None } })’, src/libcore/
electrs | note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.
electrs | TRACE - closing DB at “/data/db/mainnet”
electrs | Config { log: StdErrLog { verbosity: Trace, quiet: false, show_level: true, timestamp: Off, modules: [], writer: “stderr”, color_choice: Never }, network_type: Bitcoin, db_path: “/data/db/mainnet”, daemon_dir: “/data/.bitcoin”, blocks_dir: “/data/.bitcoin/blocks”, daemon_rpc_addr: V4(, electrum_rpc_addr: V4(, monitoring_addr: V4(, jsonrpc_import: false, index_batch_size: 10, bulk_index_threads: 4, tx_cache_size: 10485760, txid_limit: 100, server_banner: “Umbrel v0.4.3”, blocktxids_cache_size: 10485760 }
electrs | DEBUG - Server listening on
electrs | DEBUG - Running accept thread
electrs | INFO - NetworkInfo { version: 210100, subversion: “/Satoshi:0.21.1/”, relayfee: 0.00001 }
electrs | INFO - BlockchainInfo { chain: “main”, blocks: 710426, headers: 710426, verificationprogress: 0.9999989087659374, bestblockhash: “000000000000000000017019b6a0878917a9738f09c261fd97915b48ad785a8c”, pruned: false, initialblockdownload: false }
electrs | DEBUG - opening DB at “/data/db/mainnet”
electrs | TRACE - latest indexed blockhash: 0000000000000000000000000000000000000000000000000000000000000000
electrs | INFO - listing block files at “/data/.bitcoin/blocks/blk*.dat”
electrs | INFO - indexing 2812 blk*.dat files
electrs | DEBUG - found 415727 indexed blocks
electrs | TRACE - downloading 100000 block headers

yes, is corrupted. if you could obtain it from another synced node and replace that file manually, it could work. Electrs will create a new index but should start again. Worth trying.
Other option is to wipe block data folder (not all node) and let the node to sync again. Is clean and better.
But if your drive had some hardware issues, maybe you will end again in this situation. So a format and start over is more indicated.

Anyway, try first copying that only file. Of course with node shut down. Just take the drive to anotehr PC and copy the file and put it back

Unfortunately I don’t have access to copy of that file(blk00540.dat). Can this be downloaded somewhere? Would you or someone else be able to attach a copy for me?

You could download the blockchain torrent
See the instruction I put in the troubleshooting manual about copying the blockchain data

great, thanks a lot, downloading now

Hmm, apparently the blockchain cannot be downloaded from any of the links in the troubleshooting guide.

The readme here says:

“This directory used to contain a torrent of the bitcoin block chain. It had not
been updated since 2017 so was effectively useless, so has been removed. The best
way to download the block chain is to run the client, which downloads it through
bitcoin’s own P2P network.”

Will try option 2 now and re-download the whole blockchain.