10 / 10
Jun 2024

Hi, just updated my test server (Ubuntu 20.04) from a previous 5.x release to 5.18 and I’m now getting this error when restarting:

Environment variable MONGODB_CONFIG_OVERRIDE_NOFORK == 1, overriding “processManagement.fork” to false

Mongod is configured to run as a single-node replicaset on this server, more details here:

storage: dbPath: /var/lib/mongodb journal: enabled: true oplogMinRetentionHours: 24 systemLog: destination: file logAppend: true logRotate: reopen path: /var/log/mongodb/mongod.log net: port: 27017 bindIp: 127.0.0.1 processManagement: timeZoneInfo: /usr/share/zoneinfo fork: true pidFilePath: /run/mongodb/mongod.pid replication: replSetName: test-replica-name

Mongod does start, but systemd doesn’t detect it as running so it then triggers a shutdown. I’m using the default unit file. All of this is related to the changes down starting with 5.15 related to forking.

If I remember correctly, forking was needed to achieve a sane behavior with logrotate.

Hi @Jean-Francois_Lebeau

Please note that MongoDB 5.13, 5.15, and 5.18 are not official MongoDB versions. Did you mean MongoDB 5.0.18 instead?

Either way, could you post how did you install MongoDB, and whether you’re using Docker or similar?

Best regards
Kevin

Obviously I meant 5.0.x. No docker, standard Ubuntu install (apt).

5.0.13 works with the forking option, but not 5.0.18, I recall that forking was needed for logrotate.

1 year later

Were you able to find a resolution to this? I’m running up against the same problem. Linux Fedora standard install (dnf)