Can not connect to mongo

Somebody met the such problem?

vagrant@m103:~/first_mongod$ validate_lab_first_application_user

Client experienced a timeout when connecting to the database - check that mongod

is running on the correct port, and that the ‘m103-application-user’ user

authenticates against the admin database.

vagrant@m103:~/first_mongod$ mongo admin -u root -p root123
MongoDB shell version v3.6.9
connecting to: mongodb://127.0.0.1:27017/admin
Implicit session: session { “id” : UUID(“fbe35587-0b4e-4e65-9d4e-be37cd53a3d9”) }
MongoDB server version: 3.6.9
Server has startup warnings:
2018-11-27T11:44:42.048+0000 I STORAGE [initandlisten]
2018-11-27T11:44:42.048+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine
2018-11-27T11:44:42.048+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem
MongoDB Enterprise > use admin
switched to db admin
MongoDB Enterprise > db.getUsers()
[
{
“_id” : “admin.m103-admin”,
“user” : “m103-admin”,
“db” : “admin”,
“roles” : [
{
“role” : “root”,
“db” : “admin”
}
]
},
{
“_id” : “admin.m103-application-user”,
“user” : “m103-application-user”,
“db” : “admin”,
“roles” : [
{
“role” : “readWrite”,
“db” : “applicationData”
}
]
},
{
“_id” : “admin.root”,
“user” : “root”,
“db” : “admin”,
“roles” : [
{
“role” : “root”,
“db” : “admin”
}
]
}
]

I think this lab asks you to start mongod on the 27000 port.

2 Likes

Yeah! You’re right problem is that it wanted port 27000! It was unpredictable. Such many times during quizes and labs to change config, db placement, logpath and other, and in the just wrote to you don’t need to change config. Genius.

1 Like