Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Nodeos Replays error Due to Bad Shutdown.MacOS #4162

Closed
raymondfx opened this issue Jun 16, 2018 · 10 comments
Closed

Nodeos Replays error Due to Bad Shutdown.MacOS #4162

raymondfx opened this issue Jun 16, 2018 · 10 comments

Comments

@raymondfx
Copy link

Had a bad shutdown with my computer while nodes was running, when I restarted I got this errors when I tried to run nodes

2138897ms thread-0   chain_plugin.cpp:208          plugin_initialize    ] initializing chain plugin
2138901ms thread-0   main.cpp:123                  main                 ] database dirty flag set (likely due to unclean shutdown): replay required

Ps... Nodeos --replay doesn't work

@raymondfx raymondfx changed the title Nodeos Replays Due to Bad Shutdown. Nodeos Replays Due to Bad Shutdown.MacOS Jun 16, 2018
@raymondfx raymondfx changed the title Nodeos Replays Due to Bad Shutdown.MacOS Nodeos Replays error Due to Bad Shutdown.MacOS Jun 16, 2018
@heifner
Copy link
Contributor

heifner commented Jun 16, 2018

If --replay doesn't work try --hard-replay

@raymondfx
Copy link
Author

@heifner after --hard-replay this is what I get...

3016982ms thread-0 chain_plugin.cpp:208 plugin_initialize ] initializing chain plugin
3016983ms thread-0 chain_plugin.cpp:318 plugin_initialize ] Hard replay requested: deleting state database
3017101ms thread-0 block_log.cpp:323 repair_log ] Recovering Block Log...
3017101ms thread-0 block_log.cpp:343 repair_log ] Moved existing blocks directory to backup location: '/Users/victoroburu/Library/Application Support/eosio/nodeos/data/blocks-2018-06-16T15:50:17.101'
3017101ms thread-0 block_log.cpp:348 repair_log ] Reconstructing '/Users/victoroburu/Library/Application Support/eosio/nodeos/data/blocks/blocks.log' from backed up block log
3017102ms thread-0 block_log.cpp:458 repair_log ] Existing block log was undamaged. Recovered all irreversible blocks up to block number 1.
3017102ms thread-0 chain_plugin.cpp:327 plugin_initialize ] Reversible blocks database was not corrupted. Copying from backup to blocks directory.
3019240ms thread-0 block_log.cpp:123 open ] Log is nonempty
3019240ms thread-0 block_log.cpp:158 open ] Index is empty
3019240ms thread-0 block_log.cpp:296 construct_index ] Reconstructing Block Log Index...
3019288ms thread-0 http_plugin.cpp:290 plugin_initialize ] configured http to listen on 127.0.0.1:8888
3019288ms thread-0 net_plugin.cpp:2947 plugin_initialize ] Initialize net plugin
3019288ms thread-0 net_plugin.cpp:2971 plugin_initialize ] host: 0.0.0.0 port: 9876
3019288ms thread-0 net_plugin.cpp:3043 plugin_initialize ] my node_id is 43693f8c07ea2edb4e6eb5f1f153764bab283ce3f4d9c250e30352bed6bba790
3019288ms thread-0 main.cpp:104 main ] nodeos version a6c3e9c
3019289ms thread-0 main.cpp:105 main ] eosio root is /Users/victoroburu/Library/Application Support
3019289ms thread-0 controller.cpp:1188 startup ] No head block in fork db, perhaps we need to replay
3019289ms thread-0 controller.cpp:304 initialize_fork_db ] Initializing new blockchain with genesis state
3019328ms thread-0 chain_plugin.cpp:446 plugin_startup ] starting chain in read/write mode
3019328ms thread-0 chain_plugin.cpp:451 plugin_startup ] Blockchain started; head block is #1, genesis timestamp is 2018-06-01T12:00:00.000
3019329ms thread-0 http_plugin.cpp:331 plugin_startup ] start listening for http requests
3019329ms thread-0 net_plugin.cpp:3055 plugin_startup ] starting listener, max clients is 25
3019329ms thread-0 producer_plugin.cpp:577 plugin_startup ] producer plugin: plugin_startup() begin
3019330ms thread-0 producer_plugin.cpp:604 plugin_startup ] producer plugin: plugin_startup() end

Nothing seems to work after that.

@heifner
Copy link
Contributor

heifner commented Jun 16, 2018

What is your command line and config.ini?

@raymondfx
Copy link
Author

I am using nodeos --hard-replay

@heifner
Copy link
Contributor

heifner commented Jun 16, 2018

Yes, but the other options on the command line matter as well as your settings in config.ini. For example whether or not you have -e option or not.

@raymondfx
Copy link
Author

what should the the setting on config.ini?

@raymondfx
Copy link
Author

this is an error when I try to run nodes

2936485ms 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:454 plugin_startup

@raymondfx
Copy link
Author

I managed to fix just Deleted the Data Directory.

@heifner heifner closed this as completed Jun 18, 2018
@phvietan
Copy link

phvietan commented Jan 2, 2019

I do not think deleting data directory is a good solution, because then we have to sync the node from scratch, which cost a lot of time (several days). However, I have not found any solution other than this.

@matthewdarwin
Copy link

If you need a node with the full blocks history, make regular backups (eg daily). Else restart syncing with a snapshot.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants