If you have an error in your config.ini such that the port is already in use, then the blocks log is actually created corrupt and nodeos will never start unless you remove the corrupt blocks.
The startup sequence probably needs to be re-arranged to prevent this problem.
$ nodeos -c config/config.ini -l config/logging.json -d data --genesis-json=config/genesis.json
info 2019-01-20T16:20:45.098 thread-0 http_plugin.cpp:422 plugin_initialize ] configured http to listen on 0.0.0.0:8888
info 2019-01-20T16:20:45.098 thread-0 chain_plugin.cpp:335 plugin_initialize ] initializing chain plugin
info 2019-01-20T16:20:45.098 thread-0 chain_plugin.cpp:616 plugin_initialize ] Using genesis state provided in 'config/genesis.json'
warn 2019-01-20T16:20:45.098 thread-0 chain_plugin.cpp:618 plugin_initialize ] Starting up fresh blockchain with provided genesis state.
info 2019-01-20T16:20:45.123 thread-0 net_plugin.cpp:2762 plugin_initialize ] Initialize net plugin
info 2019-01-20T16:20:45.123 thread-0 net_plugin.cpp:2787 plugin_initialize ] host: 0.0.0.0 port: 9875
info 2019-01-20T16:20:45.123 thread-0 net_plugin.cpp:2859 plugin_initialize ] my node_id is f77f40f0fb07f4df8697244f903efd2c41b046177a5cd5079e2e7aadf3f8be69
info 2019-01-20T16:20:45.123 thread-0 http_plugin.cpp:377 operator() ] configured http with Access-Control-Allow-Origin: *
error opening GELF socket to endpoint graylog.eosn.io:12201
info 2019-01-20T16:20:45.124 thread-0 main.cpp:107 main ] nodeos version v1.6.0-rc2-16-g1630648ff
info 2019-01-20T16:20:45.124 thread-0 main.cpp:108 main ] eosio root is /root/.local/share
info 2019-01-20T16:20:45.124 thread-0 main.cpp:109 main ] nodeos using configuration file config/config.ini
info 2019-01-20T16:20:45.124 thread-0 main.cpp:110 main ] nodeos data directory is data
info 2019-01-20T16:20:45.124 thread-0 http_plugin.cpp:486 plugin_startup ] start listening for http requests
error 2019-01-20T16:20:45.124 thread-0 http_plugin.cpp:493 plugin_startup ] http service failed to start: Address already in use
error 2019-01-20T16:20:45.132 thread-0 main.cpp:149 main ] Address already in use
$ nano config/config.ini
[fixing the duplicate port error]
$ nodeos -c config/config.ini -l config/logging.json -d data --genesis-json=config/genesis.json
info 2019-01-20T16:20:59.618 thread-0 http_plugin.cpp:422 plugin_initialize ] configured http to listen on 0.0.0.0:8885
info 2019-01-20T16:20:59.618 thread-0 chain_plugin.cpp:335 plugin_initialize ] initializing chain plugin
warn 2019-01-20T16:20:59.618 thread-0 chain_plugin.cpp:707 plugin_initialize ] 3190000 block_log_exception: Block log exception
Block log was not setup properly.
{}
thread-0 block_log.cpp:537 extract_genesis_state
error 2019-01-20T16:20:59.618 thread-0 main.cpp:129 main ] 3190000 block_log_exception: Block log exception
Block log was not setup properly.
{}
thread-0 block_log.cpp:537 extract_genesis_state
rethrow
{}
thread-0 chain_plugin.cpp:707 plugin_initialize
Now if you remove the contents of the data directory, it starts fine.
Is there two nodeos processes running and accessing the same log file?
I can run multiple nodeos processes on the same machine just fine (3 running right now). This specific sequence of configuration causes this problem.
After delete the data directory after the failed startup, it works fine.
Agree, this is an ordering issue in ctors/plugin_initialize/plugin_startup when one of these throws (like being unable to bind to a port)
In order to focus our efforts on issues that are currently creating difficulty for the community we are closing tickets that were created prior to the EOSIO 2.0 release. If you believe this issue is still relevant please feel free to reopen it or create a new one. Thank you for your continued support of EOSIO!
The case of a port being already in use and creating a inconsistent data seems to work fine on 2.0.6
Most helpful comment
The case of a port being already in use and creating a inconsistent data seems to work fine on 2.0.6