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

Cannot write pid file to /var/run/mongodb/mongod.pid: No such file or directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: 2.6.4
    • Fix Version/s: None
    • Component/s: Packaging
    • Labels:
      None
    • Operating System:
      ALL

      Description

      I've logged this under docs, but I think core is probably more appropriate:

      ----------------

      Hi,
      I'm running mongo server on rhel7 and systemd: # rpm -q mongodb-org-server
      mongodb-org-server-2.6.4-1.x86_64

      I'm trying to run the daemon: # /etc/rc.d/init.d/mongod start
      Starting mongod (via systemctl): Job for mongod.service failed. See 'systemctl status mongod.service' and 'journalctl -xn' for details.
      [FAILED]

      when I look at the log, I'm seeing:
      2014-10-20T11:36:28.085+0530 ***** SERVER RESTARTED *****
      2014-10-20T11:36:28.087+0530 ERROR: Cannot write pid file to /var/run/mongodb/mongod.pid: No such file or directory

      The way around it is to create mongodb.conf in /lib/tmpfiles.d/ with following content:
      d /var/run/mongodb 0755 mongod mongod

      Please add /lib/tmpfiles.d/mongodb.conf to mongodb-org-server package

      http://stackoverflow.com/questions/23086655/mongodb-service-will-not-start-after-initial-setup

      Many thanks,
      Tomas

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ernie.hershey Ernie Hershey
              Reporter:
              tomasd Tomas Dabašinskas
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: