lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 10:19:19 PM Last edit: January 08, 2014, 11:55:30 PM by lmfsthefounder |
|
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:trust@66.227.203.224: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: <?php require_once 'jsonRPCClient.php'; $btc= new jsonRPCClient('http://this too:thatone@66.227.203.224:41338/'); echo "<pre>\n"; print_r($btc->getinfo()); echo "</pre>"; ?> My ports are forwarded as tcp/ip in my router. WHAT am i doing wrong. .005btc bounty for a fix
|
|
|
|
BCB
CTG
VIP
Legendary
Offline
Activity: 1078
Merit: 1002
BCJ
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 10:31:08 PM |
|
have you opened those inbound ports on your ec2 security group?
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 10:31:43 PM |
|
I have NO idea what that is
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 10:38:35 PM |
|
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.
|
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 10:48:37 PM |
|
changed. still nothin :/
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 11:05:03 PM |
|
this is absolutely nuts that I can't get this to work
|
|
|
|
GoldenWings91
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 11:25:23 PM |
|
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.
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 11:35:03 PM |
|
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
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 08, 2014, 11:53:53 PM |
|
Yep here is new error: 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: <?php require_once 'jsonRPCClient.php'; $coinye = new jsonRPCClient('http://name:pass@66.227.203.224:41337/'); $btc = new jsonRPCClient('http://this:that@66.227.203.224:8332/'); echo "<pre>\n"; print_r($coinye->getinfo()); //print_r($btc->getinfo());
echo "</pre>"; ?>
|
|
|
|
GoldenWings91
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 12:04:32 AM |
|
I had no issues connecting before now you changed something and I can't connect either.
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 12:11:57 AM |
|
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.
|
|
|
|
GoldenWings91
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 12:16:42 AM |
|
Working for me <pre> 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] => ) </pre> Using this code and curl variant for json client <?php require_once 'jsonRPCClient.php'; $btc= new jsonRPCClient('http://user:pass@66.227.203.224:41337/'); echo "<pre>\n"; print_r($btc->getinfo()); echo "</pre>"; ?>
|
|
|
|
|
amincd
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 01:13:32 AM |
|
Have you restarted your bitcoind?
|
|
|
|
GoldenWings91
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 01:27:14 AM |
|
From the client server type this with correct user name and password into a terminal ( assuming you're using linux ) curl http://user:pass@66.227.203.224:41337/ you should get this: {"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null} Otherwise this: curl: (7) couldn't connect to host which would imply a connection issue, ( wrong user/pass, blocked port, etc )
|
|
|
|
lmfsthefounder (OP)
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 04:36:27 AM |
|
CURL works, but still nothin from the php file
|
|
|
|
predictbits
Newbie
Offline
Activity: 17
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 05:53:21 AM |
|
Allow the client's IP in your firewall on your bitcoind server then in your bitcoind config, set your rpcallowip.
|
|
|
|
Abdussamad
Legendary
Online
Activity: 3640
Merit: 1571
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
January 09, 2014, 06:28:20 AM |
|
Yep here is new error: 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 <?php 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 "<pre>\n"; print_r($coinye->getinfo()); echo "</pre>";
?>
|
|
|
|
|