mongod --config /usr/local/etc/mongod.conf 无法启动

新手上路,请多包涵

问题:

  使用mac,第一次安装mongodb,使用命令:mongod --config /usr/local/etc/mongod.conf 无法启动mongodb,也不打印任何信息

输入输入mongod 打印:

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000} span.s1 {font-variant-ligatures: no-common-ligatures}
2020-01-21T09:37:47.092+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] MongoDB starting : pid=706 port=27017 dbpath=/data/db 64-bit host=zhaohangdeMacBook-Pro.local
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] db version v4.2.2
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] git version: a0bbbff6ada159e19298d37946ac8dc4b497eadf
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] allocator: system
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] modules: none
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] build environment:
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] distarch: x86_64
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] target_arch: x86_64
2020-01-21T09:37:47.101+0800 I CONTROL [initandlisten] options: {}
2020-01-21T09:37:47.102+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3584M,cache_overflow=(file_max=0M),session_max=33000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
2020-01-21T09:37:47.609+0800 I STORAGE [initandlisten] WiredTiger message [1579570667:609640][706:0x10f5f1dc0], txn-recover: Set global recovery timestamp: (0,0)
2020-01-21T09:37:47.672+0800 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2020-01-21T09:37:47.715+0800 I STORAGE [initandlisten] Timestamp monitor starting
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten]
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten]
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten]
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten]
2020-01-21T09:37:47.716+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2020-01-21T09:37:47.717+0800 I STORAGE [initandlisten] createCollection: admin.system.version with provided UUID: fb17097e-1776-4459-961d-f71499c404fd and options: { uuid: UUID("fb17097e-1776-4459-961d-f71499c404fd") }
2020-01-21T09:37:47.761+0800 I INDEX [initandlisten] index build: done building index _id_ on ns admin.system.version
2020-01-21T09:37:47.762+0800 I SHARDING [initandlisten] Marking collection admin.system.version as collection version: <unsharded>
2020-01-21T09:37:47.762+0800 I COMMAND [initandlisten] setting featureCompatibilityVersion to 4.2
2020-01-21T09:37:47.762+0800 I SHARDING [initandlisten] Marking collection local.system.replset as collection version: <unsharded>
2020-01-21T09:37:47.762+0800 I STORAGE [initandlisten] Flow Control is enabled on this deployment.

2020-01-21T09:37:47.762+0800 I SHARDING [initandlisten] Marking collection admin.system.roles as collection version: <unsharded>

2020-01-21T09:37:47.763+0800 I STORAGE [initandlisten] createCollection: local.startup_log with generated UUID: 98a179e5-d6d1-47a4-af7b-b1687587be18 and options: { capped: true, size: 10485760 }

2020-01-21T09:37:47.816+0800 I INDEX [initandlisten] index build: done building index _id_ on ns local.startup_log

2020-01-21T09:37:47.816+0800 I SHARDING [initandlisten] Marking collection local.startup_log as collection version: <unsharded>

2020-01-21T09:37:47.816+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/diagnostic.data'

2020-01-21T09:37:47.819+0800 I SHARDING [LogicalSessionCacheRefresh] Marking collection config.system.sessions as collection version: <unsharded>
2020-01-21T09:37:47.819+0800 I NETWORK [initandlisten] Listening on /tmp/mongodb-27017.sock
2020-01-21T09:37:47.819+0800 I NETWORK [initandlisten] Listening on 127.0.0.1

2020-01-21T09:37:47.819+0800 I NETWORK [initandlisten] waiting for connections on port 27017

2020-01-21T09:37:47.822+0800 I CONTROL [LogicalSessionCacheReap] Sessions collection is not set up; waiting until next sessions reap interval: config.system.sessions does not exist

2020-01-21T09:37:47.822+0800 I STORAGE [LogicalSessionCacheRefresh] createCollection: config.system.sessions with provided UUID: 92a85516-6fa3-46ae-bc19-0c2370a66c7e and options: { uuid: UUID("92a85516-6fa3-46ae-bc19-0c2370a66c7e") }

2020-01-21T09:37:47.867+0800 I INDEX [LogicalSessionCacheRefresh] index build: done building index _id_ on ns config.system.sessions

2020-01-21T09:37:47.912+0800 I INDEX [LogicalSessionCacheRefresh] index build: starting on config.system.sessions properties: { v: 2, key: { lastUse: 1 }, name: "lsidTTLIndex", ns: "config.system.sessions", expireAfterSeconds: 1800 } using method: Hybrid
2020-01-21T09:37:47.912+0800 I INDEX [LogicalSessionCacheRefresh] build may temporarily use up to 500 megabytes of RAM
2020-01-21T09:37:47.913+0800 I INDEX [LogicalSessionCacheRefresh] index build: collection scan done. scanned 0 total records in 0 seconds
2020-01-21T09:37:47.913+0800 I INDEX [LogicalSessionCacheRefresh] index build: inserted 0 keys from external sorter into index in 0 seconds
2020-01-21T09:37:47.924+0800 I INDEX [LogicalSessionCacheRefresh] index build: done building index lsidTTLIndex on ns config.system.sessions
2020-01-21T09:37:47.935+0800 I COMMAND [LogicalSessionCacheRefresh] command config.system.sessions command: createIndexes { createIndexes: "system.sessions", indexes: [ { key: { lastUse: 1 }, name: "lsidTTLIndex", expireAfterSeconds: 1800 } ], $db: "config" } numYields:0 reslen:114 locks:{ ParallelBatchWriterMode: { acquireCount: { r: 2 } }, ReplicationStateTransition: { acquireCount: { w: 3 } }, Global: { acquireCount: { r: 1, w: 2 } }, Database: { acquireCount: { r: 1, w: 2, W: 1 } }, Collection: { acquireCount: { r: 4, w: 1, R: 1, W: 2 } }, Mutex: { acquireCount: { r: 3 } } } flowControl:{ acquireCount: 1 } storage:{} protocol:op_msg 113ms
2020-01-21T09:37:48.001+0800 I SHARDING [ftdc] Marking collection local.oplog.rs as collection version: <unsharded>
Killed: 9

也没看到明显的报错信息

环境:osx(mac)

阅读 3.9k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进