Mongod -- config/usr/local/etc/mongod. conf cannot be started

Source: Internet
Author: User
Problem description: {code...} input mongod print: {code...} environment: osx (mac) Problem description:

Run the command mongod -- config/usr/local/etc/mongod. conf to start mongodb without printing any information. I used it all well before. Why?

Input mongod to print:

liudeMacBook-Air:~ liu$ mongod2016-05-09T15:05:42.632+0800 I CONTROL  [initandlisten] MongoDB starting : pid=867 port=27017 dbpath=/data/db 64-bit host=liudeMacBook-Air.local2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] db version v3.2.32016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] git version: b326ba837cf6f49d65c2f85e1b70f6f31ece79372016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] allocator: system2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] modules: none2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] build environment:2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten]     distarch: x86_642016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten]     target_arch: x86_642016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] options: {}2016-05-09T15:05:42.633+0800 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] dbexit:  rc: 100

Environment: osx (mac)

Reply content:

Problem description:

Run the command mongod -- config/usr/local/etc/mongod. conf to start mongodb without printing any information. I used it all well before. Why?

Input mongod to print:

liudeMacBook-Air:~ liu$ mongod2016-05-09T15:05:42.632+0800 I CONTROL  [initandlisten] MongoDB starting : pid=867 port=27017 dbpath=/data/db 64-bit host=liudeMacBook-Air.local2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] db version v3.2.32016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] git version: b326ba837cf6f49d65c2f85e1b70f6f31ece79372016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] allocator: system2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] modules: none2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] build environment:2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten]     distarch: x86_642016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten]     target_arch: x86_642016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] options: {}2016-05-09T15:05:42.633+0800 I STORAGE  [initandlisten] exception in initAndListen: 29 Data directory /data/db not found., terminating2016-05-09T15:05:42.633+0800 I CONTROL  [initandlisten] dbexit:  rc: 100

Environment: osx (mac)

The error messages clearly indicate/data/dbDoes not exist. Check this point first.

T15: 05: 42.633 + 0800 I STORAGE [initandlisten] exception in initAndListen: 29 Data directory/data/db not found., terminating

Create this directory and try again if necessary

sudo mkdir /data/db

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.