Bitcoin Forum
April 19, 2024, 05:40:26 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: connection problems  (Read 2700 times)
usagi (OP)
VIP
Hero Member
*
Offline Offline

Activity: 812
Merit: 1000


13


View Profile
July 09, 2011, 12:23:15 AM
Last edit: October 06, 2012, 02:46:46 PM by usagi
 #1

connection problems
The network tries to produce one block per 10 minutes. It does this by automatically adjusting how difficult it is to produce blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
drawoc
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Firstbits: 175wn


View Profile
July 09, 2011, 03:54:41 AM
 #2

If you haven't already, you need to whitelist external addresses, for example:
Code:
rpcallowip=192.168.1.100
This whitelists the IP 192.168.1.100. Note that you're also allowed to use wildcard characters.

(If you've done this already, sorry - you weren't too clear in the OP. If this isn't helpful, you need to post more details - Which options, in specific have you tried in bitcoin.conf? Have you configured the PHP libraries right? Are you doing this between computers on the same network or across the internet?)

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
Xenland
Legendary
*
Offline Offline

Activity: 980
Merit: 1003


I'm not just any shaman, I'm a Sha256man


View Profile
July 09, 2011, 05:33:37 AM
 #3

If you haven't already, you need to whitelist external addresses, for example:
Code:
rpcallowip=192.168.1.100
This whitelists the IP 192.168.1.100. Note that you're also allowed to use wildcard characters.

(If you've done this already, sorry - you weren't too clear in the OP. If this isn't helpful, you need to post more details - Which options, in specific have you tried in bitcoin.conf? Have you configured the PHP libraries right? Are you doing this between computers on the same network or across the internet?)

Well, I've whitelisted the IPs in question, set server=1, everything else I can think of. But but but but but, what's this about PHP libraries? I uploaded phpRPCClient.php and Bitcoin.php and have been trying those.. Are you saying I actually have to install a system library too? Well, I didn't install any libraries. What do I need to do? "sudo apt-get php-json"?

Thanks for any advice.

-


this may sound wierd but I had the same problem I don't know exactly what fixed it becuase I double-triple-checked all the credentials but try commenting out server=1
It worked for me on top of 1000 other things I did, but really thats the only thing I could pin point it down too
drawoc
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Firstbits: 175wn


View Profile
July 09, 2011, 04:03:09 PM
 #4

Well, I've whitelisted the IPs in question, set server=1, everything else I can think of. But but but but but, what's this about PHP libraries? I uploaded phpRPCClient.php and Bitcoin.php and have been trying those.. Are you saying I actually have to install a system library too? Well, I didn't install any libraries. What do I need to do? "sudo apt-get php-json"?

No, I just meant to check that you're passing the right username, password, IP, and port to your JSON library.

You could try Xenland's suggestion, if you're running bitcoind, you don't need the sever flag (I have no idea why that might be a problem).

For reference, this is my full bitcoin.conf, and it lets me connect from other computers on the network:
Code:
rpcpassword=hi
rpcuser=hi
testnet=1
rpcallowip=192.168.1.*
(You don't want the testnet flag set.)

From the computer you're running the php on, you can try running:
Code:
telnet 192.168.1.2 8332
Replacing 192.168.1.2 with your IP, and 8332 with your port if you changed it.
If it gives you a connect error, your bitcoind is configured wrong, or you have the wrong port/ip address.
If it just sits there waiting for input, you're having a username/password issue.

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
drawoc
Full Member
***
Offline Offline

Activity: 168
Merit: 100

Firstbits: 175wn


View Profile
July 09, 2011, 05:12:15 PM
 #5

The fact that it gives you "403 Forbidden" means that you can successfully connect to your bitcoind from that location. I would make sure that you're passing your username and password in your php file correctly.

If you need it, there's an example using the JSON-RPC PHP library here: https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29#PHP

The difference between doing telnet 127.0.0.1 and telnet <IP Address> is simply that when you connect remotely, it requires you to enter your username and password (The error is because you didn't, and you probably don't want to with telnet). The fact that the server is talking to you means it's configured properly, so the error is on the PHP end.

Donate: 175WNXmJ1WVhFgVGKUqEhYtAQGRYAvqPA
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!