3

I have my Bitcoind server running on Ubuntu 14.04. The blocks count is updated and its running well. My problem is that when I access Bitcoin RPC using this curl command

curl --user user_bitcoin:pass_bitcoin --data-binary 
'{"jsonrpc": "1.0", "id":"curltest", "method": "getinfo", 
"params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

it returns nothing. When I check debug.log it says:

ThreadRPCServer incorrect password attempt from 127.0.0.1

My bitcoin.conf setup is like this

server=1
daemon=1
rpcuser=<username>
rpcpassword=<password>
Michael Blanza
  • 701
  • 2
  • 7
  • 13

2 Answers2

3

I solved this by starting bitcoind as follows:

$bitcoind -rpcuser=USERNAME -rpcpassword=PASSWORD

I was previously getting an error when I started it as:

$bitcoind
Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
authentichigh
  • 529
  • 5
  • 6
-1

I figure it out.. The problem is that the bitcoin.conf file is under the root premises while the bitcoind files is on the ubuntu premises. So all we need to do is use chown to change owner.

This is how I execute the command

sudo chown ubuntu:ubuntu [file..]

I hope this helps.

Michael Blanza
  • 701
  • 2
  • 7
  • 13