无法将GethNode连接到外部GethNode

时间:2018-08-14 17:18:39

标签: ethereum go-ethereum geth

我想将本地的Geth实例连接到ubuntu服务器上的专用以太坊网络。

系统信息

Geth版本:1.8.12 操作系统和版本:Ubuntu 18.4

预期行为

本地Geth节点是非矿工节点,我想通过该节点将交易发送到服务器上我的专用网络(由Geth节点组成)。

实际行为 我的本地GethNode的

net.peerCount返回0

重现行为的步骤

我使用bootnode连接所有节点,如--bootnode标志所示 运行服务器Geth节点: geth --datadir "./ethnode1" --networkid 2061 --port 30304 --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcport 8545 --rpcapi="db,eth,net,web3,personal,web3" --ipcpath "./ethnode1/geth.ipc" --mine --minerthreads 1 --gasprice "10000" --etherbase 0xa17ae57bfb4a63b8cbd0c79bc74440791a2a6115 --verbosity 3 --bootnodes "enode://08622fab0c0b4f6268976eb8678ae4bc72271d726825d4a8a60034a7436ae199081294c4c35875a2ca65e8f2bfee3e7d26f727d96a39815d523b150805aff913@server-ip:30301"   geth --datadir "./ethnode2" --networkid 2061 --port 30305 --rpc --rpcaddr 0.0.0.0 --rpccorsdomain "*" --rpcport 8546 --rpcapi="db,eth,net,web3,personal,web3" --ipcpath "./ethnode2/geth.ipc" --mine --minerthreads 1 --gasprice "10000" --etherbase 0x6451cb262925d2ad23747240035f52e1a5e3f1d3 --verbosity 3 --bootnodes "enode://08622fab0c0b4f6268976eb8678ae4bc72271d726825d4a8a60034a7436ae199081294c4c35875a2ca65e8f2bfee3e7d26f727d96a39815d523b150805aff913@erver-ip:30301" 运行本地Geth节点:   geth --datadir "./localnode" --networkid 2061 --ws --wsaddr externalip --rpc --rpcaddr externalip --rpccorsdomain "*" --wsapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --rpcapi "admin,db,eth,debug,miner,net,shh,txpool,personal,web3" --bootnodes "enode://08622fab0c0b4f6268976eb8678ae4bc72271d726825d4a8a60034a7436ae199081294c4c35875a2ca65e8f2bfee3e7d26f727d96a39815d523b150805aff913@serverip:30301"

[backtrace]

1 个答案:

答案 0 :(得分:0)

我检查了日志,发现我的创世文件版本不同。