Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Blinken on June 28, 2016, 12:00:39 PM



Title: bitcoind hangs (no rpcuser message)
Post by: Blinken on June 28, 2016, 12:00:39 PM
When following the instructions for the non-Ubuntu daemon install it says I should see the following:

Code:
bitcoind

Error: To use the "-server" option, you must set a rpcpassword in the configuration file:
/home/bitcoinorg/.bitcoin/bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %s | mail -s "Bitcoin Alert" admin@foo.com

However, when I give the command bitcoind, the terminal hangs and does not appear to be doing anything.


Title: Re: bitcoind hangs (no rpcuser message)
Post by: hexafraction on June 28, 2016, 02:25:28 PM
However, when I give the command bitcoind, the terminal hangs and does not appear to be doing anything.

The most likely reason is that you already have your bitcoin.conf file configured with an RPC user and password, and thus you are not getting the error that you would get if it weren't configured. To check this, open ~/.bitcoin/bitcoin.conf and verify that there is an rpcuser and rpcpassword line.

Now, it's "hanging" because it's actually acting as an RPC server. Open a second terminal/tab/pty/tmux window/whatever and try issuing rpc commands (such as 'bitcoin-cli getblockcount', without quotes, which checks the process of blockchain sync). If you don't want to tie up a terminal for the server process, you can always start bitcoind with the command 'bitcoind -daemon' and then use 'bitcoincli stop' to stop the server gracefully.


Title: Re: bitcoind hangs (no rpcuser message)
Post by: achow101 on July 03, 2016, 11:41:23 PM
You can no longer use the bitcoind command to send RPC commands to the RPC server. Instead you must use
Code:
bitcoin-cli <cmd>


Title: Re: bitcoind hangs (no rpcuser message)
Post by: hexafraction on July 04, 2016, 12:28:22 AM
You can no longer use the bitcoind command to send RPC commands to the RPC server. Instead you must use
Code:
bitcoin-cli <cmd>

Thanks. I was using an old manpage I found online, combined with failing long-term memory.