3

When I enter bitcoind getinfo on my remote ubuntu-Server I get this answer:

{  
    "version" : 32400,
    ... (some other info)
    "errors" : "WARNING: Displayed transactions may not be correct!  You may need to upgrade, or other nodes may need to upgrade."
} 
  • What went wrong?
  • How can I fix it?

This is what I did before:

I am running a remote server with Ubuntu 12.04 LTS as operating system. The machine is 800 km away from my home, I am connected to it via SSH. So there is no GUI, I only can use shell commands.

Yesterday I installed bitcoind calling this shell-command (while beeing root) after upgrading all other packeges (apt-get update followed by apt-get dist-upgrade):

# apt-get install bitcoind

bitcoind and 8 or 10 other packages was installed.
Then I edited /root/.bitcoin/bitcoin.conf and entered this:

server=1
daemon=1
rpcuser=[my username]
rpcpassword=[very long passphrade]

Then I did start bitcoind by calling

# bitcoind

The answer was

bitcoin server starting

but even after waiting more then 5 minutes I did not get the shell back (I could not enter new commands). So I pressed

ctrl-c

When I entered bitcoind again, I found that is already was running:

Bitcoin: Cannot obtain a lock on data directory /root/.bitcoin. Bitcoin is probably already running.

It was also running after closing and re-opening the ssh-conection to the server. So I thought everything was ok now. I also generated a bitcoin-address which worked fine.

Now, about 12 or 14 hours later, I reconnected to the ubuntu-server and entered

# bitcoind getinfo

but the answer was

error: couldn't connect to server

also displaying all active processes by calling top showed me, that bitcoind was not running. So I started it again by entering bitcoindin the command line, but again I didn't get the shell back, so again I had to press ctrl-c. But when I entered bitcoind getinfo after that I got the answer that I posted at the beginning of this posting ("errors" : "WARNING: Displayed transactions may not be correct! ...)

So here are my questions:

  1. What went wrong?
  2. How can I fix it?
  3. How can I start bitcoind and get back to shell again?
  4. How can I stop bitcoind? (I just can kill the process, I don't know any other way)

EDIT 1:

(2014-01-08; evening)

About stopping bitcoind: I found out that the command is bitcoind stop. But when I tried this yesterday I got an error (sorry, can't remember the exact error-message. I guess it sayed "unknown command", but I'm not shure)


EDIT 2:

(2014-01-09; morning)

Yesterday I stopped bitcoind and deleted everything in the directory /root/.bitcoin/ except wallet.dat and bitcoin.conf. Then I started bitcoind again. Even after about 8 hours it still worked fine. Sometimes it took up to about 20 seconds to respond to commands like bitcoind getinfo, but bitcoind always did give the expected answer without any error messages.

So I went to bed and this morning I logged in to my server again and I found that bitcoind was not running (the answer to bitcoind getinfo was error: couldn't connect to server).

So I started it with the command bitcoind. The answer was bitcoin server starting, but I did not get back the shell (I am unable to enter new commands). So I opened a second shell and entered bitcoind getinfo there, and after a few seconds the server responded with an status-json-object with an empty error-string (which means: no error). So I think the start was successful. But the first shell (where I did start bitcoind) is still hang up, since more than 30 minutes now.

3
  • Short answer: it looks like you have a very old version of the Bitcoin client and need to upgrade. I'll try and post a more compete answer later. Jan 8, 2014 at 15:48
  • Delete all blk*.dat files under your bitcoin directory. Let it download all blocks from the scratch and see if the "Displayed transactions may not be correct!" warning is still being displayed. If yes, then check your hard disk for bad tracks, check that it's not full, there isn't any sort of antivirus/antimalware programm corrupting your data, etc. Good luck.
    – user11221
    Jan 8, 2014 at 19:12
  • @NateEldredge: No, it is the newest available version for ubuntu. Yesterday I wrote in my question: ”Yesterday I installed bitcoind...“ So the date of installment was 7th of jan 2014. And I did post the version number. It is 32400. Jan 9, 2014 at 7:37

1 Answer 1

1

You are running bitcoind 0.3.24. This is a very old version that won't work properly on today's Bitcoin network. The latest version is 0.8.6.

It appears that the Ubuntu maintainers have not updated the version of bitcoind in the standard 12.04 repository; so you'll have to get a current version from somewhere else. The Ubuntu developers maintain a repository of their own for bitcoin, so you can install the latest version by doing:

sudo add-apt-repository ppa:bitcoin/bitcoin 
sudo apt-get update
sudo apt-get install bitcoind

You can also get these instructions from an "official" source by going to http://bitcoin.org/en/download and following the "Ubuntu (PPA)" link.

In answer to your other question, when you run bitcoind without arguments, it runs in the foreground and accepts commands on standard input (after a delay of a minute or two while starting). You can exit it by typing stop. You can also run it in the background by doing bitcoind -daemon, and then feed it commands by running bitcoind getinfo, etc.

3
  • "add-apt-repository ppa:bitcoin/bitcoin" did not work (unknown command add-apt-repository). So I edited sources.list and inserted this line: "deb ppa.launchpad.net/bitcoin/bitcoin/ubuntu precise main". After that I called "apt-get update" and got an error-message telling me that a public key could not be found. So I had to call "apt-key adv --recv-keys --keyserver keyserver.ubuntu.com [key-id from error-message]". Then "apt-get update" did work and with "apt-get dist-upgrade" I could upgrade to version "80600" (which I believe to be 0.8.6). Jan 10, 2014 at 12:49
  • @HubertSchölnast: Ok. apt-add-repository does this in one step. You apparently don't have it installed but it's in the python-software-properties package (in 12.04). Jan 10, 2014 at 16:43
  • @NateEldredge In the comment above this one you wrote "apt-add", but in the answer you wrote "add-apt". I think one of the two might be wrong. ;)
    – Murch
    Feb 19, 2014 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.