debain9 下mongo启动报错解决 ERROR: Cannot write pid file to /var/run/mongodb/mongod.pid: No such file or di

具体报错如下:

2019-08-19T10:47:17.709+0800 I CONTROL  [main] ***** SERVER RESTARTED *****
2019-08-19T10:47:17.711+0800 I CONTROL  [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'
2019-08-19T10:47:17.719+0800 I CONTROL  [main] ERROR: Cannot write pid file to /var/run/mongodb/mongod.pid: No such file or directory

解决办法:

root@instance-tbbjrcnc:/# touch  /var/run/mongodb/mongod.pid
root@instance-tbbjrcnc:/# chown -R mongodb:mongodb /var/run/mongodb/mongod.pid

即可启动成功。

要是还启动不成功,参考下面链接,把mongo启动相关的路径权限改一下

参考链接:

https://blog.csdn.net/cocos2dGirl/article/details/99306964

你可能感兴趣的:(mongo)