[SERVER-22024] Mongod crash after restart (missing systemd-tempfile configuration) Created: 29/Dec/15  Updated: 07/Jan/16  Resolved: 07/Jan/16

Status: Closed
Project: Core Server
Component/s: Packaging
Affects Version/s: 3.0.8
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: sachi Assignee: Kelsey Schubert
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-7285 Support systemd in future compatible ... Closed
Duplicate
duplicates SERVER-18162 Fail to start with non-existing /var/... Closed
Operating System: ALL
Steps To Reproduce:

+ 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.

Participants:

 Description   

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



 Comments   
Comment by Kelsey Schubert [ 07/Jan/16 ]

Hi xcorat,

Thank you for the report. We have identified this as duplicate of SERVER-18162. The fix was included in 3.2, and I have requested a backport to 3.0.

Please watch SERVER-18162 for updates on the backport.

Kind regards,
Thomas

Generated at Thu Feb 08 03:59:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.