Corruption of the chain database data can occur. It is usually the result of a RAM related error but before or after you rip open your computer to address the hardware …
DB has been previously marked as corrupted, attempting repair
Error: Service(Client(Backend("Corruption: force_consistency_checks:
If you see the aforementioned error in the chain.log of the node computer you can attempt to resolve the issue if it happens to be a one off event. You do not need to make any changes to the gateway computer.
On the node computer ONLY.
ALL of the following commands are run on the node computer.
Stop the cmix and chain services …
$ sudo systemctl stop xxnetwork-cmix xxnetwork-chain
Delete the DB …
$ sudo rm -rf /opt/xxnetwork/db/*
Start the chain service …
$ sudo systemctl start xxnetwork-chain
Go to the xx Wallet - Network > Account Actions
In the 3 dot menu to the right of the stash select, Change session keys
Use the output of the following commands to do so …
$ curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9933 -o /opt/xxnetwork/cred/session-keys.json
then …
$ cat /opt/xxnetwork/cred/session-keys.json
Depending on how long it has been stopped, you may also need to press the Validate
button if it is present.
Run …
$ tail -F /opt/xxnetwork/log/chain.log
2022-07-21 14:32:36 ✨ Imported #3512833 (0x4ccc…21a2)
2022-07-21 14:32:38 💤 Idle (41 peers), best: #3512833 (0x4ccc…21a2), finalized #3512831 (0xb26c…8c8e), ⬇ 454.1kiB/s ⬆ 675.0kiB/s
2022-07-21 14:32:42 ✨ Imported #3512834 (0x5130…4af7)
2022-07-21 14:32:43 💤 Idle (41 peers), best: #3512834 (0x5130…4af7), finalized #3512831 (0xb26c…8c8e), ⬇ 90.7kiB/s ⬆ 374.6kiB/s
You must wait until you see Imported
messages before you start the cmix service. This will take a while!
You can terminate tail
with Crtl
+c
when you’re done viewing the log.
Once you see Imported
messages in the chain.log, you can start the cmix service…
$ sudo systemctl start xxnetwork-cmix
If you see the aforementioned error in the chain.log of the gateway computer you can attempt to resolve the issue if it happens to be a one off event. You do not need to make any changes to the node computer.
On the gateway computer ONLY.
ALL of the following commands are run on the gateway computer.
Stop the chain and gateway services …
$ sudo systemctl stop xxnetwork-chain xxnetwork-gateway
Delete the contents of the /opt/xxnetwork/db
directory
$ rm -rf /opt/xxnetwork/db/*
Start the chain service and wait for it to sync …
$ sudo systemctl start xxnetwork-chain
Run …
$ tail -F /opt/xxnetwork/log/chain.log
2022-07-21 14:32:36 ✨ Imported #3512833 (0x4ccc…21a2)
2022-07-21 14:32:38 💤 Idle (41 peers), best: #3512833 (0x4ccc…21a2), finalized #3512831 (0xb26c…8c8e), ⬇ 454.1kiB/s ⬆ 675.0kiB/s
2022-07-21 14:32:42 ✨ Imported #3512834 (0x5130…4af7)
2022-07-21 14:32:43 💤 Idle (41 peers), best: #3512834 (0x5130…4af7), finalized #3512831 (0xb26c…8c8e), ⬇ 90.7kiB/s ⬆ 374.6kiB/s
You must wait until you see Imported
messages before you start the gateway service. This will take a while!
Terminate tail
with Crtl
+c
when you’re done viewing the log.
Once you see the Imported
messages, start the gateway service
$ sudo systemctl start xxnetwork-gateway