Mongod--config/usr/local/etc/mongod.conf cannot start

Source: Internet
Author: User
Keywords Php mongodb
Problem Description:

  使用命令:mongod --config /usr/local/etc/mongod.conf 无法启动mongodb,也不打印任何信息。之前用的都好好的,请问是什么原因呢?

Enter Mongod print:

liudemacbook-air:~ liu$ mongod2016-05-09t15:05:42.632+0800 I CONTROL [Initandlisten] MongoDB starting:pid=867 port=270 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:

  使用命令:mongod --config /usr/local/etc/mongod.conf 无法启动mongodb,也不打印任何信息。之前用的都好好的,请问是什么原因呢?

Enter Mongod print:

liudemacbook-air:~ liu$ mongod2016-05-09t15:05:42.632+0800 I CONTROL [Initandlisten] MongoDB starting:pid=867 port=270 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)

From the error message, it is clear that /data/db there is no, you should check this first.

2016-05-09t15:05:42.633+0800 I STORAGE [Initandlisten] exception in initandlisten:29 Data directory/data/db not found., Terminating

If necessary, first set up this directory and try again.

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.