Displayed transactions may not be correct! 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:


What went wrong?
How can I fix it?
How can I start bitcoind and get back to shell again?
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.
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.