Bitcoin Forum
May 04, 2024, 06:20:55 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What's up with JSON RPC?  (Read 865 times)
totallynotme (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
August 17, 2013, 10:28:01 PM
 #1

I know this is in the wrong forum, I'm not allowed to post in other forums so feel free to move this to the appropriate forum.


Anyways, I'm trying to connect to my bitcoind which is using SSL only on a server separate to the application connecting to it. (I am hosting the php code on a different server for security reasons)


Anyways, It works fine if bitcoind is on localhost, however, as soon as i move it off to a different server and plug in the rpc user/pass/address over ssl, i get the following errors:

Code:
Warning:  fopen(https://...@server.com:8332/) [function.fopen]: failed to open stream: Connection refused in /home/server/public_html/jsonRPCClient.php on line 132



Fatal error:  Uncaught exception 'Exception' with message 'Unable to connect to https://rpcuser:rpcpassword@server.com:8332/' in /home/server/public_html/jsonRPCClient.php:140
Stack trace:
#0 /home/server/public_html/myaccount.php(42): jsonRPCClient->__call('getbalance', Array)
#1 /home/server/public_html/myaccount.php(42): jsonRPCClient->getbalance('1285089715', 6)
#2 {main}
  thrown in /home/server/public_html/jsonRPCClient.php on line 140
1714803655
Hero Member
*
Offline Offline

Posts: 1714803655

View Profile Personal Message (Offline)

Ignore
1714803655
Reply with quote  #2

1714803655
Report to moderator
1714803655
Hero Member
*
Offline Offline

Posts: 1714803655

View Profile Personal Message (Offline)

Ignore
1714803655
Reply with quote  #2

1714803655
Report to moderator
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714803655
Hero Member
*
Offline Offline

Posts: 1714803655

View Profile Personal Message (Offline)

Ignore
1714803655
Reply with quote  #2

1714803655
Report to moderator
1714803655
Hero Member
*
Offline Offline

Posts: 1714803655

View Profile Personal Message (Offline)

Ignore
1714803655
Reply with quote  #2

1714803655
Report to moderator
totallynotme (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
August 18, 2013, 03:31:01 PM
 #2

Anyone got any insight on this?
coinlock
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
August 18, 2013, 07:18:28 PM
 #3

Hi,


I think it may be because your bitcoind client is not listening for JSON-RPC connections except on localhost.

From the manpage for the default settings

rpcallowip='192.168.1.*'
              By  default,  only  RPC  connections  from  localhost are
              allowed. Specify as many *rpcallowip=*  settings  as  you
              like  to  allow connections from other hosts (and you may
              use * as a wildcard character)


So for security you should probably set rpcallowip=yourserverip

You could also set it to * just to test. Smiley

good luck.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!