[SERVER-17462] Server start error in SUSE Enterprise 12 Created: 04/Mar/15  Updated: 29/Dec/15  Resolved: 13/May/15

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

Type: Bug Priority: Minor - P4
Reporter: Mengzhe You Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: build-planning, startup
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SLES 12


Issue Links:
Duplicate
duplicates SERVER-14679 (CentOS 7/RHEL 7) init.d script shoul... Closed
Operating System: Linux
Steps To Reproduce:

1. Install mongodb from zypper repository.
2. # systemctl start mongod.service

Participants:

 Description   

Mongod can not start with error:
I CONTROL ERROR: Cannot write pid file to /var/run/mongodb/mongod.pid: No such file or directory

The mongodb was installed from zypper repository "http://repo.mongodb.org/zypper/suse/11/mongodb-org/3.0/x86_64/".

This should be a rpm package issue, the rpm do not create /var/run/mongodb/ with the correct permission.

So, the workaround is create /var/run/mongodb/ manually:

  1. mkdir -p /var/run/mongodb
  2. chown mongod:mongod /var/run/mongodb


 Comments   
Comment by sachi [ 29/Dec/15 ]

Just installed mongo from the same repo on OpenSUSE 42.1, and issue doesn't seem to have been fixed. Given the fix is simply to create a config file in systemd-tmpfiles, I'm not sure why this is still there..!

Comment by Mengzhe You [ 05/Mar/15 ]

Hi, Ernie Hershey

Yes, you are right, the /var/run is mounted as tmpfs on my system.
I upgraded to the 3.0.0 from the 3.0.0 rc version, then encountered this issue.

Thanks!

Comment by Ernie Hershey [ 04/Mar/15 ]

Hi mengzyou - this is probably due to /var/run being on a tmpfs filesystem as part of systemd, which is only provisionally supported in mongodb 3.0.0. Thanks for the bug report and workaround.

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