Soak (OP)
|
|
June 26, 2011, 06:51:47 PM Last edit: June 26, 2011, 08:46:47 PM by Soak |
|
Hello, I have a dedicated server with a bitcoin daemon running somewhere on Internet. I try to reach it on another dedicated server (with JSON and PHP), the page loading for a while and nothing happen. My bitcoin.conf file : rpcuser=user rpcpassword=pass rpcallowip=client server IP server=1 rpcport=8332
I launch daemon with ./bitcoind -daemon. ./bitcoind getinfo works. curl http://user:pass@127.0.0.1:8332/ works. curl http://user:pass@server daemon IP:8332/ don't work. admin@daemon:~$ curl http://user:pass@server daemon IP:8332/ curl: (7) couldn't connect to host Anybody can help me please?
|
|
|
|
JoelKatz
Legendary
Offline
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
|
|
June 26, 2011, 07:03:09 PM |
|
Show us the 'netstat' line that shows the LISTENING socket on port 8332. Is it bound to 127.0.0.1?
|
I am an employee of Ripple. Follow me on Twitter @JoelKatz 1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
|
|
|
Soak (OP)
|
|
June 26, 2011, 07:06:52 PM |
|
Show us the 'netstat' line that shows the LISTENING socket on port 8332. Is it bound to 127.0.0.1?
netstat tcp 0 0 *:8332 *:* LISTEN netstat -an tcp 0 0 0.0.0.0:8332 0.0.0.0:* LISTEN That's wrong? How I can modify that?
|
|
|
|
JoelKatz
Legendary
Offline
Activity: 1596
Merit: 1012
Democracy is vulnerable to a 51% attack.
|
|
June 26, 2011, 07:17:02 PM |
|
No, that's correct. Make sure the IP address you are connecting *from* is allowed in the conf file.
|
I am an employee of Ripple. Follow me on Twitter @JoelKatz 1Joe1Katzci1rFcsr9HH7SLuHVnDy2aihZ BM-NBM3FRExVJSJJamV9ccgyWvQfratUHgN
|
|
|
Soak (OP)
|
|
June 26, 2011, 07:24:11 PM |
|
No, that's correct. Make sure the IP address you are connecting *from* is allowed in the conf file. Yes. The IP address in the conf file is correct. I added the server daemon "outside" IP in the conf file. rpcallowip=client IP address rpcallowip=server daemon IP address admin@daemon:~$ curl http://user:pass@server daemon IP:8332/ curl: (7) couldn't connect to host I don't know what to do now..
|
|
|
|
ShaggyB (BitCoinWorldMarket)
Newbie
Offline
Activity: 32
Merit: 0
|
|
June 26, 2011, 07:31:57 PM |
|
Do you have a firewall blocking incoming 8332 connections?
|
|
|
|
Soak (OP)
|
|
June 26, 2011, 07:33:57 PM |
|
Do you have a firewall blocking incoming 8332 connections? How I can verify that please?
|
|
|
|
ShaggyB (BitCoinWorldMarket)
Newbie
Offline
Activity: 32
Merit: 0
|
|
June 26, 2011, 07:35:40 PM |
|
If you are on a windows box, go to control panels and firewall settings. You will likely have to create a rule for that port. If you are on a linux box or other, i cant help you. Google is your friend for that.
|
|
|
|
progre55
Newbie
Offline
Activity: 25
Merit: 0
|
|
June 26, 2011, 07:37:21 PM |
|
what machine are you on? windows or linux?
|
|
|
|
Soak (OP)
|
|
June 26, 2011, 07:39:36 PM |
|
what machine are you on? windows or linux? The daemon is currently running on Debian 6.0 64 bits.
|
|
|
|
progre55
Newbie
Offline
Activity: 25
Merit: 0
|
|
June 26, 2011, 07:48:24 PM |
|
then to check if you have any port restrictions on your current machine with more info on iptables, refer to https://help.ubuntu.com/community/IptablesHowToother than that, make sure you're not behind a corporate network, or amazon clouds or anything =)
|
|
|
|
Soak (OP)
|
|
June 26, 2011, 07:51:25 PM |
|
root@daemon:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination
Chain FORWARD (policy ACCEPT) target prot opt source destination
Chain OUTPUT (policy ACCEPT) target prot opt source destination
|
|
|
|
progre55
Newbie
Offline
Activity: 25
Merit: 0
|
|
June 26, 2011, 07:58:52 PM |
|
well it means you dont have any rules.. btw, try telneting to your machine from outsite and see if it accepts connections. If not, then there's definitely a firewall somewhere outside your own machine.
|
|
|
|
Soak (OP)
|
|
June 26, 2011, 08:10:15 PM |
|
soak@client:~$ telnet 88.191.128.82 8332 Trying 88.191.128.82... Connected to 88.191.128.82. Escape character is '^]'. Connection closed by foreign host.
|
|
|
|
progre55
Newbie
Offline
Activity: 25
Merit: 0
|
|
June 26, 2011, 08:14:22 PM |
|
Even I was able to connect to your server progre55@progre55:~$ curl http://user:pass@88.191.128.82:8332/ {"result":null,"error":{"code":-32700,"message":"Parse error"},"id":null} I dont see any problems.. so it's probably on your client side
|
|
|
|
Soak (OP)
|
|
June 26, 2011, 08:20:39 PM Last edit: June 26, 2011, 08:51:29 PM by Soak |
|
I dont see any problems.. so it's probably on your client side Now that's works with rpcallowip=*.*.*.*, but don't with PHP and JSON. Edit: Now it's ok since I explain my problem on the IRC channel of my hosting provider, by miracle the server is reachable on port 8332 (I don't give the IP of my server!). Awesome.
|
|
|
|
|