System: Debian
Ver 3.0.1
Error is "Couldn’t initialize the node: OpenLedger.openLedgerDB A single ledger database file ‘/var/lib/algorand/mainnet-v1.0/ledger.sqlite’ was detected. This is no longer supported by current binaries.
This was after a system crash where I had to restart the VM running algo node.
start is by systemctl
When I tried to delete mainnet and start again it did start but then when I tried to copy my participation keys I get error"cannot load account at 6L… attempt to write a readonly database
The simplest solution may be to clean up and restart.
WARNING: This will remove all your accounts and participation keys. If you use kmd (or goal account ... / goal wallet ...) and did not backup mnemonic, you may lose Algos).
To clean up and restart:
Stop the node
Remove all files/folders from /var/lib/algorand EXCEPT genesis.json, config.json (if present), system.json (if present)
Start again the node
If the node is non-archival, you can then re-use fast catchup.
If your node was archival, you will need to do normal catchup which takes currently around a week.
Fix the participation key issue
Most likely the reason is that you have some permission issues and you generated the key with the wrong user (either your user or root).
With the Debian/Ubuntu package, you need everything in /var/lib/algorand to be owned by the user algorand and the group algorand.
You can stop the node and do:
sudo chown -R algorand:algorand /var/lib/algorand
In the future, always run any goal command (that modifies data) using the algorand user: