I am trying to initialize the blockchain using

nodeos --genesis-json /home/nodeos/genesis-test.json --config-dir /home/nodeos/.local/share/eosio/nodeos/config --delete-all-blocks

but I am getting an error.

It says that there is a std::exception. I don't understand why this is happening? Could anybody please explain?

I will attach a screenshot of the error for better understanding.enter image description here EDIT

This is my config.ini


http-server-address =

# Maximum size (in MB) of the chain state database (eosio::chain_plugin)
chain-state-db-size-mb = 200000

# The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. (eosio::net_plugin)

# The name supplied to identify this node amongst the peers. (eosio::net_plugin)
agent-name = "EOS2"

# Maximum number of clients from which connections are accepted, use 0 for no limit (eosio::net_plugin)
max-clients = 50

verbose-http-errors = true
http-validate-host = false

# Plugin(s) to enable, may be specified multiple times
plugin = eosio::chain_plugin
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::http_plugin
plugin = eosio::db_size_api_plugin

plugin = eosio::net_api_plugin

plugin = eosio::mongo_db_plugin
contracts-console = true
access-control-allow-origin = *
mongodb-queue-size = 256
mongodb-uri = mongodb://username:[email protected]:27017/EOS2

plugin = eosio::net_plugin
p2p-peer-address =

read-mode = read-only
mongodb-update-via-block-num = true
mongodb-store-blocks = false
mongodb-store-transactions = false
mongodb-store-transaction-traces = false

  • I am getting the same exception while writing just nodeos
    – coder123
    Aug 21, 2019 at 2:52
  • Can you paste your nodeos config.ini and the genesis-test.json if you modified it? Aug 22, 2019 at 3:54
  • @netuoso-EOSTitan I have pasted my config.ini could you take a look at it?
    – coder123
    Sep 2, 2019 at 2:29

2 Answers 2


I was getting the error because, setting up of the P2P connection was wrong.

For properly setting up the P2P connection between any two nodes, regardless of them being producer or non producer nodes follow the following steps in your code. (For your information, I had set up a producer node and a non producer node)

Node 1:

plugin = eosio::net_plugin
http-server-address =
p2p-listen-endpoint =
p2p-peer-address =

Node 2:

plugin = eosio::net_plugin
http-server-address =
p2p-listen-endpoint =
p2p-peer-address =

I had the same problem and I fixed it by deleting all data on ~/.local/share/eosio and on /usr/opt/eosio and ~/eosio-wallet.

I then executed pkill nodeos and pkill keosd on the terminal.

After that I restarted the nodeos :

nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin --plugin eosio::history_plugin --plugin eosio::history_api_plugin --access-control-allow-origin='*' --contracts-console --http-validate-host=false --verbose-http-errors >> nodeos.log 2>&1 & 
  • You mean the data directory inside ~/.local/share/eosio/nodeos/data or the entire nodeos directory itself?
    – coder123
    Sep 2, 2019 at 1:51
  • Do you have to delete /usr/opt/eosio or can it work by just deleting the folder in .local?
    – coder123
    Sep 2, 2019 at 5:52
  • In my case it didn't work by only deleting ~/.local/share/eosio folder. And for the first question i think it doesn't matter, but i deleted the entire nodeos folder.
    – stan
    Sep 3, 2019 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.