2

I'm trying to start a node to play with, connected to the current main net candidate. When I fire up nodeos I get the following error:

$ ./nodeos
3035018ms thread-0   chain_plugin.cpp:206          plugin_initialize    ] initializing chain plugin
3035037ms thread-0   block_log.cpp:123             open                 ] Log is nonempty
3035037ms thread-0   block_log.cpp:141             open                 ] Index is nonempty
3035049ms thread-0   http_plugin.cpp:285           plugin_initialize    ] configured http to listen on 127.0.0.1:8080
3035049ms thread-0   net_plugin.cpp:2913           plugin_initialize    ] Initialize net plugin
3035049ms thread-0   net_plugin.cpp:2935           plugin_initialize    ] host: 0.0.0.0 port: 9876 
3035050ms thread-0   net_plugin.cpp:3007           plugin_initialize    ] my node_id is 83600946e11b7aa4ae020a902ee609744364341ca6f52fd6b7ac9d1033d4a279
3035050ms thread-0   main.cpp:104                  main                 ] nodeos version 29799eae
3035050ms thread-0   main.cpp:105                  main                 ] eosio root is /home/nadejde/.local/share
3035062ms thread-0   main.cpp:113                  main                 ] 10 assert_exception: Assert Exception
db.revision() >= head->block_num: fork database is inconsistent with shared memory
    {"db":0,"head":1}
    thread-0  controller.cpp:243 init

    {}
    thread-0  chain_plugin.cpp:444 plugin_startup

Any ideas please where to start debugging this? Any pointers appreciated! Thank you!

I'm running the following plugins:

plugin = eosio::chain_api_plugin
plugin = eosio::http_plugin
plugin = eosio::history_api_plugin

Edit: I seem to have gone over the problem by running: ./nodeos --delete-all-blocks

  • did you try removing the $EOS_NODEOS/data folder and starting up again? – Sylvain Cormier Jun 14 '18 at 12:50
  • I don't seem to have that folder. But it seems to be running after I did the --delete-all-blocks – Andrei Nadejde Jun 14 '18 at 13:02
  • So do you still have problems? Otherwise you can post your answer and accept it so other users can use your fix. – TeeAttack42 Jun 14 '18 at 14:49
  • Running with --delete-all-blocks fixed the problem. Sylvian's answer is also good. – Andrei Nadejde Jun 14 '18 at 16:31
2

Just writing this so that there is a formal answer.

The problem can be fixed by running your normal nodeos command with the additional --delete-all-blocks option, example shown below:

nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin --delete-all-blocks

Please note that doing this will delete all the information stored on your chain.

The system should then run as normal

| improve this answer | |
1

I would just like to note with Phillip Hamnett's answer your whole chain will get wiped and you will start back at block 1. Before you do that it's worth trying the following:

nodeos --hard-replay-blockchain --mongodb-wipe --fix-reversible-blocks --plugin eosio::history_api_plugin --filter-on "*" --contracts-console

Essentially it will attempt to rebuild the database by running through all the blocks. This doesn't always work in which case you'll have to resort to:

nodeos -e -p eosio --delete-all-blocks

In an especially corrupted instance you'll have to manually remove the blocks-dir. The default dir is here:

rm -r ~/.local/share/eosio/
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.