Author

Topic: CLI issues in linux (Read 155 times)

newbie
Activity: 7
Merit: 0
June 17, 2018, 07:37:42 AM
#4
Got it figured eventually,
There was a problem with the location of the .conf file.

TNX any way for the help!
sr. member
Activity: 490
Merit: 389
Do not trust the government
June 13, 2018, 03:42:55 PM
#3
I thought that you need to run "-testnet" when you start bitcoin-cli, since I don't think it is aware of the configurations for the daemon on it's own.
Although I don't understand why it would connect to 18332 then.

Make sure you have a bitcoin.conf file with right permissions in .bitcoin and run "bitcoin-cli -testnet -rpcuser=user -rpcpassword=password".
Other than that you might want to check out debug.log file if you are still having issues. It is in the .bitcoin directory as well.
sr. member
Activity: 257
Merit: 343
June 13, 2018, 07:49:31 AM
#2
Ok, just to understand further: your root is on one partition, containing e.g. /usr/local/bin, with the binaries of bitcoin, and there is a separate home Partition, which is mounted into root? Maybe show us fstab? And the full path to the bitcoin.conf file. And which user executes bitcoin-cli?
Btw: Ubuntu/Debian/SuSE/Redhat?
Who is running he bitcoin daemon? (Show how you started bitcoin...). Anything you could see in the log files? Is „ps aux“ showing bitcoind is running?
If testnet =1, then ports are correct (Default RPC connection port is 18332). However 8332 doesn‘t look like testnet, it would be mainnet. Maybe the executables don’t find the path to the correct conf file(s)...
newbie
Activity: 7
Merit: 0
June 13, 2018, 04:47:47 AM
#1
Hey!
I am using both bitcoin-cli and litecoin-cli on different VM's (Ubuntu) on both of them I have node (Bitcoin core & Litecoin core).
Within the VM's the blockcahin is stored on 1 partition and the CLI on a different one.
The blockchain partition is mounted to the main partition (where the CLI is stored).
I placed both .conf files in the corresponding dirs -> ~/.bitcoin & ~/.litecoin.
.conf:
testnet=1
rpcuser=user
rpcpassword=password
rpcallowip=0.0.0.0/0
rpcbind=0.0.0.0
daemon=1
For some reason I can't get access to CLI commands.
When running normal CLI call this is the output:
command: bitcoin-cli getnetworkinfo
output:  error: Could not connect to the server 127.0.0.1:18332
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
when running:
command: bitcoin-cli -rpcport=8332 getnetworkinfo
output: error: Authorization failed: Incorrect rpcuser or rpcpassword
There r two users in the system:
root and bitcoinuser/litecoinuser (in sudoers group)

Can someone point out what am I doing wrong?

TNX!
Jump to: