eos icon indicating copy to clipboard operation
eos copied to clipboard

db_plugin not storing blocks

Open michaeljyeates opened this issue 9 years ago • 6 comments

I am testing the db_plugin to store the chain data in mongo.

The EOS database was created and there are Blocks, Messages and Accounts collections. Accounts contains 1 document with name "eos" but the other 2 collections are empty

The eosd reports this error almost every block

3252004ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

The currency example contract works and persists after an eosd restart

michaeljyeates avatar Nov 06 '17 09:11 michaeljyeates

The error is an indications that an attempt was made to restart ./eosd with an existing blockchain and existing mongodb but that no blocks were persisted in the previous run. Can you provide steps to reproduce starting with an empty mongodb and new chain? Please include command line arguments to eosd.

heifner avatar Nov 06 '17 13:11 heifner

eosd is being launched with this command

LD_LIBRARY_PATH=/usr/local/lib/ ./eosd

I added the LD_LIBRARY for the mongo libraries.

It doesnt seem to be restarting itself, here is a full log

1842007ms thread-0 chain_controller.cpp:216 _push_block ] initq #28177 @2017-11-06T15:30:42 | 0 trx, 0 pending, exectime_ms=1 1842008ms thread-0 producer_plugin.cpp:214 block_production_loo ] initq generated block #28177 @ 2017-11-06T15:30:42 with 0 trxs 0 pending 1842008ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

1845003ms thread-0 chain_controller.cpp:216 _push_block ] inito #28178 @2017-11-06T15:30:45 | 0 trx, 0 pending, exectime_ms=1 1845004ms thread-0 producer_plugin.cpp:214 block_production_loo ] inito generated block #28178 @ 2017-11-06T15:30:45 with 0 trxs 0 pending 1845004ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

1848005ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

1848007ms thread-0 chain_controller.cpp:216 _push_block ] inite #28179 @2017-11-06T15:30:48 | 0 trx, 0 pending, exectime_ms=3 1848007ms thread-0 producer_plugin.cpp:214 block_production_loo ] inite generated block #28179 @ 2017-11-06T15:30:48 with 0 trxs 0 pending 1851003ms thread-0 chain_controller.cpp:216 _push_block ] initc #28180 @2017-11-06T15:30:51 | 0 trx, 0 pending, exectime_ms=1 1851007ms thread-0 producer_plugin.cpp:214 block_production_loo ] initc generated block #28180 @ 2017-11-06T15:30:51 with 0 trxs 0 pending 1851006ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

1854005ms thread-0 chain_controller.cpp:216 _push_block ] initg #28181 @2017-11-06T15:30:54 | 0 trx, 0 pending, exectime_ms=1 1854008ms thread-0 producer_plugin.cpp:214 block_production_loo ] initg generated block #28181 @ 2017-11-06T15:30:54 with 0 trxs 0 pending 1854008ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

1857005ms thread-1 db_plugin.cpp:240 process_irreversible ] FC Exception while processing block unspecified (0) No blocks found in database

1857006ms thread-0 chain_controller.cpp:216 _push_block ] initm #28182 @2017-11-06T15:30:57 | 0 trx, 0 pending, exectime_ms=3 1857007ms thread-0 producer_plugin.cpp:214 block_production_loo ] initm generated block #28182 @ 2017-11-06T15:30:57 with 0 trxs 0 pending 1860003ms thread-0 chain_controller.cpp:216 _push_block ] initj #28183 @2017-11-06T15:31:00 | 0 trx, 0 pending, exectime_ms=0 1860003ms thread-0 producer_plugin.cpp:214 block_production_loo ] initj generated block #28183 @ 2017-11-06T15:31:00 with 0 trxs 0 pending 1863002ms thread-0 chain_controller.cpp:216 _push_block ] initu #28184 @2017-11-06T15:31:03 | 0 trx, 0 pending, exectime_ms=0 1863002ms thread-0 producer_plugin.cpp:214 block_production_loo ] initu generated block #28184 @ 2017-11-06T15:31:03 with 0 trxs 0 pending 1866003ms thread-0 chain_controller.cpp:216 _push_block ] initp #28185 @2017-11-06T15:31:06 | 0 trx, 0 pending, exectime_ms=0 1866003ms thread-0 producer_plugin.cpp:214 block_production_loo ] initp generated block #28185 @ 2017-11-06T15:31:06 with 0 trxs 0 pending 1869002ms thread-0 chain_controller.cpp:216 _push_block ] inita #28186 @2017-11-06T15:31:09 | 0 trx, 0 pending, exectime_ms=0 1869002ms thread-0 producer_plugin.cpp:214 block_production_loo ] inita generated block #28186 @ 2017-11-06T15:31:09 with 0 trxs 0 pending 1872003ms thread-0 chain_controller.cpp:216 _push_block ] initg #28187 @2017-11-06T15:31:12 | 0 trx, 0 pending, exectime_ms=0 1872003ms thread-0 producer_plugin.cpp:214 block_production_loo ] initg generated block #28187 @ 2017-11-06T15:31:12 with 0 trxs 0 pending 1875002ms thread-0 chain_controller.cpp:216 _push_block ] initm #28188 @2017-11-06T15:31:15 | 0 trx, 0 pending, exectime_ms=0 1875003ms thread-0 producer_plugin.cpp:214 block_production_loo ] initm generated block #28188 @ 2017-11-06T15:31:15 with 0 trxs 0 pending

michaeljyeates avatar Nov 06 '17 15:11 michaeljyeates

Certainly in a bad state now. If you can provide repro steps to get into this state that would be appreciated.

To get back to a clean state, start with: ./eosd --resync

heifner avatar Nov 06 '17 16:11 heifner

Just starting eosd with no command line options results in broken state. Attached is my config.ini

config.ini.zip

restarting with --resync fixes everything

michaeljyeates avatar Nov 06 '17 22:11 michaeljyeates

I tried your config.ini file and was not able to reproduce your issue. The ./eosd --resync wipes the database. I suspect you had a previous run with an improper shutdown. If you can provide steps to reproduce your problem feel free to reopen this issue or create another.

heifner avatar Nov 07 '17 15:11 heifner

@heifner hi,heifner,

i have resolved the same issue by your suggestion "./eosd --resync",i built the node (dawn-2.x) in docker ,my config as following : config.ini.txt

gglzf4 avatar Feb 11 '18 05:02 gglzf4