ubuntu 12.04 - different PID logged than running

19 views
Skip to first unread message

jona...@findmeon.com

unread,
Feb 22, 2016, 8:17:25 PM2/22/16
to mongodb-user
I can't figure out what is going on here.  

the startup script spins up 14769 and writes it to the pid file, but 14772 is the real process.

my first thought was that the server was re-spawning (that happened to me with redis), but there is nothing logged anywhere to suggest that is happening or why

does anyone have a clue what I should be looking for?

i'd like to get the PID properly logged so the startup/shutdown scripts will work properly

----------

    # service mongod start
    mongod start/running, process 14769

    # more /var/run/mongodb.pid
    14769

BUT

    # tail -n 100 /var/log/mongodb/mongod.log | grep "MongoDB starting"
    2016-02-23T01:10:10.849+0000 I CONTROL  [initandlisten] MongoDB starting : pid=14772 port=27017 dbpath=/mounts/postgres_data/mongodb-data/3.0.6 64-bit host=musket

    # ps aux | grep mongo
    mongodb  14772  2.0  0.9 253364 78724 ?        Sl   01:10   0:01 /usr/bin/mongod --config /etc/mongod.conf



Kevin Adistambha

unread,
Feb 22, 2016, 11:26:32 PM2/22/16
to mongodb-user

Hello,

# ps aux | grep mongo

mongodb 14772 2.0 0.9 253364 78724 ? Sl 01:10 0:01 /usr/bin/mongod —config /etc/mongod.conf

Could you check the content of the /etc/mongod.conf file if it contains the setting fork: true? This setting instructs the mongod process to fork and run in the background.

If it doesn’t contain fork: true, could you post the content of the file? There might be some other setting there that is causing this behavior.

Best regards,
Kevin

jona...@findmeon.com

unread,
Feb 22, 2016, 11:36:55 PM2/22/16
to mongodb-user
BINGO!

Thanks!

I don't know how that got in there - it may have been a default line from a 2.x branch ?

I was focused on this being related to older bugs regarding `numactl`.
Reply all
Reply to author
Forward
0 new messages