mongo shell – JavaScript execution failed: Error: couldn’t connect to server – Quick Fix

I have just installed MongoDB v2.4.5 on my Ubuntu 13.04 64 bit system and when I tried to connect to the server from command line using the mongo shell provided with the installed mongodb-10gen package, I got the following error:

I tried to start, stop and restart the mongodb service using these commands but the error remained there:

Finally, I looked at the log file ( /var/log/mongodb ) and found the following error message listed there: Continue reading mongo shell – JavaScript execution failed: Error: couldn’t connect to server – Quick Fix