Re: Series of issues with Fedora 17 and MongoDB 2.2.1

153 views
Skip to first unread message

Mark Hillick

unread,
Nov 19, 2012, 7:35:43 AM11/19/12
to mongod...@googlegroups.com

Hi Erik,

I believe that most of the issues that you're referring to are all due to SELinux. Disabling SELinux results in a MongoDB being installed ok, however, this is not the solution that you'd like I presume (i.e. get it to work with SELinux enabled would be desirable).
  1. 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.
I'm not fully sure what you are saying is the issue here is? The default path is /var/lib/mongo. Do you want to run mongod with "--dbpath"? This isn't the correct way to do it with the conf file.
  1. /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
I've created a server ticket requesting this feature here, please vote and contribute to the ticket. The "chown" is natural given that MongoDB is install under the "mongod" user. I believe the lack of a PID file under /var/run is consistent across all platforms for MongoDB installations.
  1. Installing mongo-10gen-server will install and set it to start on reboot. Turn it off until you resolve the next issue (chkconfig mongod off)
  2. mongod starts, but doesn't know it. Attempt to start via service mongod start pauses for several minutes. The 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.
Can you confirm your SELinux settings (/etc/sysconfig/selinux) at the above stage?

I believe that our documentation on Fedora needs to be improved and I will investigate this.

There is another ticket currently under investigation regarding issues starting MongoDB on Fedora. If you have anything to add there, please do and vote on the feature.

Thanks

Mark

On Saturday, November 10, 2012 7:54:57 PM UTC, Erik Squires wrote:
I'm running fairly recent Fedora 17, 64 bit.  I've discovered several installation problems following the instructions from http://docs.mongodb.org/manual/tutorial/install-mongodb-on-redhat-centos-or-fedora-linux/

To summarize:

SELinux:
  1. Get attr on /  fails.  
  2. Need to:  semanage port -a -t mongod_port_t -p tcp 28017
These I have of course been able to work around.  

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

  1. 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.
  2. /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
  3. Installing mongo-10gen-server will install and set it to start on reboot. Turn it off until you resolve the next issue (chkconfig mongod off)
  4. mongod starts, but doesn't know it. Attempt to start via service mongod start pauses for several minutes. The 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.
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
Reply all
Reply to author
Forward
0 new messages