Bitcoin Forum
June 15, 2024, 10:47:55 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Send rpc commands to a bitcoin server not on the same computer  (Read 830 times)
vebveb (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 06, 2013, 03:12:48 PM
 #1

Hello everybody,

I would like to have a bitcoind server running on a computer and access it from a different computer via the rpc commands.

What works:
run bitcoind.exe
on the same computer type bitcoind.exe 'my_command', with 'my_command' beeing getinfo, stop or other commands.

 
What doesn't work:
run bitcoind.exe with rpcallowip set to *, *.*.*.* or the ip of the computer which sends the commands
run bitcoind.exe getinfo (or other commands) with rpcconnect set to the ip of the computer running the bitcoind server.

I also tried:
On the same computer: run bitcoind.exe with rpcallowip not set, or set to the true ip of the computer (not the local ip)
and run bitcoind.exe getinfo (or stop) with rpcconnect set to the true ip of the computer.
but that didn't work.

So it seems I only succeed to have a local server, but I would like to access it from an other computer.

What should I do to make it work?

Thank you
centove
Full Member
***
Offline Offline

Activity: 194
Merit: 100


View Profile
April 06, 2013, 03:30:17 PM
 #2

On linux machines the following steps seem to work.

Server:
~/.bitcoin/bitcoin.conf
rpcuser=<some user>
rpcpassword=<some password>

rpcallowip=<ip>
rpcallowip=<ip>
(and so on)

Then start it
bitcoind -daemon

Client:
bitcoind -rpcconnect=<ip> -rpcuser=<some user> -rpcpassword=<some password> getinfo

I imagine something similar on windows/macos should work as well..

Give me Btc: 1BRkf5bwSVdGCyvu4SyYBiJjEjbNiAQoYd Mine on my node: http://ask.gxsnmp.org:9332/
clownius
Sr. Member
****
Offline Offline

Activity: 448
Merit: 254


View Profile
April 06, 2013, 03:33:26 PM
 #3

Depends what the target machine is running OS wise.  But if its 'nix based then surely the easy method would be to ssh into the machine and run the commands that way?
lbr
Sr. Member
****
Offline Offline

Activity: 423
Merit: 254


View Profile
April 06, 2013, 03:37:44 PM
 #4

Setting externalip=my_external_ip in bitcoin.conf helped me.
Also if there are routers in the way you need to configure port forwarding.

BTC: 18ozhbkfHneX8tnPgHJuTizyBmspM5Vgpa  LTC: LgVc7KdedPGZyDXHXEH9G7z6AoTmTvDdWb
cgminer 2.11.13 x64 portable for Mac OS X 10.6.8
6+ GPUs driver mod for Windows
vebveb (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 06, 2013, 03:48:04 PM
 #5

centove: I defined these things. As I said, it works if it turns on the same computer.

clownius: It is a windows os, and I use bitcoind 8.1

lbr: I tried, but I didn't solve my problem. I think the issue could be about ports.
On the virtual machine I would like server to be, I opened the ports 8333 and 8332. Do I need to open other ports?
centove
Full Member
***
Offline Offline

Activity: 194
Merit: 100


View Profile
April 06, 2013, 04:00:51 PM
 #6

centove: I defined these things. As I said, it works if it turns on the same computer.


What errors is it giving?

port 8333 is what the client uses to talk to other 'nodes' and exchange the blockchain packets.
port 8332 is the RPC port.

Give me Btc: 1BRkf5bwSVdGCyvu4SyYBiJjEjbNiAQoYd Mine on my node: http://ask.gxsnmp.org:9332/
vebveb (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 06, 2013, 04:07:05 PM
 #7

It gives "error: couldn't connect to server" and in the debug informations of the server, there is no rpc commands received. It's like they can't communicate.
centove
Full Member
***
Offline Offline

Activity: 194
Merit: 100


View Profile
April 06, 2013, 04:21:51 PM
 #8

It gives "error: couldn't connect to server" and in the debug informations of the server, there is no rpc commands received. It's like they can't communicate.
And on the server you started the bitcoind.exe with the -daemon option?

Give me Btc: 1BRkf5bwSVdGCyvu4SyYBiJjEjbNiAQoYd Mine on my node: http://ask.gxsnmp.org:9332/
vebveb (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
April 06, 2013, 04:31:39 PM
 #9

I finally find out how to make it work.

On VM I wanted to make bitcoind turn on, I made extra firewall parameters and It now works.

thank you for your help
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!