Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7285

Support Systemd (cannot start mongodb with init scripts with Fedora 15 or above)

    Details

    • Operating System:
      ALL

      Description

      Hello,
      I cannot start mongodb 2.2.0 on Fedora 17
      got the error
      Oct 05 12:59:50 Evkalipt runuser[1787]: pam_unix(runuser:session): session opened for user mongod by (uid=0)
      Oct 05 12:59:50 Evkalipt mongod[1783]: Starting mongod: can't open [/var/log/mongo/mongod.log] for log file: errno:13 Permission denied
      Oct 05 12:59:50 Evkalipt runuser[1787]: pam_unix(runuser:session): session closed for user mongod

      permissions are ok for mongod user

      drwxr-xr-x. 2 mongod mongod 4096 Oct 5 12:41 /var/log/mongo
      rw-r----. 1 mongod mongod 0 Aug 28 22:42 mongod.log

      Thanks,
      Edouard

        Issue Links

          Activity

          Hide
          ernie.hershey@10gen.com Ernie Hershey added a comment -

          FWIW - I just verified that on a stock rhel 7.0 machine with systemd, our community RPM with non-systemd init script installs cleanly and lets you control the service via the 'service' command, according to the standard docs here - http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/

          Show
          ernie.hershey@10gen.com Ernie Hershey added a comment - FWIW - I just verified that on a stock rhel 7.0 machine with systemd, our community RPM with non-systemd init script installs cleanly and lets you control the service via the 'service' command, according to the standard docs here - http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'mikemaccana', u'name': u'Mike MacCana', u'email': u'mike.maccana@gmail.com'}

          Message: SERVER-7285 Add mongod.service file for Linux

          Add a systemd .service file. This is used in place of System V init scripts on most current Linux distributions.

          Closes #740

          Signed-off-by: Benety Goh <benety@mongodb.com>
          Branch: master
          https://github.com/mongodb/mongo/commit/1663f45b4e33e058a0203a81f50574a870882c34

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'mikemaccana', u'name': u'Mike MacCana', u'email': u'mike.maccana@gmail.com'} Message: SERVER-7285 Add mongod.service file for Linux Add a systemd .service file. This is used in place of System V init scripts on most current Linux distributions. Closes #740 Signed-off-by: Benety Goh <benety@mongodb.com> Branch: master https://github.com/mongodb/mongo/commit/1663f45b4e33e058a0203a81f50574a870882c34
          Hide
          andreibarsan Andrei Barsan added a comment -

          Any news regarding this issue? There are already many Linux server distros which use systemd by default, such as Fedora, RHEL, OpenLogic and CentOS.

          Show
          andreibarsan Andrei Barsan added a comment - Any news regarding this issue? There are already many Linux server distros which use systemd by default, such as Fedora, RHEL, OpenLogic and CentOS.
          Hide
          octoquad Bruce Pieterse added a comment - - edited

          To extend on Andrei Barsan's comment, Ubuntu Vivid Vervet (15.04) has made the switch to systemd a few weeks back. As a tester for Ubuntu Gnome, I upgraded earlier to catch any distribution upgrade bugs from 14.10. Unfortunately this also rendered my installation of MongoDB 2.6.x with the instructions followed here: http://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-ubuntu/ now unusable:

          » sudo service mongod start
          Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.

          » systemctl start mongod
          Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory.

          If I need to file a seperate report for this, please let me know.

          Thanks

          Show
          octoquad Bruce Pieterse added a comment - - edited To extend on Andrei Barsan's comment, Ubuntu Vivid Vervet (15.04) has made the switch to systemd a few weeks back. As a tester for Ubuntu Gnome, I upgraded earlier to catch any distribution upgrade bugs from 14.10. Unfortunately this also rendered my installation of MongoDB 2.6.x with the instructions followed here: http://docs.mongodb.org/v2.6/tutorial/install-mongodb-on-ubuntu/ now unusable: » sudo service mongod start Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory. » systemctl start mongod Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory. If I need to file a seperate report for this, please let me know. Thanks
          Hide
          ernie.hershey@10gen.com Ernie Hershey added a comment -

          Andrei Barsan we're working to prioritize this. You're right that systemd is becoming the default in more and more places and the sooner we improve our support for it the easier it will make using MongoDB on those distributions.

          Bruce Pieterse - we'll probably have additional issues to work through before our packages work in Ubuntu 15.04. I've created a separate ticket to track that work - SERVER-17742

          Show
          ernie.hershey@10gen.com Ernie Hershey added a comment - Andrei Barsan we're working to prioritize this. You're right that systemd is becoming the default in more and more places and the sooner we improve our support for it the easier it will make using MongoDB on those distributions. Bruce Pieterse - we'll probably have additional issues to work through before our packages work in Ubuntu 15.04. I've created a separate ticket to track that work - SERVER-17742

            People

            • Votes:
              14 Vote for this issue
              Watchers:
              27 Start watching this issue

              Dates

              • Created:
                Updated:
                Days since reply:
                22 weeks, 2 days ago
                Date of 1st Reply: