9
0
After starting bitcoin from the command line, with:
./bitcoind -daemon
I immediately run the followup command:
./bitcoind getinfo
which gives me the following error:
error: couldn't connect to server
This error lasts from a few seconds to a few minutes depending on the machine.
Two questions:
- What is Bitcoin doing during this time, that causes this error (i.e. prevents the client from returning the results of
getinfo)? - Are there any steps I can take that will minimize this start-up time?
3another gotcha - I was running the testnet. couldn't get bitcoin-cli to work until I added -testnet (i.e. bitcoin-cli -testnet getinfo) – Peter Munnings – 2015-09-14T08:05:13.427
@PeterMunnings: Good one, thanks. I had the same problem -- although I'm about 90% sure that it used to work without it before. – Priidu Neemre – 2016-10-01T15:04:43.937
If you add
testnet=1to your mainbitcoin.confthen thebitcoin-cliwill work with testnet without having to specify it on the command line. Add-testnet=0on the command line to bypass that for mainnet. – cdecker – 2016-10-02T13:02:39.930