Author

Topic: Unable to connect using jsonRPCClient; .005btc bounty for a fix (Read 1374 times)

legendary
Activity: 3682
Merit: 1580
Yep here is new error:

Code:

Fatal error:  Uncaught exception 'Exception' with message 'Incorrect response id (request id: 1, response id: )' in /home/content/61/11420661/html/massivetest/jsonRPCClient.php:144
Stack trace:
#0 /home/content/61/11420661/html/massivetest/index.php(6): jsonRPCClient->__call('getinfo', Array)
#1 /home/content/61/11420661/html/massivetest/index.php(6): jsonRPCClient->getinfo()
#2 {main}
  thrown in /home/content/61/11420661/html/massivetest/jsonRPCClient.php on line 144


This error means that your username or password is incorrect. This is what you should do:

- Edit bitcoin.conf on the server and change the username and password to something that contains only letters and numbers. No special characters or spaces. You can make it really long if you like. Perhaps use openssl rand -hex 32 to get a random password.

- Try with the code below

Code:
require_once 'jsonRPCClient.php';
$btc_username 'yourusername';
$btc_password 'yourpassword';
$btc_ip '66.227.203.224';
$btc_port 41337;

$coinye = new jsonRPCClient"http://$btc_username:$btc_password@$btc_ip:$btc_port/" ) ;

echo 
"
\n";
print_r($coinye->getinfo());
echo 
"
"
;

?>
newbie
Activity: 17
Merit: 0
Allow the client's IP in your firewall on your bitcoind server then in your bitcoind config, set your rpcallowip.
full member
Activity: 182
Merit: 100
CURL works, but still nothin from the php file
full member
Activity: 141
Merit: 100
From the client server type this with correct user name and password into a terminal ( assuming you're using linux )

Code:
curl http://user:[email protected]:41337/

you should get this:
Code:
{"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null}

Otherwise this:
Code:
curl: (7) couldn't connect to host
which would imply a connection issue, ( wrong user/pass, blocked port, etc )
hero member
Activity: 772
Merit: 501
Have you restarted your bitcoind?
full member
Activity: 182
Merit: 100
are you hosting the jsonRPCClient someplace else or something? because when I pull it from http://nobanchan.com/massivetest/index.php it absolultely does not show me what I want.


This is SO frustrating.  Huh Huh
full member
Activity: 141
Merit: 100
Working for me

Quote

Array
(
    [version] => 60400
    [protocolversion] => 60003
    [walletversion] => 60000
    [balance] => 32169.61913646
    [blocks] => 4210
    [connections] => 0
    [proxy] =>
    [difficulty] => 113.33792712
    [testnet] =>
    [keypoololdest] => 1389155877
    [keypoolsize] => 101
    [paytxfee] => 0
    [mininput] => 0.01
    [errors] =>
)

Using this code and curl variant for json client
Code:
require_once 'jsonRPCClient.php';
 
  
$btc= new jsonRPCClient('http://user:[email protected]:41337/');
 
  echo 
"
\n";
  
print_r($btc->getinfo());
  echo 
"
"
;
  
?>
full member
Activity: 182
Merit: 100
I had no issues connecting before now you changed something and I can't connect either.

if you are trying with the passwords i have in the thread, they are the same as before. changed them on screen for security. The passwords are still there. Also, i had closed the client for a moment.

I am connected according to the php exception, just cannot get the data I want.
full member
Activity: 141
Merit: 100
I had no issues connecting before now you changed something and I can't connect either.
full member
Activity: 182
Merit: 100
Yep here is new error:

Code:

Fatal error:  Uncaught exception 'Exception' with message 'Incorrect response id (request id: 1, response id: )' in /home/content/61/11420661/html/massivetest/jsonRPCClient.php:144
Stack trace:
#0 /home/content/61/11420661/html/massivetest/index.php(6): jsonRPCClient->__call('getinfo', Array)
#1 /home/content/61/11420661/html/massivetest/index.php(6): jsonRPCClient->getinfo()
#2 {main}
  thrown in /home/content/61/11420661/html/massivetest/jsonRPCClient.php on line 144


Now what? lol.
Its like it doesnt like my php request for getinfo?

looks like this:

Code:
require_once 'jsonRPCClient.php';
 
  
$coinye = new jsonRPCClient('http://name:[email protected]:41337/');
  
$btc = new jsonRPCClient('http://this:[email protected]:8332/');
  echo 
"
\n";
  
print_r($coinye->getinfo());
  
//print_r($btc->getinfo());

  
echo "
"
;
  
  
?>
full member
Activity: 182
Merit: 100
I can confirm your client is configured correctly as I can make rpc calls to it.
Try using this curl variant http://pastebin.com/vREuHVr5, if it doesn't work then I'm out of ideas as to why it fails.

Interesting; connected I think, but have a different error now
full member
Activity: 141
Merit: 100
I can confirm your client is configured correctly as I can make rpc calls to it.
Try using this curl variant http://pastebin.com/vREuHVr5, if it doesn't work then I'm out of ideas as to why it fails.

full member
Activity: 182
Merit: 100
this is absolutely nuts that I can't get this to work
full member
Activity: 182
Merit: 100
changed. still nothin :/
full member
Activity: 141
Merit: 100
It says trying to connect to port 41338 it should be rpc port 41337

EDIT: It being your test site: http://nobanchan.com/massivetest/index.php
full member
Activity: 182
Merit: 100
further reading. this is hosted on my pc; there should be no other firewall here. windows firewall is on, but I even tested with it off.
full member
Activity: 182
Merit: 100
I have NO idea what that is
BCB
vip
Activity: 1078
Merit: 1002
BCJ
have you opened those inbound ports on your ec2 security group?
full member
Activity: 182
Merit: 100
I'm sure this is a thousand times old by now, but I just do not understand.

I am getting this error:

"Fatal error:  Uncaught exception 'Exception' with message 'Unable to connect to http://such:[email protected]:41337/' in /home/content/61/11420661/html/massivetest/jsonRPCClient.php:140"

(Try it yourself at http://nobanchan.com/massivetest/index.php)

Here is my conf:

server=1
daemon=1
rpcuser=SOMEUSERNAME
rpcpassword=SOMEPASSWORD
rpcallowip=*
rpcport=41337
port=41338
addnode=37.187.93.104
addnode=23.253.71.20
addnode=94.242.254.73
addnode=24.20.187.178
addnode=37.59.31.34
addnode=37.59.54.28
addnode=62.212.72.31

Here is my php:

Code:
require_once 'jsonRPCClient.php';
 
  
$btc= new jsonRPCClient('http://this too:[email protected]:41338/');
 
  echo 
"
\n";
  
print_r($btc->getinfo());
  echo 
"
"
;
  
  
?>

My ports are forwarded as tcp/ip in my router. WHAT am i doing wrong.

 .005btc bounty for a fix
Jump to: