2

I am attempting to make Bitcoin-RPC commands in the Windows 10 terminal using Bitcoind from the Bitcoin Core. However, whenever I start C:\Program Files\Bitcoin\daemon>bitcoind the terminal hangs and doesn't print anything. I've waited several hours and the terminal keeps loading and doesn't allow any input. I've also tried typing C:\Program Files\Bitcoin\daemon>bitcoind -daemon but -daemon is not valid Windows command.

I've also tried querying Bitcoin-cli with C:\Program Files\Bitcoin\daemon>bitcoin-cli getinfo but I get the error:

C:\Program Files\Bitcoin\daemon>bitcoin-cli getinfo
error: couldn't connect to server: EOF reached (code 1)
(make sure server is running and you are connecting to the correct RPC port)

So, after researching and reading other Stack Overflow questions I decided to check my bitcoin.conf file. I didn't have one, so I created one and placed it in the C:\Users\User\AppData\Roaming\Bitcoin directory. My bitcoin.conf file looks like:

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

But i'm still getting the same errors. Does anyone have any idea on what i'm doing wrong?


Update:

I typed in tasklist into the windows terminal and bitcoind.exe and Clientcore were running. Then I typed :C:\Program Files\Bitcoin\daemon>bitcoin-cli -rpcuser=user -rpcpassword=pass -rpc port=8332 getinfo, but got another error:

error code: -28
error message:
Verifying blocks...

Update:

I tried C:\Program Files\Bitcoin\daemon>bitcoin-cli -rpcuser=user -rpcpassword=pass -rpc port=8332 getinfo again a couple minutes later and it worked.

I opened one terminal and ran bitcoind, and another terminal I make the getinfo command and everything works

1 Answer 1

1

try this:

bitcoin-cli -rpcuser=user -rpcpassword=pass -rpcport=8332 getinfo

also make sure bitcoind is running, you can do that by
ps -aux | grep bitcoind

2
  • 1
    I'm on Windows so instead of ps -aux | grep bitcoind i typed tasklist into the terminal, and bitcoind and ClientCore were running. Then I typed C:\Program Files\Bitcoin\daemon>bitcoin-cli -rpcuser=user -rpcpassword=pass -rpc and got another error? port=8332 getinfo error code: -28 error message: Verifying blocks...
    – user66764
    Commented Dec 3, 2017 at 15:19
  • i tried again a couple minutes later and it worked. Thanks!!!
    – user66764
    Commented Dec 3, 2017 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.