Bitcoin Forum
June 28, 2024, 01:13:08 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Why does the "bitcoin-cli getinfo" command no longer work with me ?  (Read 1411 times)
chegmarco (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 10


View Profile
May 01, 2017, 05:35:53 PM
 #1

Hello.
   I would like to know if the Bitcoin-cli command works with or without Internet ?
I am not Internet and when I run "bitcoind - daemon" then "bitcoin-cli", I get the error below:
seclinux@seclinux-HP-15-Notebook-PC:~$ bitcoind -daemon
Bitcoin server starting
seclinux@seclinux-HP-15-Notebook-PC:~$ bitcoin-cli getinfo
error: Could not locate RPC credentials. No authentication cookie could be found, and no rpcpassword is set in the configuration file (/home/seclinux/.bitcoin/bitcoin.conf)
seclinux@seclinux-HP-15-Notebook-PC:~$

So do you think the error is due to lack of Internet ? Without Internet "bitcoin-cli" should work or not ?

IMPORTANT: I specify that I launched this morning "bitcoin-cli getinfo" just after the reinstallation of Bitcoind (with Internet in the morning of course) and it worked rather. But I do not know why it does not work anymore. Is it because of the Internet that I do not currently ?

Thank you for your explanation.
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
May 01, 2017, 06:14:02 PM
 #2

If you did not set an rpcuser and rpcpassword in the bitcoin.conf file, then that is why bitcoin-cli is not working. That has nothing to do with your internet connection. Read the error that it is telling you. Make sure that either both rpcuser and rpcpassword are set, or they are not in the bitcoin.conf file at all. With the latter case, if neither option is set, it will use an automatically generated rpc credentials which are also stored in a different temporary file in the datadir.

chegmarco (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 10


View Profile
May 01, 2017, 06:19:40 PM
 #3

But of course I have set the connection parameters rpcuser and rpcpassword. But why this error Huh
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3430
Merit: 6720


Just writing some code


View Profile WWW
May 01, 2017, 08:06:38 PM
 #4

But of course I have set the connection parameters rpcuser and rpcpassword. But why this error Huh
Are you sure that you have spelled the option properly? Are you sure that the bitcoin.conf file is located here: /home/seclinux/.bitcoin/bitcoin.conf?

chegmarco (OP)
Jr. Member
*
Offline Offline

Activity: 56
Merit: 10


View Profile
May 02, 2017, 10:32:26 AM
 #5

I restarted the PC after several hours and the command "bitcoin-cli" works well now. Thank you.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!