Author

Topic: Bitcoin-CLI - Cannot connect (Read 365 times)

hero member
Activity: 644
Merit: 509
January 15, 2020, 05:12:53 PM
#6
I've downloaded the Bitcoin source code and compiled it successfully. I've now got Bitcoin-QT running and synchronising transactions. In the meantime, I thought I'd have a play with the cli but when I run bitcoin-cli on the command line (I'm running Windows 10 by the way), I get the following error:

Code:
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


I'm not sure if I need to specify a port (if so, how?) or whether its because the bitcoin-qt is running and not bitcoind.exe? Or is there likely to be some other issue?

Thanks

if you are using GUI bitcoin wallet, you didn't need CLI version, you can open the wallet, then open the console to access it like in CLI, you can try geetpeerinfo and other rpc comand at console.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
January 14, 2020, 06:48:42 PM
#5
Configure the bitcoin.conf use this generator from here https://jlopp.github.io/bitcoin-core-config-generator/
Use it if you don't have bitcoin.conf but if you have bitcoin.conf you can paste this code below.

Code:
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1
rpcport=8332
rpcthreads=10
server=1

Then try this command

Code:
C:\Program Files\Bitcoin\daemon>bitcoin-cli -rpcuser=user -rpcpassword=pass -rpc
port=8332 getinfo

it doesn't work try to open terminal and bitcoind(Both of these should be running) then open a new terminal where you can try to test the "getinfo" command.

Got source from here https://bitcoin.stackexchange.com/questions/64045/unable-to-make-bitcoind-commands with the same issue as yours.
hero member
Activity: 1106
Merit: 521
January 14, 2020, 05:52:11 PM
#4
I've downloaded the Bitcoin source code and compiled it successfully. I've now got Bitcoin-QT running and synchronising transactions. In the meantime, I thought I'd have a play with the cli but when I run bitcoin-cli on the command line (I'm running Windows 10 by the way), I get the following error:

Code:
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


I'm not sure if I need to specify a port (if so, how?) or whether its because the bitcoin-qt is running and not bitcoind.exe? Or is there likely to be some other issue?

Thanks

Bitcoin-qt doesn't need bitcoin-cli you just use the console.  you only use bitcoin-cli if running bitcoind.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
January 10, 2020, 09:29:50 AM
#3
If you want to use 'bitcoin-qt' instead of 'bitcoind' for some reason, add server=1 to your bitcoin.conf file from the default data directory.
Create a new file and rename it including the extension if don't have one.
legendary
Activity: 2674
Merit: 2965
Terminated.
January 10, 2020, 07:47:00 AM
#2
I've downloaded the Bitcoin source code and compiled it successfully. I've now got Bitcoin-QT running and synchronising transactions. In the meantime, I thought I'd have a play with the cli but when I run bitcoin-cli on the command line (I'm running Windows 10 by the way), I get the following error:

Code:
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


I'm not sure if I need to specify a port (if so, how?) or whether its because the bitcoin-qt is running and not bitcoind.exe? Or is there likely to be some other issue?

Thanks
Run the daemon. If you're running QT, you can just open the console and try out the commands. They are the same set of available commands.
newbie
Activity: 6
Merit: 4
January 10, 2020, 07:42:24 AM
#1
I've downloaded the Bitcoin source code and compiled it successfully. I've now got Bitcoin-QT running and synchronising transactions. In the meantime, I thought I'd have a play with the cli but when I run bitcoin-cli on the command line (I'm running Windows 10 by the way), I get the following error:

Code:
error: Could not connect to the server 127.0.0.1:8332 (error code 1 - "EOF reached")

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.


I'm not sure if I need to specify a port (if so, how?) or whether its because the bitcoin-qt is running and not bitcoind.exe? Or is there likely to be some other issue?

Thanks
Jump to: