<p>It's due to miss-sync of bitcoind in my case.</p>

<p>Just wait the bitcoind sync with the bitcoin network (9GB actually), and after you can use it.</p>

<p><code>du -ksh ~/.bitcoin/</code> will give the size.</p>

CC BY-SA 3.0
2013-05-21T19:55:01.670Z
2013-05-21T20:54:59.083Z
2013-05-21T20:54:59.083Z
alpha_one_x86
<p>I'm trying to setup pushpool + bitcoind.  However, when I connect to pushpool with cpuminer I receive this error:   </p>

<pre><code>[2013-04-21 12:47:47] json_rpc_call failed, retry after 30 seconds  
[2013-04-21 12:48:17] JSON-RPC call failed: {  
   "code": -2,  
   "message": "upstream RPC error"  
}  
[2013-04-21 12:48:17] json_rpc_call failed, retry after 30 seconds  
</code></pre>

<p>I see this error in the <strong>pushpool server log</strong>:    </p>

<pre><code>root@ip-10-28-79-184:/usr/local/sbin# ./pushpoold --debug=2 --stderr --  foreground --config=/usr/local/sbin/server.json  
[2013-04-21 13:26:28.319949] Debug output enabled  
[2013-04-21 13:26:28.333064] Forcing local hostname to localhost  
[2013-04-21 13:26:28.456350] Listening on host :: port 8336  
[2013-04-21 13:26:28.456477] Listening on host 10.28.79.184 port 8334  
[2013-04-21 13:26:28.485367] initialized  
JSON protocol request:  
{"method": "getwork", "params": [], "id":1}  

About to connect() to 127.0.0.1 port 8332 (#0)  
   Trying 127.0.0.1... * TCP_NODELAY set  
 connected  
 Connected to 127.0.0.1 (127.0.0.1) port 8332 (#0)  
 Server auth using Basic with user 'username'  
 POST / HTTP/1.1  
Authorization: Basic dXNlcm5hbWV2YXN5YTpwYXNzd29yZHZhc3lhMTQ=  
Host: 127.0.0.1:8332  
Accept: */*  
Accept-Encoding: deflate, gzip  
Content-type: application/json  
Content-Length: 45  

 The requested URL returned error: 500  
 Closing connection #0  
[2013-04-21 13:26:31.743119] HTTP request failed: The requested URL returned error: 500  
</code></pre>

<p><strong>bitcoind config:</strong>  </p>

<pre><code>testnet=0  
server=1  
rpcuser=username  
rpcpassword=password  
rpctimeout=30  
rpcallowip=*  
rpcport=8332  
rpcconnect=127.0.0.1  
gen=0   
keypool=256  
paytxfee=0.00 
</code></pre>

<p><strong>pushpool config:</strong>   </p>

<pre><code>{  
    "listen": [  
        {  
            "port": 8336  
        },  
        {  
            "host" : "server_ip",  
            "port" : 8334,  
            "protocol" : "http-json"  
        }  
    ],  
    "database": {  
        "engine": "mysql",  
        "host": "localhost",  
        "port": 3306,  
        "name": "bitcoin",    
        "username": "mysql_username",  
        "password": "mysql_password",  
        "sharelog": true,  
        "stmt.pwdb": "SELECT `password` FROM `pool_worker` WHERE `username` = ?",  
        "stmt.sharelog" :  "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"  
    },  

"pid": "/tmp/pushpool/pushpoold.pid",  
"forcehost": "localhost",  
    "log.requests": "/tmp/pushpool/request.log",  
    "log.shares": "/tmp/pushpool/shares.log",  
    "auth.cred_cache.expire": 75,  
    "rpc.url": "http:// 127.0.0.1:8332/",  
    "rpc.user": "username",  
    "rpc.pass": "password",  
    "rpc.target.rewrite": true  
}  
</code></pre>

<p>I have tried to change ports, and even rebooted the server,  nothing helps. </p>

<bitcoind><pushpool>
bitcoind replies 500 error
user4562
# bitcoind replies 500 error

(Asked by: username_0 on 2013-04-21)

I'm trying to setup pushpool + bitcoind. However, when I connect to pushpool with cpuminer I receive this error:

```
[2013-04-21 12:47:47] json_rpc_call failed, retry after 30 seconds  
[2013-04-21 12:48:17] JSON-RPC call failed: {  
   "code": -2,  
   "message": "upstream RPC error"  
}  
[2013-04-21 12:48:17] json_rpc_call failed, retry after 30 seconds  

```

I see this error in the **pushpool server log**:

```
root@ip-10-28-79-184:/usr/local/sbin# ./pushpoold --debug=2 --stderr --  foreground --config=/usr/local/sbin/server.json  
[2013-04-21 13:26:28.319949] Debug output enabled  
[2013-04-21 13:26:28.333064] Forcing local hostname to localhost  
[2013-04-21 13:26:28.456350] Listening on host :: port 8336  
[2013-04-21 13:26:28.456477] Listening on host 10.28.79.184 port 8334  
[2013-04-21 13:26:28.485367] initialized  
JSON protocol request:  
{"method": "getwork", "params": [], "id":1}  

About to connect() to 127.0.0.1 port 8332 (#0)  
   Trying 127.0.0.1... * TCP_NODELAY set  
 connected  
 Connected to 127.0.0.1 (127.0.0.1) port 8332 (#0)  
 Server auth using Basic with user 'username'  
 POST / HTTP/1.1  
Authorization: Basic dXNlcm5hbWV2YXN5YTpwYXNzd29yZHZhc3lhMTQ=  
Host: 127.0.0.1:8332  
Accept: */*  
Accept-Encoding: deflate, gzip  
Content-type: application/json  
Content-Length: 45  

 The requested URL returned error: 500  
 Closing connection #0  
[2013-04-21 13:26:31.743119] HTTP request failed: The requested URL returned error: 500  

```

**bitcoind config:**

```
testnet=0  
server=1  
rpcuser=username  
rpcpassword=password  
rpctimeout=30  
rpcallowip=*  
rpcport=8332  
rpcconnect=127.0.0.1  
gen=0   
keypool=256  
paytxfee=0.00 

```

**pushpool config:**

```
{  
    "listen": [  
        {  
            "port": 8336  
        },  
        {  
            "host" : "server_ip",  
            "port" : 8334,  
            "protocol" : "http-json"  
        }  
    ],  
    "database": {  
        "engine": "mysql",  
        "host": "localhost",  
        "port": 3306,  
        "name": "bitcoin",    
        "username": "mysql_username",  
        "password": "mysql_password",  
        "sharelog": true,  
        "stmt.pwdb": "SELECT `password` FROM `pool_worker` WHERE `username` = ?",  
        "stmt.sharelog" :  "INSERT INTO shares (rem_host, username, our_result, upstream_result, reason, solution) VALUES (?, ?, ?, ?, ?, ?)"  
    },  

"pid": "/tmp/pushpool/pushpoold.pid",  
"forcehost": "localhost",  
    "log.requests": "/tmp/pushpool/request.log",  
    "log.shares": "/tmp/pushpool/shares.log",  
    "auth.cred_cache.expire": 75,  
    "rpc.url": "http:// 127.0.0.1:8332/",  
    "rpc.user": "username",  
    "rpc.pass": "password",  
    "rpc.target.rewrite": true  
}  

```

I have tried to change ports, and even rebooted the server, nothing helps.

**Tags:** bitcoind, pushpool


---

## 1 answers

### Answer by username_1 on 2013-05-21. Score: 4

It's due to miss-sync of bitcoind in my case.

Just wait the bitcoind sync with the bitcoin network (9GB actually), and after you can use it.

`du -ksh ~/.bitcoin/` will give the size.


---

