Bug 702764 - [TRIVIAL] mongodb service fails to start due to missing database directory
Summary: [TRIVIAL] mongodb service fails to start due to missing database directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: mongodb
Version: el5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Orphan Owner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-06 21:34 UTC by Chris Snook
Modified: 2014-02-04 09:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-04 09:40:20 UTC
Type: ---


Attachments (Terms of Use)

Description Chris Snook 2011-05-06 21:34:38 UTC
Description of problem:
The mongodb-server package uses /var/lib/mongodb to store database files by default, but it does not actually create the directory, causing the service to crash on startup, while reporting success to the initscript.

Version-Release number of selected component (if applicable):
mongodb-server-1.6.4-1.el5

How reproducible:
100%

Steps to Reproduce:
1. Install mongodb-server on an el5 system that does not have a /var/lib/mongodb directory.
2. service mongod start

Actual results:
Initscript reports [  OK  ] but mongodb is not actually running.  The following appears in /var/log/mongodb/mongodb.log:

Fri May  6 21:06:23 exception in initAndListen std::exception: dbpath (/var/lib/mongodb) does not exist, terminating

Expected results:
/var/lib/mongodb is created at install time and chowned to the mongodb user, and mongodb starts properly.  Ideally the initscript should report failure instead of okay, but the asynchronous nature of the daemon startup may make that impossible.

Additional info:
Works fine on F14.

Comment 1 Matthias Saou 2014-02-04 09:40:20 UTC
Closing, as EPEL 5 currently has mongodb 2.2.0 which does install the required empty directory.


Note You need to log in before you can comment on or make changes to this bug.