[Ethereum] Cannot mine on Ubuntu 14.04

ethminergo-ethereummining

I've been trying to start mining on an Ubuntu 14.04 machine for two days now but I just can't make it work; there are no error messages or anything but the behaviour is very weird:

I've tried mining with geth via miner.start(). This is what happens:

> miner.start()
true
> miner.hashrate
undefined
> miner
{
  makeDAG: function(),
  setEtherbase: function(),
  setExtra: function(),
  setGasPrice: function(),
  start: function(),
  startAutoDAG: function(),
  stop: function(),
  stopAutoDAG: function()
}

Why is miner.hashrate undefined? Also, if I use ethminer like this:
geth –rpc –rpccorsdomain localhost 2>> geth.log and then start ethminer in another terminal. This is the output of ethminer:

miner  19:35:55.415|ethminer  Getting work package...
JSON-RPC problem. Probably couldn't connect. Retrying in 1... 
miner  19:35:57.421|ethminer  Getting work package...
miner  19:35:57.424|ethminer  Grabbing DAG for #f6a1824c…
miner  19:36:06.043|ethminer  Got work package:
miner  19:36:06.043|ethminer    Header-hash: cf2be73851ae76910bc50b75fa3c2766c4c4e528b8fbc23a9a26c68cc3dbb566
  ℹ  19:36:06.043|ethminer  Loading full DAG of seedhash: #0823bb39…
miner  19:36:06.043|ethminer    Seedhash: f6a1824c2bc745217912823098bb6f07de2b0295d30355934a247b1e87931763
miner  19:36:06.043|ethminer    Target: 000000000006f5ba22dcdac38f1d36394c6ffcb84826f3da17af548ce69ad50c
miner  19:36:06.546|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.5 s
  ℹ  19:36:14.783|ethminer  Full DAG loaded
miner  19:36:15.283|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 8.736 s
miner  19:36:15.785|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.502 s
miner  19:36:16.287|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.501 s
miner  19:36:16.790|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.503 s
miner  19:36:17.293|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.503 s
miner  19:36:17.796|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.502 s
miner  19:36:18.298|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.501 s
miner  19:36:18.800|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.502 s
miner  19:36:19.302|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.502 s
miner  19:36:19.806|ethminer  Mining on PoWhash #cf2be738… : 0 H/s = 0 hashes / 0.503 s

If I run it in one line like this: geth –rpc –rpccorsdomain localhost 2>> geth.log & ethminer The result is:

miner  19:37:31.513|ethminer  Getting work package...
  ✘  19:37:31.515|ethminer  Failed to submit hashrate.
  ✘  19:37:31.515|ethminer  Dynamic exception type: jsonrpc::JsonRpcException
std::exception::what: Exception -32003 : Client connector error: libcurl error: 7 -> Could not connect to http://127.0.0.1:8545

JSON-RPC problem. Probably couldn't connect. Retrying in 1... 
miner  19:37:33.515|ethminer  Getting work package...
  ✘  19:37:33.516|ethminer  Failed to submit hashrate.
  ✘  19:37:33.516|ethminer  Dynamic exception type: jsonrpc::JsonRpcException
std::exception::what: Exception -32003 : Client connector error: libcurl error: 7 -> Could not connect to http://127.0.0.1:8545

JSON-RPC problem. Probably couldn't connect. Retrying in 1... 
miner  19:37:35.517|ethminer  Getting work package...
  ✘  19:37:35.518|ethminer  Failed to submit hashrate.
  ✘  19:37:35.518|ethminer  Dynamic exception type: jsonrpc::JsonRpcException
std::exception::what: Exception -32003 : Client connector error: libcurl error: 7 -> Could not connect to http://127.0.0.1:8545

Can anyone explain to me what is going on here and how to fix this?

PS: These are the versions:
geth: 1.4.5-stable
ethminer version 1.2.5, Build: Linux/g++/Interpreter/RelWithDebInfo

Best Answer

It's no longer under miner, it's under eth:

> miner.hashrate
undefined
> eth.hashrate
13468
Related Topic