mongodb 啟動故障

babyyellow發表於2022-08-23

鈼 mongod.service - MongoDB Database Server

   Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)

   Active: failed (Result: exit-code) since Tue 2022-08-23 10:11:48 CST; 18s ago

     Docs:

  Process: 9278 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=14)

  Process: 9275 ExecStartPre=/usr/bin/chmod -R 0755 /app/mongodb (code=exited, status=0/SUCCESS)

  Process: 9272 ExecStartPre=/usr/bin/chown -R mongod:mongod /app/mongodb (code=exited, status=0/SUCCESS)

  Process: 9270 ExecStartPre=/usr/bin/mkdir -p /app/mongodb (code=exited, status=0/SUCCESS)

 Main PID: 9278 (code=exited, status=14)


 systemd[1]: Starting MongoDB Database Server...

systemd[1]: Started MongoDB Database Server.

 mongod[9278]: about to fork child process, waiting until server is ready for connections.

 mongod[9278]: forked process: 9281

  mongod[9278]: ERROR: child process failed, exited with 14

 mongod[9278]: To see additional information in this output, start without the "--fork" option.

 systemd[1]: mongod.service: main process exited, code=exited, status=14/n/a

 systemd[1]: Unit mongod.service entered failed state.

 systemd[1]: mongod.service failed.


mongodb   用systemctl 啟動的時候, 報這個錯誤。 


這個時候, 是需要注意幾個許可權問題的。 



data  目錄讀寫許可權    

軟體可行性許可權。 

啟動使用者對不對。


還有很重要的一個  /tmp 下面的 socket 檔案的讀寫許可權。 




看看這幾個地方的許可權問題 ,基本上就解決了 








來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/133735/viewspace-2911557/,如需轉載,請註明出處,否則將追究法律責任。

相關文章