Reputation: 13333
I came to know about mongoDB and looked for test.So I made it install and then for test when I used command mongo on terminal it showed an error like this
MongoDB shell version: 1.8.2
connecting to: test
Sun Jul 31 01:06:07 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed
So can someone tell me what is the problem.I am using ubuntu 11.04.For installation instruction I had used this site.I am newbie to this mongoDB so please helpe me.Any help will be highly appreciable.
Upvotes: 6
Views: 14860
Reputation: 11
I had the same problem. Just try to create folder c:\data and next c:\data\db
Upvotes: 1
Reputation: 8489
All you need to do is open 2 terminal tabs. In one, run
mongod
which starts the MongoDB server.
In the other, run
mongo
which is the shell that connects to your MongoDB server.
Upvotes: 10
Reputation: 4799
why not install mongodb from 10gen's own debian repository? much easier and more likely to work
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
To see if mongodb is running, this also helps:
sudo service mongodb status
if it is running, and you still get the same error, then it must be the weird localhost bug that mongodb has. it assumes localhost is 127.0.1.1 for some reason. try
mongo 127.0.1.1
Upvotes: 1
Reputation: 27080
It looks like MongoDB isn't running. Can you connect to the web interface in your browser?
Also, do you see the process running on your machine? You should see an entry for mongod when running ...
$ top
or
$ ps aux
Upvotes: 5