Open trungtt198x opened 6 years ago
Abrupt peer disconnect
is not a problem by itself, the peer could disconnect for various reasons.
IPC worked for me on recent commits. What exactly does geth attach
show?
Also you could try deleting ~/.ethereum/network.rlp
to see if it helps when the sync is stuck
Previously, it was still working fine. But now it is no longer working at the informed commit ID. Here's the log output when starting the "eth" with private chain:
ubuntu@ip-10-0-1-45:~/Work-cpp/testnet-scripts$ cpp-ethereum, a C++ Ethereum client ⧎ ℹ 02:58:21 AM.540|eth Id: ##c546ce2c… ... 02:58:21 AM.561|eth Opened blockchain DB. Latest: #a28bd271… (rebuild not needed) ⧫ ◎ 02:58:21 AM.571|eth startedWorking() cpp-ethereum 1.3.0 By cpp-ethereum contributors, (c) 2013-2016. See the README for contributors and credits. ℹ 02:58:25 AM.056|p2p UPnP device: http://10.0.1.45:36118/rootDesc.xml [st: urn:schemas-upnp-org:device:InternetGatewayDevice:1 ] ⧎ ℹ 02:58:25 AM.057|p2p Punched through NAT and mapped local port 30300 onto external port 30300 . ⧎ ℹ 02:58:25 AM.057|p2p External addr: 54.249.20.44 ⧎ ℹ 02:58:25 AM.057|p2p p2p.started id: ##c546ce2c… ⚡ 02:58:25 AM.067|eth void dev::p2p::Host::start() 2063 ms Node ID: enode://c546ce2ca8302fcb2e3aa85c93dc333bbcf111653cc9fccd48f1578b750c30631cb9b4e5b0888f6a516902b8882fe7462b11a1776305a1b542a173f02d6dce9f@54.249.20.44:30300 ⧫ ◎ 02:58:36 AM.573|eth Since 2018-01-31 02:58:21.563Z (15): 15ticks
I have realized that some important options for enabling JSON-RPC are removed at the informed commitID: --json-rpc --json-rpc-port --rpccorsdomain
Is it the root cause why JSON-RPC interaction via HTTP is impossible ???? Although "geth attach" with the geth.ipc works fine?
@gumb0 I have also tried deleting : ~/.ethereum/network.rlp However, it doesn't help. So far, I only get "Error reading - Abrupt peer disconnect: End of file"
geth attach
to IPC should work fine.
To connect to HTTP RPC you need now to start the script scripts/jsonrpcproxy.py
. It has options for custom port and URL
You might be syncing with the main net fine, just don't see it in the console output. You can try increasing verbosity, or better check it through RPC
@gumb0 @chfast The scripts/jsonrpcproxy.py is nice for enabling HTTP-based RPC-interaction with the eth node. However, it would have been nicer to keep the options such as "--json-rpc" and "--json-rpc-port" in the source code so that we could have more choices of interest !
@gumb0 Thanks for your hint. Now I can enable HTTP RPC interaction for the "eth" node via the script "jsonrpcproxy.py". However, seemingly that the RPC-interaction is read-only because when I try creating new account, I get the error as follows:
./geth attach http://54.249.20.44:8100 Welcome to the Geth JavaScript console!
personal.newAccount("trung") Error: Post http://54.249.20.44:8100: EOF
I have pulled the commit ID 26f5c03ef82a67f2d26cda84a31363d208b88562 (January 2018). After that I have built the binary "eth" with MINIUPNP enabled and then started the "eth" client that will connect to the mainnet as default. It is supposed to work straightforward. However, although the "eth" client can be started successfully, but I cannot "geth attach" to it for RPC interaction. Furthermore, there comes a lot of log like this "p2p|a930a2be…|Parity/v1.8.6-beta-2d051e4-20180109/x86_64-linux-gnu/rustc1.22.1 Error reading - Abrupt peer disconnect"
Previously I was using the "eth" version around mid December last year and it was working fine.