-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Packaging
-
None
-
ALL
/etc/init.d/mongod
Here is the line from parse PIDFILEPATH
PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'"`
The default configure file come from rpm /etc/mongod.conf for pid is
pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile
When daemon parse PIDFILEPATH from configure file, it get the comment line too.
Now the issue is
pid file be created by mongo using the configure/option file, which support "#".
Daemon use PIDFILEPATH parse trying to get some pid file to find pid and kill. It got incorrect file name and cannot kill mongod for clean shutdown.
What user saw is using standard systemctl stop mongod.service or service stop mongod, prompt will return OK but cannot stop mongod.,
- duplicates
-
SERVER-21209 PIDFILEPATH computation in init scripts fails to handle comments after values
- Closed