From 3944192f623203bee6d2c25743004cc8efddd76d Mon Sep 17 00:00:00 2001 From: jsvisa Date: Fri, 7 Nov 2025 09:08:26 +0800 Subject: [PATCH 1/2] fix(node): content not visible --- node-operators/guides/troubleshooting.mdx | 103 +++++++++++----------- 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/node-operators/guides/troubleshooting.mdx b/node-operators/guides/troubleshooting.mdx index f8dc0652d..f119bfaa6 100644 --- a/node-operators/guides/troubleshooting.mdx +++ b/node-operators/guides/troubleshooting.mdx @@ -80,54 +80,55 @@ say if Geth stops unexpectedly, the database can be corrupted. This is known as "unclean shutdown" and it can lead to a variety of problems for the node when it is restarted. - - - It is always best to shut down Geth gracefully, i.e. using a - shutdown command such as `ctrl-c`, `docker stop -t 300 ` or - `systemctl stop` (although please note that `systemctl stop` has a default timeout - of 90s - if Geth takes longer than this to gracefully shut down it will quit - forcefully. Update the `TimeoutSecs` variable in `systemd.service` to override this - value to something larger, at least 300s). - - This way, Geth knows to write all relevant information into the database to - allow the node to restart properly later. This can involve >1GB of information - being written to the LevelDB database which can take several minutes. - - ### Solution - - If an unexpected shutdown does occur, the `removedb` subcommand can be used to - delete the state database and resync it from the ancient database. This should - get the database back up and running. - - - - Unclean shutdowns in `Nethermind` can lead to database corruption. This typically happens when: - - * The node experiences hardware failures (disk failures, memory errors, overheating) - * Power cuts cause abrupt shutdowns - * The process is terminated without proper cleanup - - ### Solutions - - 1. **Lock File Issues** - If `Nethermind` complains about lock files after an unclean shutdown, run: - ```bash - find /path/to/nethermind_db -type f -name 'LOCK' -delete - ``` - - 2. **Block Checksum Mismatch** - If you encounter block checksum mismatch errors, you can enable direct I/O: - ```bash - --Db.UseDirectIoForFlushAndCompactions true - ``` - Note: This may impact performance. - - 3. **Complete Resync** - In cases of severe corruption, a full resync is recommended: - ```bash - sudo systemctl stop nethermind - sudo rm -rf /path/to/nethermind_db/mainnet - sudo systemctl start nethermind - ``` - - +### For op-geth + +It is always best to shut down Geth gracefully, i.e. using a +shutdown command such as `ctrl-c`, `docker stop -t 300 ` or +`systemctl stop` (although please note that `systemctl stop` has a default timeout +of 90s - if Geth takes longer than this to gracefully shut down it will quit +forcefully. Update the `TimeoutSecs` variable in `systemd.service` to override this +value to something larger, at least 300s). + +This way, Geth knows to write all relevant information into the database to +allow the node to restart properly later. This can involve >1GB of information +being written to the LevelDB database which can take several minutes. + +**Solution** + +If an unexpected shutdown does occur, the `removedb` subcommand can be used to +delete the state database and resync it from the ancient database. This should +get the database back up and running. + +### For Nethermind + +Unclean shutdowns in `Nethermind` can lead to database corruption. This typically happens when: + +* The node experiences hardware failures (disk failures, memory errors, overheating) +* Power cuts cause abrupt shutdowns +* The process is terminated without proper cleanup + +**Solutions** + +1. **Lock File Issues** + + If `Nethermind` complains about lock files after an unclean shutdown, run: + ```bash + find /path/to/nethermind_db -type f -name 'LOCK' -delete + ``` + +2. **Block Checksum Mismatch** + + If you encounter block checksum mismatch errors, you can enable direct I/O: + ```bash + --Db.UseDirectIoForFlushAndCompactions true + ``` + Note: This may impact performance. + +3. **Complete Resync** + + In cases of severe corruption, a full resync is recommended: + ```bash + sudo systemctl stop nethermind + sudo rm -rf /path/to/nethermind_db/mainnet + sudo systemctl start nethermind + ``` From 23468207e9efbb42478ce7cb7154e6235f809df5 Mon Sep 17 00:00:00 2001 From: jsvisa Date: Fri, 7 Nov 2025 09:18:12 +0800 Subject: [PATCH 2/2] docs(troble): add warning for op-geth removedb --- node-operators/guides/troubleshooting.mdx | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/node-operators/guides/troubleshooting.mdx b/node-operators/guides/troubleshooting.mdx index f119bfaa6..e1e035eb3 100644 --- a/node-operators/guides/troubleshooting.mdx +++ b/node-operators/guides/troubleshooting.mdx @@ -95,9 +95,20 @@ being written to the LevelDB database which can take several minutes. **Solution** -If an unexpected shutdown does occur, the `removedb` subcommand can be used to -delete the state database and resync it from the ancient database. This should -get the database back up and running. +In most cases, `op-geth` can recover automatically from an unclean shutdown when you restart it. The warning message is informational and doesn't necessarily indicate a problem. + +However, if `op-geth` fails to restart properly after an unclean shutdown, you can use the `removedb` subcommand as a last resort: + +```bash +geth removedb --datadir= +``` + + + This command will delete all state database data. After running `removedb`, + you must manually restart the node to begin the resync process from the ancient database, + which can take significant time. Only use this when the node actually fails to restart, + not for every unclean shutdown warning. + ### For Nethermind @@ -112,6 +123,7 @@ Unclean shutdowns in `Nethermind` can lead to database corruption. This typicall 1. **Lock File Issues** If `Nethermind` complains about lock files after an unclean shutdown, run: + ```bash find /path/to/nethermind_db -type f -name 'LOCK' -delete ``` @@ -119,6 +131,7 @@ Unclean shutdowns in `Nethermind` can lead to database corruption. This typicall 2. **Block Checksum Mismatch** If you encounter block checksum mismatch errors, you can enable direct I/O: + ```bash --Db.UseDirectIoForFlushAndCompactions true ``` @@ -127,6 +140,7 @@ Unclean shutdowns in `Nethermind` can lead to database corruption. This typicall 3. **Complete Resync** In cases of severe corruption, a full resync is recommended: + ```bash sudo systemctl stop nethermind sudo rm -rf /path/to/nethermind_db/mainnet