eos icon indicating copy to clipboard operation
eos copied to clipboard

--replay-blockchain does not work

Open villesundell opened this issue 8 years ago • 18 comments

I am using 1.0.2 (653034462) and recently my server got rebooted, so the nodeos database is in dirty state (this is expected, of course). However, --replay-blockchain does not make much difference:

$ nodeos --data-dir $DATADIR --config-dir $DATADIR --replay-blockchain 2630374ms thread-0 chain_plugin.cpp:206 plugin_initialize ] initializing chain plugin 2630376ms thread-0 chain_plugin.cpp:327 plugin_initialize ] Replay requested: deleting state database CHAINBASE: Failed to pin chainbase shared memory (of size 1024 MB) in RAM. Performance degradation is possible. 2630420ms thread-0 main.cpp:123 main ] database dirty flag set (likely due to unclean shutdown): replay required

$ nodeos --data-dir $DATADIR --config-dir $DATADIR 2635889ms thread-0 chain_plugin.cpp:206 plugin_initialize ] initializing chain plugin 2635907ms thread-0 main.cpp:123 main ] database dirty flag set (likely due to unclean shutdown): replay required

In both cases, nodeos exits with code "2" (according to my Bash).

villesundell avatar Jun 10 '18 11:06 villesundell

yes, I get this error too. the memory is enough:

2018-06-10T22:51:45.440148413Z CHAINBASE: Failed to pin chainbase shared memory (of size 8192 MB) in RAM. Performance degradation is possible. nodeosd_1 | 2018-06-10T22:51:45.444906883Z 3105444ms thread-0 main.cpp:123 main ] database dirty flag set (likely due to unclean shutdown): replay required mnet1_0_2_nodeosd_1 exited with code 2

EOSBIXIN avatar Jun 10 '18 23:06 EOSBIXIN

I'm getting this error too, no way to restart nodeos. Any help please?

ariel1420 avatar Jun 16 '18 15:06 ariel1420

getting same error as well...Running inside Docker...

i-am-logger avatar Jun 18 '18 17:06 i-am-logger

I was able to solve it by deleting the nodeos data (~/.local/share/eosio/nodeos/data/) and the re-starting nodeos. Of course I lost everything I did.

arielaguirre1420 avatar Jun 18 '18 17:06 arielaguirre1420

i get this error everytime i restart nodeos , after i run it with genesis.json

i-am-logger avatar Jun 18 '18 17:06 i-am-logger

same problem~

realSinged avatar Jun 19 '18 05:06 realSinged

try --hard-replay-blockchain

goljl avatar Jun 19 '18 09:06 goljl

Does it work with --hard-replay-blockchain?

taokayan avatar Jun 26 '18 01:06 taokayan

does not work with --hard-replay-blockchain

qs-lll avatar Jun 26 '18 07:06 qs-lll

i have no way ,just can --delete-all-blocks´

qs-lll avatar Jun 26 '18 07:06 qs-lll

--hard-replay-blockchain will take about 1 hour if 3,000,000 blocks in you local. And the CPU will take 100% at this period. The log will stop at

2181900ms thread-0 controller.cpp:200 init ] existing block log, attempting to replay 3011349 blocks

So have a cofffee.

lcgogo avatar Jun 28 '18 08:06 lcgogo

Have the same error, --hard-replay-blockchain not working for me. (or i do something wrong ...) --delete-all-blocks is not solving the problem. if you have 10mln blocks or more, this will take a lot of time to sync blockchain from the start.

orange1337 avatar Jul 02 '18 07:07 orange1337

I am waiting for --hard-replay-blockchain 3.5 mln blocks - about 1.5 hours. And now everything works perfectly :)

orange1337 avatar Jul 02 '18 13:07 orange1337

sudo ./nodeos

Drug0j avatar Jul 11 '18 19:07 Drug0j

For me "--replay-blockchain --hard-replay-blockchain" seems to do the trick, it will take some time though, as @lcgogo mentioned :)

villesundell avatar Jul 16 '18 14:07 villesundell

--replay-blockchain --hard-replay-blockchain could not make work,how to solve it?

csquan avatar Aug 23 '18 07:08 csquan

@villesundell ./start.sh --replay-blockchain --hard-replay-blockchain it works for me, thank you。

bytehi avatar Nov 09 '18 06:11 bytehi

doing --replay-blockchain --hard-replay-blockchain

gives me final error mssg: <3>error 2019-06-09T17:32:27.018 thread-0 main.cpp:141 main ] std::exception

Whole Thread::

nodeos --replay-blockchain --hard-replay-blockchain <6>info 2019-06-09T17:31:54.249 thread-0 chain_plugin.cpp:333 plugin_initialize ] initializing chain plugin <6>info 2019-06-09T17:31:54.249 thread-0 chain_plugin.cpp:492 plugin_initialize ] Hard replay requested: deleting state database <6>info 2019-06-09T17:31:54.250 thread-0 block_log.cpp:370 repair_log ] Recovering Block Log... <6>info 2019-06-09T17:31:54.250 thread-0 block_log.cpp:390 repair_log ] Moved existing blocks directory to backup location: '/home/corey/.local/share/eosio/nodeos/data/blocks-2019-06-09T17:31:54.250' <6>info 2019-06-09T17:31:54.250 thread-0 block_log.cpp:395 repair_log ] Reconstructing '/home/corey/.local/share/eosio/nodeos/data/blocks/blocks.log' from backed up block log <6>info 2019-06-09T17:31:54.254 thread-0 block_log.cpp:487 repair_log ] Recovered block 1000 <6>info 2019-06-09T17:31:54.257 thread-0 block_log.cpp:487 repair_log ] Recovered block 2000 <6>info 2019-06-09T17:31:54.260 thread-0 block_log.cpp:526 repair_log ] Existing block log was undamaged. Recovered all irreversible blocks up to block number 2659. <6>info 2019-06-09T17:31:54.260 thread-0 chain_plugin.cpp:502 plugin_initialize ] Reversible blocks database was not corrupted. Copying from backup to blocks directory. <6>info 2019-06-09T17:31:54.818 thread-0 block_log.cpp:134 open ] Log is nonempty <6>info 2019-06-09T17:31:54.818 thread-0 block_log.cpp:178 open ] Index is empty <6>info 2019-06-09T17:31:54.818 thread-0 block_log.cpp:330 construct_index ] Reconstructing Block Log Index... <6>info 2019-06-09T17:31:54.820 thread-0 block_log.cpp:364 construct_index ] Block log index reconstructed for block 1000 <6>info 2019-06-09T17:31:54.821 thread-0 block_log.cpp:364 construct_index ] Block log index reconstructed for block 2000 <6>info 2019-06-09T17:31:54.822 thread-0 main.cpp:99 main ] nodeos version v1.7.0 <6>info 2019-06-09T17:31:54.822 thread-0 main.cpp:100 main ] eosio root is /home/corey/.local/share <6>info 2019-06-09T17:31:54.822 thread-0 main.cpp:101 main ] nodeos using configuration file /home/corey/.local/share/eosio/nodeos/config/config.ini <6>info 2019-06-09T17:31:54.822 thread-0 main.cpp:102 main ] nodeos data directory is /home/corey/.local/share/eosio/nodeos/data <3>error 2019-06-09T17:31:54.822 thread-0 controller.cpp:1741 startup ] No head block in fork db, perhaps we need to replay <4>warn 2019-06-09T17:31:54.822 thread-0 controller.cpp:583 initialize_fork_db ] Initializing new blockchain with genesis state
<6>info 2019-06-09T17:31:54.851 thread-0 controller.cpp:307 replay ] existing block log, attempting to replay from 2 to 2659 blocks <4>warn 2019-06-09T17:31:54.851 thread-0 transaction_context.cp:108 deadline_timer ] Using polled checktime; deadline timer too inaccurate: min:7us max:8957us mean:666us stddev:427us <6>info 2019-06-09T17:31:54.878 thread-0 controller.cpp:313 replay ] 500 of 2659 <6>info 2019-06-09T17:31:54.908 thread-0 controller.cpp:313 replay ] 1000 of 2659 <6>info 2019-06-09T17:31:54.941 thread-0 controller.cpp:313 replay ] 1500 of 2659 <6>info 2019-06-09T17:31:54.969 thread-0 controller.cpp:313 replay ] 2000 of 2659 <6>info 2019-06-09T17:31:54.998 thread-0 controller.cpp:313 replay ] 2500 of 2659 <6>info 2019-06-09T17:31:55.008 thread-0 controller.cpp:317 replay ] 2657 blocks replayed <6>info 2019-06-09T17:31:55.008 thread-0 controller.cpp:330 replay ] 1 reversible blocks replayed <6>info 2019-06-09T17:31:55.008 thread-0 controller.cpp:334 replay ] replayed 2658 blocks in 0 seconds, 0.05907599699021821 ms/block <6>info 2019-06-09T17:31:55.017 thread-0 controller.cpp:400 init ] database initialized with hash: 2c2e5b2456b4a2e034cce3e270cd878e7f43e815e2b91805343de7c85c3eb1aa <6>info 2019-06-09T17:31:55.017 thread-0 chain_plugin.cpp:724 plugin_startup ] starting chain in read/write mode <6>info 2019-06-09T17:31:55.017 thread-0 chain_plugin.cpp:728 plugin_startup ] Blockchain started; head block is #2660, genesis timestamp is 2018-06-01T12:00:00.000 <3>error 2019-06-09T17:32:27.018 thread-0 main.cpp:141 main ] std::exception

coreycottrell avatar Jun 09 '19 17:06 coreycottrell