Bitcoin Forum

Other => Beginners & Help => Topic started by: btc123 on May 26, 2012, 02:30:40 AM



Title: Unable to connect via CLI
Post by: btc123 on May 26, 2012, 02:30:40 AM
Can somebody please explain this to me like I'm 12?

I want to automate various online transactions but I always get:
$ ./bitcoind getbalance
error: couldn't connect to server

$ cat bitcoin.conf
rpcpassword=**********             # Is this my wallet password?
rpcallowip=192.168.1.2
rpcssl=1
rpcsslciphers=DEFAULT:@STRENGTH



Title: Re: Unable to connect via CLI
Post by: a654bdff on May 27, 2012, 01:33:55 AM
Can somebody please explain this to me like I'm 12?

I want to automate various online transactions but I always get:
$ ./bitcoind getbalance
error: couldn't connect to server

$ cat bitcoin.conf
rpcpassword=**********             # Is this my wallet password?
rpcallowip=192.168.1.2
rpcssl=1
rpcsslciphers=DEFAULT:@STRENGTH



No that's not your wallet password.  It's your password for the RPC service.

The RPC service is what's exposed via port 8332.  It's only responsive to requests from the same machine by default (127.0.0.1).  Adding the rpcallowip will 'allow' other IPs to *remotely* connect.

Also, you need to set rpcuser.  Any code you have to talk to this (perl, php, ruby, etc) will use rpcuser/rpcpassword to authenticate to the RPC service and 'do things'.