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

(CentOS 7/RHEL 7) init.d script should create directory for pid file if it is missing

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6.5, 2.7.5
    • Affects Version/s: 2.6.3, 2.7.0, 2.7.1, 2.7.2, 2.7.3
    • Component/s: Packaging
    • Labels:
    • Environment:
      CentOS 7, RHEL 7
    • Fully Compatible
    • Linux
    • Hide
      1. Problems when starting MongoDB after installation
        1. Install CentOS 7 Core
        2. Install MongoDB as descibed in Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux
        3. Try to start mongod using service mongod start
        4. Check the log file
      2. Starting after manually creating /var/run/mongod
        1. Create /var/run/mongod manually by issuing
          install -d -m 0755 -o mongod -g mongod /var/run/mongod
          
        2. Start mongod via service mongod start
        3. Check that it is running via service mongod status
        4. Reboot
        5. Check the log file
      Show
      Problems when starting MongoDB after installation Install CentOS 7 Core Install MongoDB as descibed in Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux Try to start mongod using service mongod start Check the log file Starting after manually creating /var/run/mongod Create /var/run/mongod manually by issuing install -d -m 0755 -o mongod -g mongod /var/run/mongod Start mongod via service mongod start Check that it is running via service mongod status Reboot Check the log file

      The initscript of the RPM packages does not check wether the directory the pidfile is written to exists.

      This makes it impossible to start mongod via the initscript on CentOS 7 at last, and presumably on RHEL 7, too, as the directory /var/run/mongod does not exist on system startup. The contents of /var/run seem to be deleted over a reboot, so creating the directory manually or via RPM does not help.

      The file mongo/rpm/init.d-mongod needs to be updated accordingly.

      I have already done that, a pull request will follow.

            Assignee:
            benety.goh@mongodb.com Benety Goh
            Reporter:
            markus.mahlberg@icloud.com Markus Mahlberg
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: