EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.28k stars 3.76k forks source link

[mongo-db-plugin] generic server error #6012

Closed guaiguaihw closed 6 years ago

guaiguaihw commented 6 years ago

when I start node with mongo-db-plugin, something error below, I can sync data correctly:

2018-10-16T03:07:55.410 thread-0   bnet_plugin.cpp:1336          plugin_initialize    ] Initialize bnet plugin
2018-10-16T03:07:55.410 thread-0   bnet_plugin.cpp:1349          plugin_initialize    ] ip_port: 0.0.0.0:23188 host: 0.0.0.0 port: 23188 my->_follow_irreversible: false
2018-10-16T03:07:55.410 thread-0   mongo_db_plugin.cpp:1451      plugin_initialize    ] initializing mongo_db_plugin
2018-10-16T03:07:55.410 thread-0   mongo_db_plugin.cpp:1531      plugin_initialize    ] connecting to mongodb://eos:Jk6KbowWCYMLYq@127.0.0.1:27017/eos
2018-10-16T03:07:55.410 thread-0   mongo_db_plugin.cpp:1329      init                 ] init mongo
2018-10-16T03:07:55.411 thread-0   mongo_db_plugin.cpp:513       handle_mongo_excepti ] mongo exception, mongo init, line 1391, code 15, generic server error
2018-10-16T03:07:55.411 thread-0   mongo_db_plugin.cpp:1394      init                 ] starting db plugin thread
2018-10-16T03:07:55.411 thread-0   main.cpp:110                  main                 ] nodeos version mainnet-1.3.0-dirty
2018-10-16T03:07:55.411 thread-0   main.cpp:111                  main                 ] eosio root is /home/huobi/.local/share
2018-10-16T03:07:55.411 thread-0   chain_plugin.cpp:662          plugin_startup       ] starting chain in read/write mode
2018-10-16T03:07:55.411 thread-0   chain_plugin.cpp:666          plugin_startup       ] Blockchain started; head block is #8198776, genesis timestamp is 2018-06-08T08:08:08.888
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:486           plugin_startup       ] start listening for http requests
2018-10-16T03:07:55.411 thread-0   chain_api_plugin.cpp:77       plugin_startup       ] starting chain_api_plugin
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/abi_bin_to_json
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/abi_json_to_bin
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_abi
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_account
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_block
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_block_header_state
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_code
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_code_hash
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_currency_balance
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_currency_stats
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_info
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_producer_schedule
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_producers
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_raw_abi
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_raw_code_and_abi
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_required_keys
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_scheduled_transactions
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_table_by_scope
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_table_rows
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/get_transaction_id
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/push_block
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/push_transaction
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/chain/push_transactions
2018-10-16T03:07:55.411 thread-0   history_api_plugin.cpp:38     plugin_startup       ] starting history_api_plugin
2018-10-16T03:07:55.411 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/history/get_actions
2018-10-16T03:07:55.412 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/history/get_controlled_accounts
2018-10-16T03:07:55.412 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/history/get_key_accounts
2018-10-16T03:07:55.412 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/history/get_transaction
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:3007           plugin_startup       ] starting listener, max clients is 150
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to bp.cryptolions.io:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: bp.cryptolions.io port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to fullnode.eoslaomao.com:443
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: fullnode.eoslaomao.com port: 443
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p.one.eosdublin.io:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p.one.eosdublin.io port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to peer.eosn.io:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: peer.eosn.io port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to peering.mainnet.eoscanada.com:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: peering.mainnet.eoscanada.com port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to 52.196.13.219:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: 52.196.13.219 port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to 52.193.74.253:18181
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: 52.193.74.253 port: 18181
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to peer.main.alohaeos.com:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: peer.main.alohaeos.com port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p.eosargentina.io:5222
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p.eosargentina.io port: 5222
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to node1.blockgenesys.com:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: node1.blockgenesys.com port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to publicnode.cypherglass.com:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: publicnode.cypherglass.com port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to peer.dpos.africa:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: peer.dpos.africa port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to bp.antpool.com:443
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: bp.antpool.com port: 443
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to bp.eosbeijing.one:8080
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: bp.eosbeijing.one port: 8080
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to as1.eosdac.io:49876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: as1.eosdac.io port: 49876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p.bp.fish:9786
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p.bp.fish port: 9786
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p.bitmars.one:8080
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p.bitmars.one port: 8080
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p.eoshenzhen.io:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p.eoshenzhen.io port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p-mainnet.eosgravity.com:8001
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p-mainnet.eosgravity.com port: 8001
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to fullnode.bp.lambda.im:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: fullnode.bp.lambda.im port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to node2.liquideos.com:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: node2.liquideos.com port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to node1.eosnewyork.io:6987
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: node1.eosnewyork.io port: 6987
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to peer2.eosphere.io:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: peer2.eosphere.io port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to br.eosrio.io:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: br.eosrio.io port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to p2p.eossweden.se:9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: p2p.eossweden.se port: 9876
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to peer2.mainnet.helloeos.com.cn:80
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: peer2.mainnet.helloeos.com.cn port: 80
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:717            connection           ] created connection to m.jeda.one:3322
2018-10-16T03:07:55.412 thread-0   net_plugin.cpp:1911           connect              ] host: m.jeda.one port: 3322
2018-10-16T03:07:55.413 thread-0   net_plugin.cpp:717            connection           ] created connection to node1.zbeos.com:9876
2018-10-16T03:07:55.413 thread-0   net_plugin.cpp:1911           connect              ] host: node1.zbeos.com port: 9876
2018-10-16T03:07:55.413 thread-0   net_api_plugin.cpp:63         plugin_startup       ] starting net_api_plugin
2018-10-16T03:07:55.413 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/net/connect
2018-10-16T03:07:55.413 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/net/connections
2018-10-16T03:07:55.413 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/net/disconnect
2018-10-16T03:07:55.413 thread-0   http_plugin.cpp:554           add_handler          ] add api url: /v1/net/status
2018-10-16T03:07:55.413 thread-0   bnet_plugin.cpp:1373          plugin_startup       ] bnet startup
2018-10-16T03:07:55.413 thread-0   bnet_plugin.cpp:346           session              ] open session 1
2018-10-16T03:07:55.413 thread-1   bnet_plugin.cpp:1425          operator()           ] start thread
2018-10-16T03:07:55.413 thread-0   producer_plugin.cpp:692       plugin_startup       ] producer plugin:  plugin_startup() begin
2018-10-16T03:07:55.413 thread-0   producer_plugin.cpp:726       plugin_startup       ] producer plugin:  plugin_startup() end
2018-10-16T03:07:55.413 thread-0   mongo_db_plugin.cpp:1283      ~mongo_db_plugin_imp ] mongo_db_plugin shutdown in process please be patient this can take a few minutes
2018-10-16T03:07:55.413 thread-2   mongo_db_plugin.cpp:412       consume_blocks       ] draining queue, size: 0
2018-10-16T03:07:55.413 thread-2   mongo_db_plugin.cpp:474       consume_blocks       ] mongo_db_plugin consume thread shutdown gracefully
2018-10-16T03:07:55.413 thread-0   bnet_plugin.cpp:1453          plugin_shutdown      ] joining bnet threads
2018-10-16T03:07:55.413 thread-1   bnet_plugin.cpp:1425          operator()           ] end thread
2018-10-16T03:07:55.413 thread-0   bnet_plugin.cpp:1457          plugin_shutdown      ] done joining threads
2018-10-16T03:07:55.413 thread-0   net_plugin.cpp:3039           plugin_shutdown      ] shutdown..
2018-10-16T03:07:55.413 thread-0   net_plugin.cpp:3042           plugin_shutdown      ] close acceptor
2018-10-16T03:07:55.413 thread-0   net_plugin.cpp:3045           plugin_shutdown      ] close 28 connections
2018-10-16T03:07:55.413 thread-0   net_plugin.cpp:3053           plugin_shutdown      ] exit shutdown
2018-10-16T03:07:57.541 thread-0   chain_plugin.cpp:329          plugin_initialize    ] initializing chain plugin
2018-10-16T03:07:57.543 thread-0   block_log.cpp:124             open                 ] Log is nonempty
2018-10-16T03:07:57.543 thread-0   block_log.cpp:142             open                 ] Index is nonempty
2018-10-16T03:07:57.686 thread-0   http_plugin.cpp:422           plugin_initialize    ] configured http to listen on 0.0.0.0:8080
2018-10-16T03:07:57.686 thread-0   net_plugin.cpp:2891           plugin_initialize    ] Initialize net plugin
2018-10-16T03:07:57.686 thread-0   net_plugin.cpp:2917           plugin_initialize    ] host: 0.0.0.0 port: 9876
2018-10-16T03:07:57.686 thread-0   net_plugin.cpp:2988           plugin_initialize    ] my node_id is 2364240df70b5546e8bcf0c01b7dfbae817ab8b99fc5f08e27838233ed6a0087
2018-10-16T03:07:57.686 thread-0   net_api_plugin.cpp:96         plugin_initialize    ]
**********SECURITY WARNING**********
*                                  *
* --         Net API            -- *
* - EXPOSED to the LOCAL NETWORK - *
* - USE ONLY ON SECURE NETWORKS! - *
*                                  *
************************************

I could connect to mongodb use shell:

mongo -u eos -p Jk6KbowWCYMLYq 127.0.0.1:27017/eos

what should I do to make it right?

guaiguaihw commented 6 years ago

When I change mongodb-uri = mongodb://127.0.0.1:27017/EOS to default,I could not create default database EOS. My db version is version v2.6.10.

guaiguaihw commented 6 years ago

I find the reason, my db version need to update to v3.x, then the node could connect to db.