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

Mongod crash after restart (missing systemd-tempfile configuration)

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.8
    • Component/s: Packaging
    • None
    • ALL
    • Hide

      + Install mongodb from https://repo.mongodb.org/zypper/suse/11/mongodb-org/3.0
      + restart the computer
      + check if mongod is running (it's not)
      + check the log for error related to PID file.

      Show
      + Install mongodb from https://repo.mongodb.org/zypper/suse/11/mongodb-org/3.0 + restart the computer + check if mongod is running (it's not) + check the log for error related to PID file.

      The same issue related to creation of /var/run/mongodb/ folder that is marked as fixed on CentOS/RHEL7 and SUSE12, but not fixed on OpenSUSE (42.1).

      Error from mongod.log
      I CONTROL ERROR: Cannot write pid file to /var/run/mongodb/mongod.pid: No such file or directory

      This is due to missing configuration file that creates a folder in the temporary filesystem /var/run upon every boot.

      Steps to fix: On OpenSUSE 12.2 and higher,
      sudo sh -c 'echo "d /var/run/mongodb 0755 mongod mongod" > /usr/lib/tmpfiles.d/mongodb.conf'
      sudo systemd-tmpfiles --create mongodb.conf
      sudo service mongod start

            Assignee:
            kelsey.schubert@mongodb.com Kelsey Schubert
            Reporter:
            xcorat sachi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: