bcosorg / bcos

BCOS平台(Be Credible, Open & Secure)
GNU General Public License v3.0
872 stars 286 forks source link

重启服务器之后报错 #92

Open shark1212 opened 6 years ago

shark1212 commented 6 years ago

首次安装成功,一切正常,并且也成功组网两个节点,块增长也是正常的 重新启动了服务器之后,分别启动两个节点,再次查看块就没有变化了 执行babel-node tool.js NodeAction all命令,输出: RPC=http://192.168.1.236:8545 Ouputpath=./output/ { HttpProvider: 'http://192.168.1.236:8545', Ouputpath: './output/', privKey: '2e0fbe8c5eee86535e307c715b896aee66aa852ec8605e735ed6ceb3215cb0db', account: '0x5ef3e0baf1b8ba1616c4268d0e4ce8bcb19af79c' } Soc File :NodeAction Func :all 系统合约地址0xf1ac9d2a5b93c49a2d8f894afa808159b7a2d6b3 NodeAction合约地址0x80baf240110334d947cc913d372c1f4462ae6470 NodeIdsLength= 2 ----------node 0--------- id=7602f23d0bef751640fcb63aeb9b3efaf17c60cd15db00f0ba88e16e0eb6e5cec20864d19199b4b4ea3e32164da03620b8dd910374fd9d5ddba77401926e06aa ip=192.168.1.236 port=30303 category=1 desc=node0 CAhash= agencyinfo=node0 blocknumber=2564 Idx=0 ----------node 1--------- id=924a9b30efcb87d8d73210f6ff24bee823a4bc6a9cb7173beb5689ffc0414891e70676f3d60842e101deae100f5dc900b20230bb5c479d15aa7096ffc9f63cb2 ip=192.168.1.236 port=30304 category=1 desc=node2 CAhash= agencyinfo=node2 blocknumber=5488 Idx=1

看似正常,但是就是块高无变化,而且使用babel-node monitor.js命令时,一直报错: 已连接节点数:0 admin_peers 返回解析失败![object Object]

运行日志中出现如下提示: INFO|2018-01-30 09:54:36|--TXSTAT--|--TXSTAT-- 09时54分36秒.399|bcoseth VM took: 69 Hash= #d75f313a… ,Randid= 1918604602 INFO|2018-01-30 09:54:36|--TXSTAT--|--TXSTAT-- 09时54分36秒.399|bcoseth VM took: 177 Hash= #63ddc891… ,Randid= 1918604875 INFO|2018-01-30 09:54:36|checkNodesValid : cefeca3ca27dd628b696668c8443970e6406e0cd0746faf068ff14f3c8ec41a39748195db5021509df4a151a5bad3acb868483d1328d2ae744231d994b8ecd51|192.168.1.236|30303|1|node0|node0||0

INFO|2018-01-30 09:54:36|checkNodesValid : 4083feea37ce7ddf601434dfda3ac33c745247d74bff6f347c0f126679627008342ea3857e4295377aafa52b6b712ce7e20f487bd0d2a414c91ca1455340d38d|192.168.1.236|30304|1|node1|node1||1

INFO|2018-01-30 09:54:36|checkNodesValid is 1

INFO|2018-01-30 09:54:36|call systemcontract diff nodes. add nodes size is 1.del nodes size is 0

INFO|2018-01-30 09:54:36|resetConfig: m_node_idx=0, m_node_num=2 INFO|2018-01-30 09:54:36|PBFT initEnv success INFO|2018-01-30 09:54:36|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Report: blk=1359,hash=55d164d7…,idx=1, Next: blk=1360 INFO|2018-01-30 09:54:36|Init PBFTClient success INFO|2018-01-30 09:54:38|⧎ ℹ|⧎ ℹ 09时54分38秒.979|p2p Listen address set to Public address: 192.168.1.236 . UPnP disabled. INFO|2018-01-30 09:54:43|^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Report: blk=1359,hash=55d164d7…,idx=1, Next: blk=1360 INFO|2018-01-30 09:55:36|collectGarbage timecost(ms)=0.001 INFO|2018-01-30 09:56:36|collectGarbage timecost(ms)=0.001 INFO|2018-01-30 09:57:36|collectGarbage timecost(ms)=0.001 INFO|2018-01-30 09:58:36|collectGarbage timecost(ms)=0.001

shark1212 commented 6 years ago

还是配置文件的问题,已经解决了

zhige2003 commented 6 years ago

我有类似的问题,核查了配置文件没有发现问题,烦请回复您查到的是哪个配置有问题导致的哦?

zhige2003 commented 6 years ago

我是在阿里云主机上进行安装,发现个现象,端口都启动到了ipv6地址上,这个是在bcos上面可以指定到ipv4上么?

zhige2003 commented 6 years ago

node-0的config.json { "sealEngine": "PBFT", "systemproxyaddress":"0xa4f9211d4f5ead26e9d3e8b8bf28eed5fd070fdd", "listenip":"127.0.0.1", "rpcport":"35500", "p2pport":"53300", "wallet":"/nodedata/keys.info", "keystoredir":"/nodedata/keystore/", "datadir":"/nodedata/", "vm":"interpreter", "networkid":"123456", "logverbosity":"8", "coverlog":"OFF", "eventlog":"ON", "logconf":"/nodedata/log.conf", "params": { "accountStartNonce": "0x0", "maximumExtraDataSize": "0x0", "tieBreakingGas": false, "blockReward": "0x0", "networkID" : "0x0" }, "NodeextraInfo":[ { "Nodeid":"6c58fcb2ed908627d51b3b81a6ffffe668e6a1e1e7f4eeeebab3d4dd3de7faf932eeca9af0e2915202d09583fcad5569bec40f1e7422b8eaa7b9024a39312992", "Nodedesc": "node0", "Agencyinfo": "node0", "Peerip": "127.0.0.1", "Identitytype": 1, "Port":53300, "Idx":0 } ] }

node-0的genesis.json { "nonce": "0x0", "difficulty": "0x0", "mixhash": "0x0", "coinbase": "0x0", "timestamp": "0x0", "parentHash": "0x0", "extraData": "0x0", "gasLimit": "0x13880000000000", "god":"0x4d23de3297034cdd4a58db35f659a9b61fc7577b", "alloc": {}, "initMinerNodes":["6c58fcb2ed908627d51b3b81a6ffffe668e6a1e1e7f4eeeebab3d4dd3de7faf932eeca9af0e2915202d09583fcad5569bec40f1e7422b8eaa7b9024a39312992"] }

node-1的config.json { "sealEngine": "PBFT", "systemproxyaddress":"0xa4f9211d4f5ead26e9d3e8b8bf28eed5fd070fdd", "listenip":"127.0.0.1", "rpcport":"35501", "p2pport":"53301", "wallet":"/nodedata/keys.info", "keystoredir":"/nodedata/keystore/", "datadir":"/nodedata/", "vm":"interpreter", "networkid":"123456", "logverbosity":"8", "coverlog":"OFF", "eventlog":"ON", "logconf":"/nodedata/log.conf", "params": { "accountStartNonce": "0x0", "maximumExtraDataSize": "0x0", "tieBreakingGas": false, "blockReward": "0x0", "networkID" : "0x0" }, "NodeextraInfo":[ { "Nodeid":"6c58fcb2ed908627d51b3b81a6ffffe668e6a1e1e7f4eeeebab3d4dd3de7faf932eeca9af0e2915202d09583fcad5569bec40f1e7422b8eaa7b9024a39312992", "Nodedesc": "node0", "Agencyinfo": "node0", "Peerip": "127.0.0.1", "Identitytype": 1, "Port":53300, "Idx":0 }, { "Nodeid":"5d5be6b9c976f1d780c33946712ee3cb5fbeaf3d991aa592c68131bb35fdae8d2981369aa8775ed00fa55085415bbdbd22a760cf7b2ffdeda97cd9274b42a8d2", "Nodedesc": "node1", "Agencyinfo": "node1", "Peerip": "127.0.0.1", "Identitytype": 1, "Port":53301, "Idx":1 } ] }

node-1的genesis.json { "nonce": "0x0", "difficulty": "0x0", "mixhash": "0x0", "coinbase": "0x0", "timestamp": "0x0", "parentHash": "0x0", "extraData": "0x0", "gasLimit": "0x13880000000000", "god":"0x4d23de3297034cdd4a58db35f659a9b61fc7577b", "alloc": {}, "initMinerNodes":["6c58fcb2ed908627d51b3b81a6ffffe668e6a1e1e7f4eeeebab3d4dd3de7faf932eeca9af0e2915202d09583fcad5569bec40f1e7422b8eaa7b9024a39312992"] }

babel-node tool.js NodeAction all的结果 RPC=http://127.0.0.1:35500 Ouputpath=./output/ { HttpProvider: 'http://127.0.0.1:35500', Ouputpath: './output/', privKey: '7d373eb4872368bb51d7ac083ac4752bca9ecb70066df43457500528faeea8f3', account: '0xec23de21751378995fe87691f1c2e6c895cfa07b' } Soc File :NodeAction Func :all 系统合约地址0xa4f9211d4f5ead26e9d3e8b8bf28eed5fd070fdd NodeAction合约地址0xe7778129b597fea8d9aa923f4fff32a699d59d23 NodeIdsLength= 2 ----------node 0--------- id=6c58fcb2ed908627d51b3b81a6ffffe668e6a1e1e7f4eeeebab3d4dd3de7faf932eeca9af0e2915202d09583fcad5569bec40f1e7422b8eaa7b9024a39312992 ip=127.0.0.1 port=53300 category=1 desc=node0 CAhash= agencyinfo=node0 blocknumber=142729 Idx=0 ----------node 1--------- id=5d5be6b9c976f1d780c33946712ee3cb5fbeaf3d991aa592c68131bb35fdae8d2981369aa8775ed00fa55085415bbdbd22a760cf7b2ffdeda97cd9274b42a8d2 ip=127.0.0.1 port=53301 category=1 desc=node1 CAhash= agencyinfo=node1 blocknumber=142773 Idx=1

zhige2003 commented 6 years ago

请大神帮忙看看是什么原因