Author

Topic: BitcoinD RPC Server (Read 1839 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
January 28, 2018, 07:49:59 PM
#6
Thanks! For anyone else reading, I noticed that bitcoin-cli worked properly when bitcoind was invoked via the command line, but not when running the GUI.

Adding "server=1" to bitcoin.conf fixed this issue.
bitcoind will default to server=1. bitcoin-qt will not. So if you want to use the RPC server while running bitcoin-qt, you need to set server=1
newbie
Activity: 7
Merit: 0
January 26, 2018, 10:39:37 PM
#5
Quote
I don't know about the current defaults, but a
Code:
server=1
may also help

Thanks! For anyone else reading, I noticed that bitcoin-cli worked properly when bitcoind was invoked via the command line, but not when running the GUI.

Adding "server=1" to bitcoin.conf fixed this issue.
member
Activity: 149
Merit: 22
🔴🔵 FoxMixer.com 🔵🔴
April 30, 2017, 05:35:11 AM
#4

Bitcoin.conf :
prune=550
rpcport=8332
maxconnections=125
maxuploadtarget=0
rpcuser=USERHIDDEN
rpcpassword=PASSWORDHIDDEN
daemon=1
keypool=100


I don't know about the current defaults, but a
Code:
server=1
may also help
newbie
Activity: 29
Merit: 2
April 29, 2017, 05:14:25 PM
#3
Check this thread too:
https://bitcointalksearch.org/topic/cant-connect-to-bitcoind-from-web-server-1871447

I got similar problems this where caused by closed ports...
legendary
Activity: 1512
Merit: 1057
SpacePirate.io
April 29, 2017, 06:00:26 AM
#2
Hi there,

I have a small problem with my server bitcoind, when i taping example : bitcoin-cli getbalance i have that error :

error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)

But the port its open, how i can resolve that ?

System : Ubuntu Server

Bitcoin.conf :
prune=550
rpcport=8332
maxconnections=125
maxuploadtarget=0
rpcuser=USERHIDDEN
rpcpassword=PASSWORDHIDDEN
daemon=1
keypool=100

#Edit : Bad English
Thank



A couple of things...

Use your RPC connect username and password in the command.
Code:
bitcoin-cli -rpcuser=userhidden -rpcpassword=passwordhidden -rpcport=8332

Check your firewall rules:
Code:
sudo iptables -L

or
Code:
sudo ufw status

For debugging, you can try turning off your firewall
Code:
sudo ufw disable
, dont forget to turn it back on.

If it was blocked locally, you can add a rule:
Code:
sudo ufw allow from (source ip) to (RPC IP) port 8332 proto tcp
example: sudo ufw allow from 192.168.1.1 to 192.168.1.1 port 8332 proto tcp

Good luck
newbie
Activity: 5
Merit: 0
April 29, 2017, 12:03:58 AM
#1
Hi there,

I have a small problem with my server bitcoind, when i taping example : bitcoin-cli getbalance i have that error :

error: couldn't connect to server: unknown (code -1)
(make sure server is running and you are connecting to the correct RPC port)

But the port its open, how i can resolve that ?

System : Ubuntu Server

Bitcoin.conf :
prune=550
rpcport=8332
maxconnections=125
maxuploadtarget=0
rpcuser=USERHIDDEN
rpcpassword=PASSWORDHIDDEN
daemon=1
keypool=100

#Edit : Bad English
Thank

Jump to: