Details
-
Bug
-
Resolution: Cannot Reproduce
-
Minor - P4
-
None
-
3.2.9
-
None
-
Fully Compatible
-
ALL
-
-
Evergreen 2016-10-31
Description
Hi,
I setted up a replicaset on Centos 7 and I am facing issue with permission and automatic restart after a reboot.
This is an extract of the config which I named mongod_dr:
systemLog:
|
destination: file
|
logAppend: true
|
path: /log/mongo/DR/mongo.log
|
|
|
# Where and how to store data.
|
storage:
|
dbPath: /data/mongo/DR
|
journal:
|
enabled: true
|
# engine:
|
# mmapv1:
|
# wiredTiger:
|
|
|
# how the process runs
|
processManagement:
|
fork: true # fork and run in background
|
pidFilePath: /var/run/mongodb/mongod_dr.pid # location of pidfile
|
|
|
# network interfaces
|
net:
|
port: 27017
|
and this the extract of the associated init.d script /etc/initd./mongod_dr:
# NOTE: if you change any OPTIONS here, you get what you pay for:
|
# this script assumes all options are in the config file.
|
CONFIGFILE="/etc/mongod_dr.conf"
|
OPTIONS=" -f $CONFIGFILE"
|
SYSCONFIG="/etc/sysconfig/mongod"
|
|
|
PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'" | awk -F'#' '{print $1}'`
|
|
|
mongod=${MONGOD-/usr/bin/mongod}
|
|
|
MONGO_USER=mongod
|
MONGO_GROUP=mongod
|
I also already setted up chkconfig:
mongod_dr 0:off 1:off 2:off 3:on 4:off 5:on 6:off
|
I also already change the permission for the user mongod to all the involved paths, but what is happening is that after the reboot it doesn't start and even with the command:
sudo service mongod_dr start
|
the only way to start is this:
/usr/bin/mongod -f /etc/mongod_dr.conf
|
Is there anyway to fix this?what am i doing wrong?
Regards,
Carlo Alberto