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

"/var/run/mongodb/"mongod.pid" deleted on each Mongod shutdown

    • Server Development Platform
    • Fully Compatible
    • ALL
    • v7.0, v6.3, v6.0, v5.0, v4.4
    • Hide
      1. Upgrade from Mongo 5.0.14 to 5.0.16
      2. Start mongod with fork = true

       

      Now create the directroy manually an set the permissions for mongod to own it, and start mongod with fork = true - works fine:

       

      Show
      Upgrade from Mongo 5.0.14 to 5.0.16 Start mongod with fork = true   Now create the directroy manually an set the permissions for mongod to own it, and start mongod with fork = true - works fine:  

      ```

      {"t":\{"$date":"2023-04-17T13:50:46.795+02:00"}

      ,"s":"I",  "c":"CONTROL",  "id":23330,   "ctx":"main","msg":"ERROR: Cannot write pid file to {path_string}: {errAndStr_second}","attr":{"path_string":"/var/run/mongodb/mongod.pid","errAndStr_second":"No such file or directory"}}

      ```

      mongod.conf

      ```

      1. mongod.conf
      1. for documentation of all options, see:
      2.   http://docs.mongodb.org/manual/reference/configuration-options/
      1. where to write logging data.
        systemLog:
          destination: file
          logAppend: true
          path: /var/log/mongodb/mongod.log
      1. Where and how to store data.
        storage:
          dbPath: /var/lib/mongo
          journal:
            enabled: true
      2.  engine:
      3.  wiredTiger:
      1. how the process runs
        processManagement:
          fork: true  # fork and run in background
          pidFilePath: /var/run/mongodb/mongod.pid  # location of pidfile
          timeZoneInfo: /usr/share/zoneinfo
      1. network interfaces
        net:
          port: 27017
          bindIpAll: true

      security:
        authorization:
          enabled
        keyFile: /etc/ssl/mongo_replica.key
      #operationProfiling:

      replication:
        replSetName: xxxx

      #sharding:

        1. Enterprise-Only Options

      #auditLog:

      #snmp:

      ```

      OS: CentOS 7

       

            Assignee:
            alex.neben@mongodb.com Alex Neben
            Reporter:
            tedi.roca@gmail.com Tedi Roca
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: