Bitcoin Forum
December 14, 2018, 08:54:28 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BitcoinD RPC Server  (Read 1656 times)
XavierNauze
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile WWW
April 29, 2017, 05: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

1544820868
Hero Member
*
Offline Offline

Posts: 1544820868

View Profile Personal Message (Offline)

Ignore
1544820868
Reply with quote  #2

1544820868
Report to moderator
1544820868
Hero Member
*
Offline Offline

Posts: 1544820868

View Profile Personal Message (Offline)

Ignore
1544820868
Reply with quote  #2

1544820868
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1544820868
Hero Member
*
Offline Offline

Posts: 1544820868

View Profile Personal Message (Offline)

Ignore
1544820868
Reply with quote  #2

1544820868
Report to moderator
cloverme
Legendary
*
Offline Offline

Activity: 1456
Merit: 1041


SpacePirate.io


View Profile WWW
April 29, 2017, 11: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
BitcoinPot
Newbie
*
Offline Offline

Activity: 12
Merit: 0


View Profile WWW
April 29, 2017, 10:14:25 PM
 #3

Check this thread too:
https://bitcointalk.org/index.php?topic=1871447.0

I got similar problems this where caused by closed ports...
Casy
Member
**
Offline Offline

Activity: 116
Merit: 10

🔴🔵 FoxMixer.com 🔵🔴


View Profile WWW
April 30, 2017, 10: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

initstring
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
January 27, 2018, 03:39:37 AM
 #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.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 1610
Merit: 1806


bc1qshxkrpe4arppq89fpzm6c0tpdvx5cfkve2c8kl


View Profile WWW
January 29, 2018, 12:49:59 AM
 #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

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!