Can not start MongoDB 3.2.1 on CentOS 7 -
i followed doc install mongodb 3.2.1 on centos 7. after installing, change owner , group of var/lib/mongo
, var/log/mongodb/mongod.log
root:root
.
when start mongodb service mongod start
, shows
starting mongod (via systemctl): job mongod.service failed. see 'systemctl status mongod.service' , 'journalctl -xn' details.[failed]
i have run 2 commands show details.
systemctl status mongod.service
shows
mongod.service - sysv: mongo scalable, document-oriented database. loaded: loaded (/etc/rc.d/init.d/mongod) active: failed (result: exit-code) since wen 2016-01-27 18:32:46 cst; 14s ago process: 24913 execstart=/etc/rc.d/init.d/mongod start (code=exited, status=1/failure) main pid: 23711 (code=exited, status=0/success) 1月 27 18:32:45 server1 systemd[1]: starting sysv: mongo scalable, document-oriented database.... 1月 27 18:32:45 server1 runuser[24920]: pam_unix(runuser:session): session opened user mongod (uid=0) 1月 27 18:32:46 server1 mongod[24913]: starting mongod: [failed] 1月 27 18:32:46 server1 systemd[1]: mongod.service: control process exited, code=exited status=1 1月 27 18:32:46 server1 systemd[1]: failed start sysv: mongo scalable, document-oriented database.. 1月 27 18:32:46 server1 systemd[1]: unit mongod.service entered failed state.
journalctl -xn
shows
-- logs begin @ 日 2016-01-24 16:33:05 cst, end @ wen 2016-01-27 18:32:46 cst. -- 1月 27 18:32:15 server1 sshd[24879]: pam_succeed_if(sshd:auth): requirement "uid >= 1000" not met user "root" 1月 27 18:32:17 server1 sshd[24879]: failed password root 182.100.67.59 port 10013 ssh2 1月 27 18:32:45 server1 sudo[24896]: root : tty=pts/0 ; pwd=/var/log/mongodb ; user=root ; command=/sbin/service mongod start 1月 27 18:32:45 server1 systemd[1]: starting sysv: mongo scalable, document-oriented database.... -- subject: unit mongod.service has begun start-up -- defined-by: systemd -- support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- unit mongod.service has begun starting up. 1月 27 18:32:45 server1 runuser[24920]: pam_unix(runuser:session): session opened user mongod (uid=0) 1月 27 18:32:46 server1 runuser[24920]: pam_unix(runuser:session): session closed user mongod 1月 27 18:32:46 server1 mongod[24913]: starting mongod: [failed] 1月 27 18:32:46 server1 systemd[1]: mongod.service: control process exited, code=exited status=1 1月 27 18:32:46 server1 systemd[1]: failed start sysv: mongo scalable, document-oriented database.. -- subject: unit mongod.service has failed -- defined-by: systemd -- support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- unit mongod.service has failed. -- -- result failed. 1月 27 18:32:46 server1 systemd[1]: unit mongod.service entered failed state.
i accessed server ssh key, no password.
is reason change ownership root?
both /var/lib/mongo
, /var/log/mongodb
should writable mongodb user.
by default mongodb:mongodb
. check user runs mongodb service in /etc/init.d/mongodb
. if daemonuser=${daemonuser:-mongodb}
chown directories user.
Comments
Post a Comment