user3122429
user3122429

Reputation: 17

Error during mongo startup

When I type mongo on command prompt than output like

~$ mongo

MongoDB shell version: 2.2.3

connecting to: test

But when I type mongo 127.0.0.1:28017/stu1

output :-

MongoDB shell version: 2.2.3

connecting to: 127.0.0.1:28017/stu1

Mon Mar 10 16:56:01 DBClientCursor::init call() failed

Mon Mar 10 16:56:01 Error: Error during mongo startup. :: caused by :: 10276 

DBClientBase::findN: transport error: 127.0.0.1:28017 ns: admin.$cmd query: { whatsmyuri: 1 } src/mongo/shell/mongo.js:93


exception: connect failed

OS :- ubuntu 12.04

So please help me to solve this error.

Upvotes: 0

Views: 974

Answers (2)

Kathir
Kathir

Reputation: 97

To have access to the database using HTTP protocol then use ~$ mongod --rest to start the db. Now call http://127.0.0.1:28017/stu1/coll_name in the web browser which list all the documents in your collection.

Upvotes: 0

Raul Andres
Raul Andres

Reputation: 3806

28017 is the default port for the HTTP admin interface, so if your config is allowing HTTP, you should use a web browser to access it http://127.0.0.1:28017/ You're trying to use mongo shell to access HTTP service.

Upvotes: 1

Related Questions