Strange behaviour starting process with init script

If you have more than one instance running on that server, or something else that might be putting another value here:

PIDFILE=/var/run/$NAME.pid

That would cause the problem you are seeing here, it will be looking for the process with the ID that is in that file to determine if mongod and what PID to stop when shutting it down.

You should also take a look at the permissions on that file to make sure that the process can access it and update it when it is starting up.

Basically, we need to have separate $NAME values for each init script you are using to avoid collisions, and make sure that the right PID value is making it into that file for the service to work as expected.

If everything looks good, then I would guess you are hitting the issues described here:

https://jira.mongodb.org/browse/SERVER-7254

numactl being invoked (as it should when installed) seems to cause the incorrect PID to be written to the PID file. We're looking for feedback troubleshooting this one, so if you could add your experience (and whether you have numactl installed) that would be appreciated.