Launching Mongod Validation "You need to specify db path /data/db."

Hello. I have been receiving error from “validate_lab_launch_mongod” saying that “You need to specify db path /data/db”. I don’t understand this error. Starting mongod from command line and adding admin user seemed all fine.

Here’s the command line I used to start mongod:

mongod --auth --port 27000 --bind_ip "192.168.103.100, 127.0.0.1" --dbpath ./data/db/ --logpath ./data/log/mongod.log --fork

Here’s the log file from mongod.log:

2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] MongoDB starting : pid=3484 port=27000 dbpath=/home/vagrant/data/db/ 64-bit host=m103 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] db version v3.6.12 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] git version: c2b9acad0248ca06b14ef1640734b5d0595b55f1 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] allocator: tcmalloc 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] modules: enterprise 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] build environment: 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] distmod: ubuntu1404 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] distarch: x86_64 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] target_arch: x86_64 2019-06-19T07:24:27.397+0000 I CONTROL [initandlisten] options: { net: { bindIp: “192.168.103.100, 127.0.0.1”, port: 27000 }, processManagement: { fork: true }, security:$2019-06-19T07:24:27.397+0000 I STORAGE [initandlisten] 2019-06-19T07:24:27.397+0000 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2019-06-19T07:24:27.397+0000 I STORAGE [initandlisten] ** See http://dochub.mongodb.org/core/prodnotes-filesystem 2019-06-19T07:24:27.397+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=488M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base$2019-06-19T07:24:28.070+0000 I STORAGE [initandlisten] WiredTiger message [1560929068:70609][3484:0x7f4ef4556a80], txn-recover: Set global recovery timestamp: 0 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is ‘always’. 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never’ 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is ‘always’. 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] ** We suggest setting it to ‘never’ 2019-06-19T07:24:28.084+0000 I CONTROL [initandlisten] 2019-06-19T07:24:28.085+0000 I STORAGE [initandlisten] createCollection: admin.system.version with provided UUID: 4ec76f39-d993-4825-b01d-0487633ba53f 2019-06-19T07:24:28.091+0000 I COMMAND [initandlisten] setting featureCompatibilityVersion to 3.6 2019-06-19T07:24:28.101+0000 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: a6051ead-7fcf-4569-8d12-9ccd03849091 2019-06-19T07:24:28.108+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory ‘/home/vagrant/data/db/diagnostic.data’ 2019-06-19T07:24:28.111+0000 I NETWORK [initandlisten] waiting for connections on port 27000 2019-06-19T07:24:28.112+0000 I STORAGE [LogicalSessionCacheRefresh] createCollection: config.system.sessions with generated UUID: eff540bc-8ba6-4a19-b307-31222d008e0e 2019-06-19T07:24:28.120+0000 I INDEX [LogicalSessionCacheRefresh] build index on: config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: “lsidTTLIndex”, $2019-06-19T07:24:28.120+0000 I INDEX [LogicalSessionCacheRefresh] building index using bulk method; build may temporarily use up to 500 megabytes of RAM 2019-06-19T07:24:28.121+0000 I INDEX [LogicalSessionCacheRefresh] build index done. scanned 0 total records. 0 secs 2019-06-19T07:24:37.825+0000 I NETWORK [listener] connection accepted from 127.0.0.1:52282 #1 (1 connection now open) 2019-06-19T07:24:37.825+0000 I ACCESS [conn1] note: no users configured in admin.system.users, allowing localhost access 2019-06-19T07:24:37.825+0000 I NETWORK [conn1] received client metadata from 127.0.0.1:52282 conn1: { application: { name: “MongoDB Shell” }, driver: { name: "MongoDB Int$2019-06-19T07:24:37.842+0000 I STORAGE [conn1] createCollection: admin.system.users with generated UUID: 4f7e664c-e00e-45e3-a08b-565eaa5215ad
2019-06-19T07:24:37.825+0000 I NETWORK [conn1] received client metadata from 127.0.0.1:52282 conn1: { application: { name: “MongoDB Shell” }, driver: { name: "MongoDB Int$2019-06-19T07:24:37.842+0000 I STORAGE [conn1] createCollection: admin.system.users with generated UUID: 4f7e664c-e00e-45e3-a08b-565eaa5215ad 2019-06-19T07:24:37.869+0000 I ACCESS [conn1] Unauthorized: not authorized on admin to execute command { endSessions: [ { id: UUID(“4d3e0522-f3c2-4724-8fd8-6c1219de0171”$2019-06-19T07:24:37.870+0000 I NETWORK [conn1] end connection 127.0.0.1:52282 (0 connections now open) 2019-06-19T07:24:43.874+0000 I NETWORK [listener] connection accepted from 127.0.0.1:52284 #2 (1 connection now open) 2019-06-19T07:24:43.875+0000 I NETWORK [conn2] received client metadata from 127.0.0.1:52284 conn2: { driver: { name: “mongo-go-driver”, version: “local build” }, os: { t$2019-06-19T07:24:43.889+0000 I ACCESS [conn2] Successfully authenticated as principal m103-admin on admin 2019-06-19T07:24:43.890+0000 I NETWORK [listener] connection accepted from 127.0.0.1:52286 #3 (2 connections now open) 2019-06-19T07:24:43.890+0000 I NETWORK [conn3] received client metadata from 127.0.0.1:52286 conn3: { driver: { name: “mongo-go-driver”, version: “local build” }, os: { t$2019-06-19T07:24:43.902+0000 I ACCESS [conn3] Successfully authenticated as principal m103-admin on admin 2019-06-19T07:24:43.912+0000 I ACCESS [conn3] Successfully authenticated as principal m103-admin on admin 2019-06-19T07:24:43.921+0000 I ACCESS [conn3] Successfully authenticated as principal m103-admin on admin 2019-06-19T07:24:43.922+0000 I NETWORK [conn2] end connection 127.0.0.1:52284 (1 connection now open) 2019-06-19T07:24:43.922+0000 I NETWORK [conn3] end connection 127.0.0.1:52286 (0 connections now open) 2019-06-19T07:25:05.348+0000 I NETWORK [listener] connection accepted from 127.0.0.1:52288 #4 (1 connection now open) 2019-06-19T07:25:05.348+0000 I NETWORK [conn4] received client metadata from 127.0.0.1:52288 conn4: { application: { name: “MongoDB Shell” }, driver: { name: "MongoDB Int$2019-06-19T07:25:10.931+0000 I ACCESS [conn4] Unauthorized: not authorized on admin to execute command { endSessions: [ { id: UUID(“fdfe3dd2-ebed-4856-bf24-ae2e25b2f96a”$2019-06-19T07:25:10.934+0000 I NETWORK [conn4] end connection 127.0.0.1:52288 (0 connections now open)

And here’s what happen when I try to validate:

vagrant@m103:~$  validate_lab_launch_mongod
You need to specify db path /data/db.

Hi again. I solved the problem thanks to a thread posted in February. I apologize for the duplicate question. I couldn’t find the post when browsing through the discussion board but it popped up after I posted this one.

Here’s the solved question thread: Can't get Validation Key in Lab - Launching Mongod

1 Like