MongoDB test error

I found out about mongoDB and was looking for a test. So, I did this, and then for testing, when I used the mongo command on the 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 the problem is. I am using ubuntu 11.04. I used this site to install the instructions. I am new to this mongoDB, so please help me. Any help would be very noticeable.

+6
source share
4 answers

It appears that MongoDB is not working. Can you connect to the web interface in your browser?

http: // localhost: 28017

Also do you see the process running on your computer? You should see an entry for mongod at startup ...

 $ top 

or

 $ ps aux 
+5
source

All you have to do is open 2 terminals. In one run

 mongod 

which starts the MongoDB server.

Otherwise, run

 mongo 

which is a shell that connects to your MongoDB server.

+10
source

why not install mongodb from 10gen your own debian repository? much easier and more likely to work

http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages

To find out if mongodb works, it also helps:

 sudo service mongodb status 

if it is running and you still get the same error, then this should be the weird localhost error that mongodb has. for some reason, it assumes that localhost is 127.0.1.1. try

 mongo 127.0.1.1 
+1
source

I had the same problem. Just try creating the c: \ data folder and the following c: \ data \ db

+1
source

Source: https://habr.com/ru/post/893952/


All Articles