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

--replay-blockchain does not work #4002

Closed
villesundell opened this issue Jun 10, 2018 · 19 comments
Closed

--replay-blockchain does not work #4002

villesundell opened this issue Jun 10, 2018 · 19 comments

Comments

@villesundell
Copy link
Contributor

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).

@EOSBIXIN
Copy link

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

@ariel1420
Copy link

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

@i-am-logger
Copy link

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

@arielaguirre1420
Copy link

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.

@i-am-logger
Copy link

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

@realSinged
Copy link

same problem~

@goljl
Copy link

goljl commented Jun 19, 2018

try --hard-replay-blockchain

@taokayan
Copy link
Contributor

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

@qs-lll
Copy link

qs-lll commented Jun 26, 2018

does not work with --hard-replay-blockchain

@qs-lll
Copy link

qs-lll commented Jun 26, 2018

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

@lcgogo
Copy link
Contributor

lcgogo commented Jun 28, 2018

--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.

@orange1337
Copy link

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
Copy link

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

@Drug0j
Copy link

Drug0j commented Jul 11, 2018

sudo ./nodeos

@villesundell
Copy link
Contributor Author

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

@csquan
Copy link

csquan commented Aug 23, 2018

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

@jellyhi
Copy link

jellyhi commented Nov 9, 2018

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

@coreycottrell
Copy link

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

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

16 participants