This is your local wannabe-server-guy and as usual I've managed to screw things up again. After realizing that bitcoind was working very slow I found a server with a much faster disk IO I loaded bitcoind on there, and boom, instant good response time!
time bitcoind getinfo
{
"version" : 80100,
"protocolversion" : 70001,
"walletversion" : 60000,
"balance" : 0.00000000,
"blocks" : 244761,
"connections" : 8,
"proxy" : "",
"difficulty" : 21335329.11398300,
"testnet" : false,
"keypoololdest" : 1374707237,
"keypoolsize" : 101,
"paytxfee" : 0.00000000,
"errors" : ""
}
real 0m0.006s
user 0m0.004s
sys 0m0.000s
After quickly thanking the internet for helping me with that I'd like to ask another favor. The server running bitcoind here can't be my webhost for reasons. So I have done an rpcallowip allowing connection from a remote PHP host. And, wonderfully enough, it works much of the time, with response times about 0.14-ish. Which is fine by me. However, sometimes I get:
Warning: fopen(http://...@myserver:8332/): failed to open stream: Connection timed out in /stuff/jsonRPCClient.php.
Fatal error: Uncaught exception 'Exception' with message 'Unable to connect to
http://bitcoinrpc:mypassword@myserver:8332/' in myfile Stack trace: #0 /myfile: jsonRPCClient->__call('listtransaction...', Array) #1 mypath: jsonRPCClient->listtransactions('kazu') #2 mypath: include('file.php') #3 {main} thrown in /stuff/jsonRPCClient.php on line 140
Listtransactions happens to be the first call I make. This error comes after waiting a while. To test, if this was a legitimate issue, I tried telnetting. Now, I'm not 100% sure this means that it should be working working, but I did:
time telnet myserver:8332
and repeated it 100 times, and got back
telnet: could not resolve myserver:8332/telnet: System error
with an average response time of 0.016 seconds.
So is the issue with my bitcoind-machine's internet, or does the telnet experiment imply that its a problem with my client? What should I do?
EDIT: Just tested, I get "telnet: could not resolve server:8332/telnet: System error" even for servers that aren't listening. So, I tried portscanning. I get "port open" for on my server on 8332 in a number of milliseconds. What gives?