[SERVER-7687] SELinux issues on Fedora 17, and fails to start. Created: 16/Nov/12  Updated: 08/Mar/13  Resolved: 24/Feb/13

Status: Closed
Project: Core Server
Component/s: Admin
Affects Version/s: 2.2.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Erik Squires Assignee: David Hows
Resolution: Incomplete Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Fedora 17 (last updated November 11, 2012


Operating System: ALL
Steps To Reproduce:

Create new Fedora 17 installation VM. Add 10gen Repo's and follow installation instructions.

Attempt to start the service. After the SELinux issues are resolved, service still won't know it started.

Participants:

 Description   

SELinux:
1. Get attr on / fails. This is a common issue with Fedora and installs. I've had it happen with Fail2Ban and other packages.

2. Need to: semanage port -a -t mongod_port_t -p tcp 28017

In addition I have discovered the following other issues, not related to SELinux:

Mongo doesn't seem to take the configuration option for the db path, so you must create /data/db. That is, /etc/mongod.conf is correct and sets the dbpath to a path that exists, but it won't accept it.
/var/run/mongodb is not created on install. You must create /var/run/mongodb so that the PID may be stored. also must do chown mongod:mongod /var/run/mongodb

Mongod starts, but doesn't know it. Attempt to start via service mongod start pauses for several minutes until it "fails." However, the issue really is that it started, but it doesn't know it.

Mongod is running, you can connect to it, query, etc. but service doesn't know it, so it will hang. If you put it to auto-start it will hang your boot process, making you believe that your VM is corrupted.

I'm pretty surprised others aren't running into an issue as I'm doing this with a fairly clean install of Fedora. The only things I have really changed are updated, and installed Sun JDK.

Regards,

Erik



 Comments   
Comment by Ron Waldon [ 30/Nov/12 ]

I just installed MongoDB via the 10gen repository in Fedora 18 beta. I can confirm that the RPM doesn't create the /var/run/mongodb directory. I had to manually create this and change the owner:group to mongod:mongod in order for the PID file to be created as per the default mongod.conf.

Comment by David Hows [ 22/Nov/12 ]

Hi Erik,

Can you attach your /etc/mongod.conf and the logfile which shows the above errors?

Can you also provide any output from the start of the service?

Cheers,

David

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