ethereum / aleth

Aleth – Ethereum C++ client, tools and libraries
GNU General Public License v3.0
3.96k stars 2.17k forks source link

Latest release - Error - JSON RPC Error - Probably cannot connect #3093

Open bobsummerwill opened 8 years ago

bobsummerwill commented 8 years ago

From @billprescott on January 27, 2016 19:1

Hi

Did an update today for ethminer and the miner has stopped working.. Now been mining for many months but the latest updates have stopped it from connecting to geth.

15.04 Ubuntu

Start using following

geth --rpc --rpccorsdomain localhost 2>> geth.log & ethminer -G

Error - JSON RPC Error - Probably cannot connect

repeats over and over.

Any suggestions?

thanks

Copied from original issue: ethereum/webthree-umbrella#143

bobsummerwill commented 8 years ago

From @billprescott on January 28, 2016 5:23

FYI - Have found 1 other person so far with the same issue.

bobsummerwill commented 8 years ago

From @chriseth on January 28, 2016 10:48

There could be multiple reasons why this does not work. Could you run ethminer -v 9 -G please? If you know how to do it, a tcp dump of the network traffic at port 8545 would be great!

bobsummerwill commented 8 years ago

From @billprescott on January 29, 2016 0:22

Many thanks

Please see attached.

Have attached a few things.. I ran ethminer -v 9 -G and have attached a photo of what happens.

I ran tcpdump when nothing was running I ran tcpdump -v when nothing was running I ran tcpdump -v when the miner was trying to run.

Let me know if you need anything else.

regards

B.

bobsummerwill commented 8 years ago

From @chriseth on January 29, 2016 20:21

Thanks for the logs! So there might be a small misunderstanding here. Do you have a running geth or eth node at the same machine? ethminer is just the miner, all it can do is solve the proof of work. You need an actual ethereum node that connects to the network and creates work packages for ethminer.

bobsummerwill commented 8 years ago

From @billprescott on January 29, 2016 20:54

It connects to geth when I start ethminer.

On 30 Jan 2016, at 7:21 AM, chriseth notifications@github.com wrote:

Thanks for the logs! So there might be a small misunderstanding here. Do you have a running geth or eth node at the same machine? ethminer is just the miner, all it can do is solve the proof of work. You need an actual ethereum node that connects to the network and creates work packages for ethminer.

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @chriseth on January 29, 2016 21:5

Hm, the logs you sent indicate that the first thing ethminer does is complain that it cannot connect. Are you saying the issue is resolved?

bobsummerwill commented 8 years ago

From @billprescott on January 29, 2016 21:9

No the issue is still there. It does not start.

I use.

geth --rpc --rpccorsdomain localhost 2>> geth.log & ethminer -G

To start the miner but it throws the JSON error.

On 30 Jan 2016, at 8:05 AM, chriseth notifications@github.com wrote:

Hm, the logs you sent indicate that the first thing ethminer does is complain that it cannot connect. Are you saying the issue is resolved?

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @chriseth on January 29, 2016 21:10

It might take geth a while to start up. Could you try telnet localhost 8545 and see whether it connects?

bobsummerwill commented 8 years ago

From @billprescott on January 29, 2016 21:14

Unfortunately I am not near the machine for the next 4 hours. Will try later and send the results. FYI I let it run for 8 hours and it would not connect.

On 30 Jan 2016, at 8:10 AM, chriseth notifications@github.com wrote:

It might take geth a while to start up. Could you try telnet localhost 8545 and see whether it connects?

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @billprescott on January 30, 2016 1:43

Ran it

Trying 127.0.0.1 Telnet: Unable to connect to remote host: connection refused.

Any Suggestions?

On 30 Jan 2016, at 8:10 AM, chriseth notifications@github.com wrote:

It might take geth a while to start up. Could you try telnet localhost 8545 and see whether it connects?

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @billprescott on February 1, 2016 21:21

Hi.

Any idea why it would not connect after the upgrade?

Thanks.

On 30 Jan 2016, at 8:10 AM, chriseth notifications@github.com wrote:

It might take geth a while to start up. Could you try telnet localhost 8545 and see whether it connects?

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @billprescott on February 1, 2016 23:3

FYI

Can telnet to other ports. Appears nothing is listening for that port.

Let me know if there is any ideas as I may need to blow away the machine and start again :-(

Thanks.

On 30 Jan 2016, at 8:10 AM, chriseth notifications@github.com wrote:

It might take geth a while to start up. Could you try telnet localhost 8545 and see whether it connects?

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @billprescott on February 2, 2016 21:49

I take it from the quietness on this case there is nothing else to be done?

On 30 Jan 2016, at 8:10 AM, chriseth notifications@github.com wrote:

It might take geth a while to start up. Could you try telnet localhost 8545 and see whether it connects?

— Reply to this email directly or view it on GitHub.

bobsummerwill commented 8 years ago

From @5chdn on February 3, 2016 10:35

having the same issue. ethminer wont mine on a local geth node with the symptomes described above. can provide any details, just ask.

Geth log keeps saying "don't panic":

 I0201 10:40:49.998643 miner/api.go:61] No work available yet, don't panic.
bobsummerwill commented 8 years ago

From @5chdn on February 3, 2016 12:41

Running geth:

0 ✓ user@r9-270x ~ $ geth --verbosity 3 --rpc console 2>> /tmp/eth.log
instance: Geth/v1.4.0-unstable/linux/go1.5.1
coinbase: 0x000000000000000000000000000000000000000
at block: 947283 (Wed, 03 Feb 2016 13:13:02 CET)
 datadir: /home/user/.ethereum
> net.peerCount
13
> eth.blockNumber
947345

Mining with ethminer:

0 ✓ user@r9-270x ~ $ ethminer -v 9 -G --opencl-device 1
[OPENCL]:Found suitable OpenCL device [Pitcairn] with 1907359744 bytes of GPU memory
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
JSON-RPC problem. Probably couldn't connect. Retrying in 1...
^CON-RPC problem. Probably couldn't connect. Retrying in 2...
130 ✗ user@r9-270x ~ $ tail -n9 /tmp/eth.log
I0203 13:19:07.793661 core/blockchain.go:1251] imported 1 block(s) (0 queued 0 ignored) including 1 txs in 17.48699ms. #947302 [1979d110 / 1979d110]
I0203 13:19:07.799169 miner/worker.go:570] commit new work on block 947303 with 1 txs & 0 uncles. Took 5.367899ms
I0203 13:19:08.103859 miner/api.go:61] No work available yet, don't panic.
I0203 13:19:10.106233 miner/api.go:61] No work available yet, don't panic.
I0203 13:19:12.108578 miner/api.go:61] No work available yet, don't panic.
I0203 13:19:16.112759 miner/api.go:61] No work available yet, don't panic.
I0203 13:19:18.114859 miner/api.go:61] No work available yet, don't panic.
I0203 13:19:20.116927 miner/api.go:61] No work available yet, don't panic.
I0203 13:19:34.993775 core/blockchain.go:1251] imported 1 block(s) (0 queued 0 ignored) including 1 txs in 8.027245ms. #947303 [3ef943f4 / 3ef943f4]

TCP dump while mining:

0 ✓ user@r9-270x ~ $ sudo tcpdump -v > tcpdump.log
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C521 packets captured
544 packets received by filter
0 packets dropped by kernel

Full TCP dump: https://gist.github.com/5chdn/201501940c4d16e658ae

Checking telnet:

0 ✓ user@r9-270x ~ $ telnet localhost 8545
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
quit
HTTP/1.1 400 Bad Request

Connection closed by foreign host.
1 ✗ user@r9-270x ~ $ telnet 127.0.0.1 8545
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
quit
HTTP/1.1 400 Bad Request

Connection closed by foreign host.
1 ✗ user@r9-270x ~ $ 

Is there anything else we could provide?

bobsummerwill commented 8 years ago

From @5chdn on February 3, 2016 12:44

Running geth with verbosity 9 maybe:

0 ✓ user@r9-270x ~ $ geth --verbosity 9 --rpc console 2>> /tmp/eth.log

Log shows some EOF from the RPC:

I0203 13:39:00.571578 rpc/server.go:153] EOF
I0203 13:39:00.572048 miner/api.go:61] No work available yet, don't panic.
I0203 13:39:00.572440 rpc/server.go:153] EOF

Full log: https://gist.github.com/5chdn/aa9fab38356809f6a538

bobsummerwill commented 8 years ago

From @chriseth on February 3, 2016 14:32

Hm, the tcp dump does not show anything on port 8545. Perhaps you have to dump the loopback-device? Your geth shows "coinbase: 0x0000..0000", so just a shot in the dark: Perhaps it helps to set it to an actual address?

bobsummerwill commented 8 years ago

From @5chdn on February 3, 2016 17:0

i entered 0x0 manually. just a privacy thing :)

will have a look at the lo device.

bobsummerwill commented 8 years ago

From @billprescott on February 5, 2016 0:33

Update - Did another apt-get update and - apt-get upgrade and now we are getting less errors. Still having some JSON-RPC connection issues but at least its connecting. Something must have been changed? Maybe it was with Geth not ethminer..

bobsummerwill commented 8 years ago

From @index932 on February 16, 2016 5:1

Does this seems to work? How do I make sure it is infact mining and the credits will be sent to my base address? please advise.

ℹ 20:58:47.986|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa… ℹ 20:58:52.802|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa… ℹ 20:59:09.476|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa… ℹ 20:59:55.405|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa… ℹ 20:59:55.930|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa… ℹ 21:00:03.524|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa… ℹ 21:00:41.630|gpuminer0 workLoop 1 #1978a1fa… #1978a1fa…

5chdn commented 8 years ago

stopped mining a while ago, can not comment on this anymore.