MongoDB 5.0.15 is released

MongoDB 5.0.15 is out and is ready for production deployment. This release contains only fixes since 5.0.14, and is a recommended upgrade for all 5.0 users.

Fixed in this release:

  • SERVER-54900 Blocking networking calls can delay sync-source resolution indefinitely
  • SERVER-71759 dataSize command doesn't yield
  • SERVER-72222 MapReduce with single reduce optimization fails when merging results in sharded cluster
  • SERVER-72416 The find and findAndModify projection code does not honor the collection level collation
  • WT-9268 Delay deletion of the history store record to reconciliation
5.0 Release Notes | All Issues | All Downloads

As always, please let us know of any issues.

-- The MongoDB Team

After the update looks like Mongo cannot start using the standard service.

Hi Team and thanks for the update.

We’re encountering an issue after update. If we stop the service and launch mongo with

mongod -f /etc/mongod.conf

It works.

The only error we can see from logs in case of starting with service is

{“t”:{“$date”:“2023-03-01T10:00:02.645+01:00”},“s”:“I”, “c”:“NETWORK”, “id”:4333208, “ctx”:“ReplicaSetMonitor-TaskExecutor”,“msg”:“RSM host selection timeout”,“attr”:{“replicaSet”:“rs0”,“error”:“FailedToSatisfyReadPreference: Could not find host matching read preference { mode: "primary" } for set rs0”}}

And we get Connection Refused.

Centos 7

Looks like adding the following to the service file made it working again.

ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb
ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb
ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb

1 Like

The strange thing is that the mongo update changes the Service File.

Can you please share with us what was changed?

I do not see how adding

would help the start up following an update. These are for new install of for installations that were tempered with. If you are updating then your directories and the permissions should already be there and correct.

I am not too sure about

Is it normal that an upgrade modifies the service file without any advise?

Without those parameters our mongo instance cannot start.

I would say yes since an update might need to setup new directories, new resources or even have new dependencies from other services… I keep my /etc under git so I know and document what is happening.

Like I mentioned I do not know about PermissionsStartOnly, PIDFile and Type but I do not see how the following would stop an update to restart.

I honestly don’t know. But if we don’t restore the previous service file it doesn’t start with the default after upgrade.

Hello Stevevej,

I had the same issue as Andrea and followed your indication by adding lines:

ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb
ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb
ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb

but I have an error mesage when trying to start the service

Job for mongod.service failed because the control process exited with error code. See “systemctl status mongod.service” and “journalctl -xe” for details.

mongod[14313]: about to fork child process, waiting until server is ready for connections.
mongod[14313]: forked process: 14316
mongod[14313]: ERROR: child process failed, exited with 14
mongod[14313]: To see additional information in this output, start without the “–fork” option.
systemd[1]: mongod.service: control process exited, code=exited status=14
systemd[1]: Failed to start MongoDB Database Server.
– Subject: Unit mongod.service has failed
– Defined-By: systemd
– Support: systemd-devel Info Page

– Unit mongod.service has failed.

– The result is failed.

Your issue seems to be different because the solution does not work in your case.

Please start a new thread.

Just to be clear we have a 5 node replicaset. Is not a standalone setup.

This topic was automatically closed after 90 days. New replies are no longer allowed.