macos bigsur 11.4
mongodb-community@4.2
自制3.2.0-59-g196ec61
brew services restart mongodb-community
==
brew services list
mongodb-community@4.2错误根 /Library/LaunchDaemons/homebrew.mxcl.mongodb-community@4.2.plist
sudo cat /usr/local/var/log/mongodb/mongo.log
2021-06-26T11:18:57.026+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2021-06-26T11:18:57.039+0800 I CONTROL [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } }
2021-06-26T11:18:57.039+0800 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Permission denied
2021-06-26T11:18:57.039+0800 F - [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 684
2021-06-26T11:18:57.039+0800 F - [initandlisten] \n\n***aborting after fassert() failure\n\n
然后我
rm /tmp/mongodb-27017.sock
现在日志是
2021-06-26T11:40:26.976+0800 I CONTROL [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } }
2021-06-26T11:40:26.984+0800 W STORAGE [initandlisten] Detected unclean shutdown - /usr/local/var/mongodb/mongod.lock is not empty.
2021-06-26T11:40:26.985+0800 I STORAGE [initandlisten] Detected data files in /usr/local/var/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2021-06-26T11:40:26.986+0800 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.
2021-06-26T11:40:26.986+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],
2021-06-26T11:40:27.541+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624678827:541176][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624678827:541176][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:40:27.541+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624678827:541497][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624678827:541497][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:40:27.541+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624678827:541729][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624678827:541729][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:40:27.541+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624678827:541949][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624678827:541949][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:40:27.542+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624678827:542167][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624678827:542167][13476:0x10c276e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:40:27.542+0800 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2021-06-26T11:40:27.542+0800 F STORAGE [initandlisten] Reason: 13: Permission denied
2021-06-26T11:40:27.542+0800 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 925
2021-06-26T11:40:27.542+0800 F - [initandlisten] \n\n***aborting after fassert() failure\n\n
2021-06-26T11:50:32.312+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2021-06-26T11:50:32.314+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2021-06-26T11:50:32.370+0800 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] MongoDB starting : pid=13996 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=tangfeideMBP
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] db version v4.2.12
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] git version: 5593fd8e33b60c75802edab304e23998fa0ce8a5
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] allocator: system
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] modules: none
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] build environment:
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] distarch: x86_64
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] target_arch: x86_64
2021-06-26T11:50:32.371+0800 I CONTROL [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } }
2021-06-26T11:50:32.374+0800 W STORAGE [initandlisten] Detected unclean shutdown - /usr/local/var/mongodb/mongod.lock is not empty.
2021-06-26T11:50:32.374+0800 I STORAGE [initandlisten] Detected data files in /usr/local/var/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2021-06-26T11:50:32.374+0800 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.
2021-06-26T11:50:32.374+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],
2021-06-26T11:50:33.138+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624679433:138458][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624679433:138458][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:50:33.139+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624679433:139627][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624679433:139627][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:50:33.140+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624679433:139999][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624679433:139999][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:50:33.140+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624679433:140299][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624679433:140299][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:50:33.140+0800 E STORAGE [initandlisten] WiredTiger error (13) [1624679433:140557][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1624679433:140557][13996:0x110586e00], wiredtiger_open: __posix_open_file, 665: /usr/local/var/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
2021-06-26T11:50:33.140+0800 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2021-06-26T11:50:33.140+0800 F STORAGE [initandlisten] Reason: 13: Permission denied
2021-06-26T11:50:33.140+0800 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 925
2021-06-26T11:50:33.140+0800 F - [initandlisten] \n\n***aborting after fassert() failure\n\n
我试过卸载
我想使用brew安装mongoDB-社区不下载tgz
sudo chmod -R 777 /usr/local/var/mongodb
我的日志是
2021-06-26T16:56:11.129+0800 I CONTROL [main] ***** SERVER RESTARTED *****
2021-06-26T16:56:11.131+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2021-06-26T16:56:11.141+0800 W ASIO [main] No TransportLayer configured during NetworkInterface startup
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] MongoDB starting : pid=16280 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=tangfeideMBP
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] db version v4.2.12
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] git version: 5593fd8e33b60c75802edab304e23998fa0ce8a5
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] allocator: system
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] modules: none
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] build environment:
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] distarch: x86_64
2021-06-26T16:56:11.142+0800 I CONTROL [initandlisten] target_arch: x86_64
2021-06-26T16:56:11.143+0800 I CONTROL [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } }
2021-06-26T16:56:11.143+0800 W STORAGE [initandlisten] Detected unclean shutdown - /usr/local/var/mongodb/mongod.lock is not empty.
2021-06-26T16:56:11.144+0800 I STORAGE [initandlisten] Detected data files in /usr/local/var/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'.
2021-06-26T16:56:11.144+0800 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.
2021-06-26T16:56:11.144+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],
2021-06-26T16:56:11.737+0800 I STORAGE [initandlisten] WiredTiger message [1624697771:737816][16280:0x10e837e00], txn-recover: Recovering log 307 through 308
2021-06-26T16:56:11.803+0800 I STORAGE [initandlisten] WiredTiger message [1624697771:803716][16280:0x10e837e00], txn-recover: Recovering log 308 through 308
2021-06-26T16:56:11.867+0800 I STORAGE [initandlisten] WiredTiger message [1624697771:867812][16280:0x10e837e00], txn-recover: Main recovery loop: starting at 307/896 to 308/256
2021-06-26T16:56:11.950+0800 I STORAGE [initandlisten] WiredTiger message [1624697771:950264][16280:0x10e837e00], txn-recover: Recovering log 307 through 308
2021-06-26T16:56:12.006+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:6322][16280:0x10e837e00], txn-recover: Recovering log 308 through 308
2021-06-26T16:56:12.050+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:50624][16280:0x10e837e00], txn-recover: Set global recovery timestamp: (0, 0)
2021-06-26T16:56:12.120+0800 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2021-06-26T16:56:12.124+0800 I STORAGE [initandlisten] No table logging settings modifications are required for existing WiredTiger tables. Logging enabled? 1
2021-06-26T16:56:12.128+0800 I STORAGE [initandlisten] WiredTigerKVEngine shutting down
2021-06-26T16:56:12.128+0800 I STORAGE [initandlisten] Shutting down session sweeper thread
2021-06-26T16:56:12.128+0800 I STORAGE [initandlisten] Finished shutting down session sweeper thread
2021-06-26T16:56:12.128+0800 I STORAGE [initandlisten] Shutting down journal flusher thread
2021-06-26T16:56:12.292+0800 I STORAGE [initandlisten] Finished shutting down journal flusher thread
2021-06-26T16:56:12.293+0800 I STORAGE [initandlisten] Shutting down checkpoint thread
2021-06-26T16:56:12.293+0800 I STORAGE [initandlisten] Finished shutting down checkpoint thread
2021-06-26T16:56:12.293+0800 I STORAGE [initandlisten] Downgrading WiredTiger datafiles.
2021-06-26T16:56:12.383+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:383569][16280:0x10e837e00], txn-recover: Recovering log 308 through 309
2021-06-26T16:56:12.425+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:425294][16280:0x10e837e00], txn-recover: Recovering log 309 through 309
2021-06-26T16:56:12.489+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:489618][16280:0x10e837e00], txn-recover: Main recovery loop: starting at 308/2176 to 309/256
2021-06-26T16:56:12.581+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:581244][16280:0x10e837e00], txn-recover: Recovering log 308 through 309
2021-06-26T16:56:12.639+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:639630][16280:0x10e837e00], txn-recover: Recovering log 309 through 309
2021-06-26T16:56:12.689+0800 I STORAGE [initandlisten] WiredTiger message [1624697772:689602][16280:0x10e837e00], txn-recover: Set global recovery timestamp: (0, 0)
2021-06-26T16:56:12.855+0800 I STORAGE [initandlisten] exception in initAndListen: MustDowngrade: Collection does not have UUID in KVCatalog. Collection: a.p, terminating
2021-06-26T16:56:12.855+0800 I REPL [initandlisten] Stepping down the ReplicationCoordinator for shutdown, waitTime: 10000ms
2021-06-26T16:56:12.855+0800 I SHARDING [initandlisten] Shutting down the WaitForMajorityService
2021-06-26T16:56:12.855+0800 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2021-06-26T16:56:12.855+0800 I NETWORK [initandlisten] Shutting down the global connection pool
2021-06-26T16:56:12.855+0800 I STORAGE [initandlisten] Shutting down the FlowControlTicketholder
2021-06-26T16:56:12.855+0800 I - [initandlisten] Stopping further Flow Control ticket acquisitions.
2021-06-26T16:56:12.855+0800 I INDEX [initandlisten] Shutting down the IndexBuildsCoordinator
2021-06-26T16:56:12.855+0800 I NETWORK [initandlisten] Shutting down the ReplicaSetMonitor
2021-06-26T16:56:12.855+0800 I CONTROL [initandlisten] Shutting down free monitoring
2021-06-26T16:56:12.855+0800 I FTDC [initandlisten] Shutting down full-time data capture
2021-06-26T16:56:12.855+0800 I STORAGE [initandlisten] Shutting down the HealthLog
2021-06-26T16:56:12.855+0800 I - [initandlisten] Dropping the scope cache for shutdown
2021-06-26T16:56:12.855+0800 I CONTROL [initandlisten] now exiting
2021-06-26T16:56:12.855+0800 I CONTROL [initandlisten] shutting down with code:100
我试着安装mongodb-community@4.4
我的日志是
{"t":{"$date":"2021-06-26T20:36:12.625+08:00"},"s":"I", "c":"CONTROL", "id":20698, "ctx":"main","msg":"***** SERVER RESTARTED *****"}
{"t":{"$date":"2021-06-26T20:36:12.626+08:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2021-06-26T20:36:12.632+08:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2021-06-26T20:36:12.633+08:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2021-06-26T20:36:12.633+08:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":18288,"port":27017,"dbPath":"/usr/local/var/mongodb","architecture":"64-bit","host":"tangfeideMBP"}}
{"t":{"$date":"2021-06-26T20:36:12.633+08:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.5","gitVersion":"ff5cb77101b052fa02da43b8538093486cf9b3f7","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2021-06-26T20:36:12.633+08:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"20.5.0"}}}
{"t":{"$date":"2021-06-26T20:36:12.633+08:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/usr/local/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/usr/local/var/mongodb"},"systemLog":{"destination":"file","logAppend":true,"path":"/usr/local/var/log/mongodb/mongo.log"}}}}
{"t":{"$date":"2021-06-26T20:36:12.635+08:00"},"s":"W", "c":"STORAGE", "id":22271, "ctx":"initandlisten","msg":"Detected unclean shutdown - Lock file is not empty","attr":{"lockFile":"/usr/local/var/mongodb/mongod.lock"}}
{"t":{"$date":"2021-06-26T20:36:12.635+08:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/usr/local/var/mongodb","storageEngine":"wiredTiger"}}
{"t":{"$date":"2021-06-26T20:36:12.636+08:00"},"s":"W", "c":"STORAGE", "id":22302, "ctx":"initandlisten","msg":"Recovering data from the last clean checkpoint."}
{"t":{"$date":"2021-06-26T20:36:12.636+08:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3584M,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,compact_progress],"}}
{"t":{"$date":"2021-06-26T20:36:13.151+08:00"},"s":"W", "c":"STORAGE", "id":22347, "ctx":"initandlisten","msg":"Failed to start up WiredTiger under any compatibility version. This may be due to an unsupported upgrade or downgrade."}
{"t":{"$date":"2021-06-26T20:36:13.151+08:00"},"s":"F", "c":"STORAGE", "id":28595, "ctx":"initandlisten","msg":"Terminating.","attr":{"reason":"45: Operation not supported"}}
{"t":{"$date":"2021-06-26T20:36:13.151+08:00"},"s":"F", "c":"-", "id":23091, "ctx":"initandlisten","msg":"Fatal assertion","attr":{"msgid":28595,"file":"src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp","line":947}}
{"t":{"$date":"2021-06-26T20:36:13.151+08:00"},"s":"F", "c":"-", "id":23092, "ctx":"initandlisten","msg":"\n\n***aborting after fassert() failure\n\n"}
无法在任何兼容版本下启动WiredTiger。这可能是由于不受支持的升级或降级。
我不知道如何修复
mongod --dbpath '/Users/tangfei/data/db'
它的作品
我认为macos不能创造 /data/db
/usr/local/etc/mongod.conf
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
dbPath: /usr/local/var/mongodb
net:
bindIp: 127.0.0.1
日志在任何兼容版本下启动WiredTiger失败。这可能是由于不受支持的升级或降级。
现在我尝试编辑我的配置
systemLog:
destination: file
path: /Users/tangfei/data/mongo/log/mongo.log
logAppend: true
storage:
dbPath: /Users/tangfei/data/mongo/data
net:
bindIp: 127.0.0.1
brew服务停止mongoDB-社区brew服务开始mongoDB-社区
这看起来很成功sudo lsof-i: 27017
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mongod 12019 tangfei 9u IPv4 0xb34606b03f96cf9 0t0 TCP localhost:27017 (LISTEN)
但
酿造服务列表
Name Status User Plist
mongodb-community error tangfei /Users/tangfei/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
那么为什么brew服务状态为错误
日志
{"t":{"$date":"2021-06-27T09:48:54.459+08:00"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2021-06-27T09:48:54.464+08:00"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2021-06-27T09:48:54.464+08:00"},"s":"I", "c":"NETWORK", "id":4648602, "ctx":"main","msg":"Implicit TCP FastOpen in use."}
{"t":{"$date":"2021-06-27T09:48:54.465+08:00"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":12994,"port":27017,"dbPath":"/Users/tangfei/data/mongo/data","architecture":"64-bit","host":"tangfeideMBP"}}
{"t":{"$date":"2021-06-27T09:48:54.465+08:00"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.5","gitVersion":"ff5cb77101b052fa02da43b8538093486cf9b3f7","modules":[],"allocator":"system","environment":{"distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2021-06-27T09:48:54.465+08:00"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Mac OS X","version":"20.5.0"}}}
{"t":{"$date":"2021-06-27T09:48:54.465+08:00"},"s":"I", "c":"CONTROL", "id":21951, "ctx":"initandlisten","msg":"Options set by command line","attr":{"options":{"config":"/usr/local/etc/mongod.conf","net":{"bindIp":"127.0.0.1"},"storage":{"dbPath":"/Users/tangfei/data/mongo/data"},"systemLog":{"destination":"file","logAppend":true,"path":"/Users/tangfei/data/mongo/log/mongo.log"}}}}
{"t":{"$date":"2021-06-27T09:48:54.469+08:00"},"s":"I", "c":"STORAGE", "id":22270, "ctx":"initandlisten","msg":"Storage engine to use detected by data files","attr":{"dbpath":"/Users/tangfei/data/mongo/data","storageEngine":"wiredTiger"}}
{"t":{"$date":"2021-06-27T09:48:54.469+08:00"},"s":"I", "c":"STORAGE", "id":22315, "ctx":"initandlisten","msg":"Opening WiredTiger","attr":{"config":"create,cache_size=3584M,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,compact_progress],"}}
{"t":{"$date":"2021-06-27T09:48:55.272+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:272209][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 4 through 5"}}
{"t":{"$date":"2021-06-27T09:48:55.315+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:315511][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 5 through 5"}}
{"t":{"$date":"2021-06-27T09:48:55.394+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:394068][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Main recovery loop: starting at 4/11008 to 5/256"}}
{"t":{"$date":"2021-06-27T09:48:55.487+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:487577][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 4 through 5"}}
{"t":{"$date":"2021-06-27T09:48:55.551+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:551282][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY_PROGRESS] Recovering log 5 through 5"}}
{"t":{"$date":"2021-06-27T09:48:55.596+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:596349][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global recovery timestamp: (0, 0)"}}
{"t":{"$date":"2021-06-27T09:48:55.596+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:596440][12994:0x10e308e00], txn-recover: [WT_VERB_RECOVERY | WT_VERB_RECOVERY_PROGRESS] Set global oldest timestamp: (0, 0)"}}
{"t":{"$date":"2021-06-27T09:48:55.608+08:00"},"s":"I", "c":"STORAGE", "id":22430, "ctx":"initandlisten","msg":"WiredTiger message","attr":{"message":"[1624758535:608220][12994:0x10e308e00], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 1, snapshot max: 1 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"}}
{"t":{"$date":"2021-06-27T09:48:55.652+08:00"},"s":"I", "c":"STORAGE", "id":4795906, "ctx":"initandlisten","msg":"WiredTiger opened","attr":{"durationMillis":1183}}
{"t":{"$date":"2021-06-27T09:48:55.652+08:00"},"s":"I", "c":"RECOVERY", "id":23987, "ctx":"initandlisten","msg":"WiredTiger recoveryTimestamp","attr":{"recoveryTimestamp":{"$timestamp":{"t":0,"i":0}}}}
{"t":{"$date":"2021-06-27T09:48:55.661+08:00"},"s":"I", "c":"STORAGE", "id":4366408, "ctx":"initandlisten","msg":"No table logging settings modifications are required for existing WiredTiger tables","attr":{"loggingEnabled":true}}
{"t":{"$date":"2021-06-27T09:48:55.665+08:00"},"s":"I", "c":"STORAGE", "id":22262, "ctx":"initandlisten","msg":"Timestamp monitor starting"}
{"t":{"$date":"2021-06-27T09:48:55.674+08:00"},"s":"W", "c":"CONTROL", "id":22120, "ctx":"initandlisten","msg":"Access control is not enabled for the database. Read and write access to data and configuration is unrestricted","tags":["startupWarnings"]}
{"t":{"$date":"2021-06-27T09:48:55.680+08:00"},"s":"I", "c":"STORAGE", "id":20536, "ctx":"initandlisten","msg":"Flow Control is enabled on this deployment"}
{"t":{"$date":"2021-06-27T09:48:55.681+08:00"},"s":"I", "c":"FTDC", "id":20625, "ctx":"initandlisten","msg":"Initializing full-time diagnostic data capture","attr":{"dataDirectory":"/Users/tangfei/data/mongo/data/diagnostic.data"}}
{"t":{"$date":"2021-06-27T09:48:55.683+08:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-27017.sock"}}
{"t":{"$date":"2021-06-27T09:48:55.684+08:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"127.0.0.1"}}
{"t":{"$date":"2021-06-27T09:48:55.684+08:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"Waiting for connections","attr":{"port":27017,"ssl":"off"}}
尝试以下三个步骤:
>
手动重新创建/usr/local/var/mongoDB
目录。
删除/tmp/mongob-27017. sock
文件。
运行mongod
命令。
确保上述两个文件的创建者与运行mongod
命令的用户相同。