Centos
CentOS 7 MongoDB 無法啟動
我正在跑步
Linux centos-002 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
。我根據官方指南安裝了最新的 MongoDB(雖然我沒有按照安裝部分的步驟進行操作)。我的 mongod 服務無法啟動,在日誌中我發現以下內容:2020-02-18T08:55:32.762+0000 I CONTROL [main] ***** SERVER RESTARTED ***** 2020-02-18T08:55:32.768+0000 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none' 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] MongoDB starting : pid=65692 port=27017 dbpath=/var/lib/mongo 64-bit host=centos 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] db version v4.2.3 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] git version: 6874650b362138df74be53d366bbefc321ea32d4 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] allocator: tcmalloc 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] modules: none 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] build environment: 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] distmod: rhel70 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] distarch: x86_64 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] target_arch: x86_64 2020-02-18T08:55:32.778+0000 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, processManagement: { fork: true, pidFilePath: "/var/run/mongodb/mongod.pid", timeZoneInfo: "/usr/$ 2020-02-18T08:55:32.778+0000 E NETWORK [initandlisten] Failed to unlink socket file /tmp/mongodb-27017.sock Operation not permitted 2020-02-18T08:55:32.778+0000 F - [initandlisten] Fatal Assertion 40486 at src/mongo/transport/transport_layer_asio.cpp 683 2020-02-18T08:55:32.778+0000 F - [initandlisten] ***aborting after fassert() failure
通過將 /tmp/mongodb-27017.sock 的所有者設置為來解決
mongod:mongod