Found by Paschalis Korosoglou and reported via githib:
I noticed (CentOS 6) that the init script fails to parse the contents of the configuration file as expected resulting in failure to stop the service when asked.
The error steps in from this line in the init script:
PIDFILEPATH=`awk -F'[:=]' -v IGNORECASE=1 '/^[[:blank:]]*(processManagement\.)?pidfilepath[[:blank:]]*[:=][[:blank:]]*/{print $2}' "$CONFIGFILE" | tr -d "[:blank:]\"'"`What happens is that the PIDFILEPATH variable gets populated with all contents following the variable pidFilePath in the configuration file with spaces omitted. Hence using the default configuration file the bash variable gets the value:
# echo $PIDFILEPATH /var/run/mongodb/mongod.pid#locationofpidfile
- is duplicated by
-
SERVER-20947 'service mongod stop' does not stop mongod on amazon AMI
- Closed
-
SERVER-21321 daemon script pid parse issue
- Closed
-
SERVER-21668 Mongo not stopping on 3.0.7
- Closed
- links to