Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9424

search for mongod PID file in wrong location

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Blocker - P1 Blocker - P1
    • None
    • 2.4.2
    • None
    • None
    • Fedora 17
    • Linux
    • Hide

      1. Configure custom PID file location in /etc/mongod.conf

      2. Start mongo with "service mongod start" fails

      Show
      1. Configure custom PID file location in /etc/mongod.conf 2. Start mongo with "service mongod start" fails

    Description

      Instaed of accessing configured PID file at

      /export/home/mongo/DB1/mongodDB1.pid

      Mongo is trying access:

      /var/run/mongo/mongod.pid

      ========================================

      cat /etc/mongod.conf
      # mongo.conf
       
      #where to log
      logpath=/export/home/mongo/DB1/log/mongoDB1.log
       
      logappend=true
       
      # fork and run in background
      fork = true
       
      #port = 27017
       
      dbpath=/export/home/mongo/DB1/data
       
      # location of pidfile
      pidfilepath = /export/home/mongo/DB1/mongodDB1.pid

      ======

      Mongo start service hangs for minutes and fails:

      [root@localhost ~]# service mongod start
      Starting mongod (via systemctl):
       
       
       
      Job failed. See system journal and 'systemctl status' for details.
                                                                 [FAILED]

      =============

      Mongo is running after failure:

      [root@localhost ~]# ps -ef | grep mongo
      mongod    1036     1  0 03:05 ?        00:00:01 /usr/bin/mongod -f /etc/mongod.conf
      root      1121  1049  0 03:12 pts/1    00:00:00 grep --color=auto mongo

      =============

      Log info:

      Apr 23 03:05:52 localhost mongod[1028]: Starting mongod: Tue Apr 23 03:05:52.466
      Apr 23 03:05:52 localhost mongod[1028]: Tue Apr 23 03:05:52.467 warning: 32-bit servers don't have journaling enabled by default. Please use --journal if you want durability.
      Apr 23 03:05:52 localhost mongod[1028]: Tue Apr 23 03:05:52.468
      Apr 23 03:05:52 localhost mongod[1028]: about to fork child process, waiting until server is ready for connections.
      Apr 23 03:05:52 localhost mongod[1028]: forked process: 1036
      Apr 23 03:05:52 localhost mongod[1028]: all output going to: /export/home/mongo/DB1/log/mongoDB1.log
      Apr 23 03:05:52 localhost mongod[1028]: child process started successfully, parent exiting
      Apr 23 03:05:52 localhost mongod[1028]: [  OK  ]
       
      Apr 23 03:05:52 localhost systemd[1]: PID file /var/run/mongo/mongod.pid not readable (yet?) after start.

      Attachments

        Activity

          People

            adamc Adam Comerford
            ronwarshawsky@yahoo.com Ron Warshawsky
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: