running regtest network, bitcoin.conf incorrectly configured?

0

This is what happens after I run this command bitcoind --regtest --printtoconsole, my guess is that it's something to do with bitcoin.conf

enter image description here

My bitcoin.conf file looks like this:

server=1
rpcuser=root
rpcpassword=password
rpcconnect=127.0.0.1
rpcport=8332

If you need more context, these are my other questions: trouble with bitcoin cli regtest and interacting with bitcoin over docker

smatthewenglish

Posted 2017-04-19T15:27:05.683

Reputation: 1 063

I don't see anything wrong.Pieter Wuille 2017-04-19T15:33:15.253

but- I get this- bitcoin-cli -regtest getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)smatthewenglish 2017-04-19T15:33:48.780

Try removing the rpcconnect line. rpcconnect is an option to bitcoin-cli, not bitcoind.Pieter Wuille 2017-04-19T15:48:14.917

ah- I removed it but- same error :/smatthewenglish 2017-04-19T15:49:55.637

In fact, you can delete your bitcoin.conf entirely. bitcoind will create its own password if you don't set one (cookie), and bitcoin-cli can find it. All the other options are default. So I suggest just delete bitcoin.conf, restart bitcoind, and then try again.Pieter Wuille 2017-04-19T15:52:05.420

when I delete it I get the error bitcoin-cli -regtest getinfo >> error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/root/.bitcoin/bitcoin.conf)smatthewenglish 2017-04-19T15:59:53.557

What version of bitcoind is running? It's in the first line of debug.log.Pieter Wuille 2017-04-19T16:20:01.707

Bitcoin version v0.14.99.0-c91ca0asmatthewenglish 2017-04-20T08:02:43.540

I think I need to do something like described here, do you think it's right?

smatthewenglish 2017-04-20T14:24:05.910

I don't understand what the problem is for you. But no, that link doesn't help. bitcoin-cli fails to connect to your bitcoind entirely. That answer is about needing multiple nodes in your network before you can have all functionality.Pieter Wuille 2017-04-20T14:26:45.680

I'm trying to run it on this docker image https://hub.docker.com/r/smatthewenglish/oakcoin/tags/ it's just an ubuntu image with the latest version of bitcoin cloned from github

smatthewenglish 2017-04-20T19:44:05.473

Answers

0

just do this...

To use bitcoind and bitcoin-cli, you will need to add a RPC password to your bitcoin.conf file. Both programs will read from the same file if both run on the same system as the same user, so any long random password will work:

  rpcpassword=change_this_to_a_long_random_password

in the future I'll be sure to RTFM

smatthewenglish

Posted 2017-04-19T15:27:05.683

Reputation: 1 063