Another reason for absolutely irrelevant answer I uninstalled 2.2.0 and installed2.0.7 where everything is working
the log file also does not have 'x'. -rw-r--r--. 1 mongodb mongodb 986 Oct 5 23:43 mongodb.log So, it is some 2.2.0 bug. Where do you get that the log file needs 'x'?
I do not know what happened with my original description and why the topic starts with "Re:", I am posting the problem here =========================
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 I de-installed 2.2.0 (from mongodb.org/downloads) and installed 2.0.7 using Fedora/updates and everything is ok.
The "very smart guy" that "knows unix very well" replied
=======================================
मैं एक भारतीय बेवकूफ हूँ 2:02 AM (6 hours ago)
to me Only idiots repost the same question twice within an hour. Moron!
==================================
You better learn unix.
"x" for the log file - if you do not know do not tell, or at least check your system if you have brain.
The log should never be executable as such there should never be an x on it.
Log files should only be accessible by root, many programs suffice this by
starting in root but then downgrading to the right user, i.e. apache
downgrades to www-data.
I think this is most likely to the problem, the user itself does not have
access. I reckon if you were to add sudo to your command it would work, I
am unsure what the best way is to run MongoDB on fedora but from a startup
(/etc/init.d or whatever) script it normally runs with the ability to touch
the log directory due to running effectively in sudo mode.
How are you running this? You haven't included the command.
On 6 October 2012 16:14, Edouard Perov <edouardpe...@gmail.com> wrote:
> The "very smart guy" that "knows unix very well" replied
> =======================================
> मैं एक भारतीय बेवकूफ हूँ
> 2:02 AM (6 hours ago)
> to me
> Only idiots repost the same question twice within an hour. Moron!
> ==================================
> You better learn unix.
> "x" for the log file - if you do not know do not tell, or at least check
> your system if you have brain.
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
> The log should never be executable as such there should never be an x on
> it.
> Log files should only be accessible by root, many programs suffice this by
> starting in root but then downgrading to the right user, i.e. apache
> downgrades to www-data.
> I think this is most likely to the problem, the user itself does not have
> access. I reckon if you were to add sudo to your command it would work, I
> am unsure what the best way is to run MongoDB on fedora but from a startup
> (/etc/init.d or whatever) script it normally runs with the ability to touch
> the log directory due to running effectively in sudo mode.
> How are you running this? You haven't included the command.
> On 6 October 2012 16:14, Edouard Perov <edouardpe...@gmail.com> wrote:
>> The "very smart guy" that "knows unix very well" replied
>> =======================================
>> मैं एक भारतीय बेवकूफ हूँ
>> 2:02 AM (6 hours ago)
>> to me
>> Only idiots repost the same question twice within an hour. Moron!
>> ==================================
>> You better learn unix.
>> "x" for the log file - if you do not know do not tell, or at least check
>> your system if you have brain.
>> --
>> You received this message because you are subscribed to the Google
>> Groups "mongodb-user" group.
>> To post to this group, send email to mongodb-user@googlegroups.com
>> To unsubscribe from this group, send email to
>> mongodb-user+unsubscribe@googlegroups.com
>> See also the IRC channel -- freenode.net#mongodb
> can you also include a ls -la on the mongodb log directory for 2.0.7?
> On 6 October 2012 16:52, Sam Millman <sam.mill...@gmail.com> wrote:
>> The log should never be executable as such there should never be an x on
>> it.
>> Log files should only be accessible by root, many programs suffice this
>> by starting in root but then downgrading to the right user, i.e. apache
>> downgrades to www-data.
>> I think this is most likely to the problem, the user itself does not have
>> access. I reckon if you were to add sudo to your command it would work, I
>> am unsure what the best way is to run MongoDB on fedora but from a startup
>> (/etc/init.d or whatever) script it normally runs with the ability to touch
>> the log directory due to running effectively in sudo mode.
>> How are you running this? You haven't included the command.
>> On 6 October 2012 16:14, Edouard Perov <edouardpe...@gmail.com> wrote:
>>> The "very smart guy" that "knows unix very well" replied
>>> =======================================
>>> मैं एक भारतीय बेवकूफ हूँ
>>> 2:02 AM (6 hours ago)
>>> to me
>>> Only idiots repost the same question twice within an hour. Moron!
>>> ==================================
>>> You better learn unix.
>>> "x" for the log file - if you do not know do not tell, or at least check
>>> your system if you have brain.
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "mongodb-user" group.
>>> To post to this group, send email to mongodb-user@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> mongodb-user+unsubscribe@googlegroups.com
>>> See also the IRC channel -- freenode.net#mongodb
1. mongodb user cannot login since its shell is /sbin/nologin cat /etc/passwd mongodb:x:995:992:MongoDB Database Server:/var/lib/mongodb:/sbin/nologin
Also when I try "su" to "mongodb" from "root" I got [root@Evkalipt ~]# id uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 [root@Evkalipt ~]# su - mongodb This account is currently not available. [root@Evkalipt ~]#
Installed 2.2.0 back and providing snapshots to show that I start it as root
1. List of installed mongodb RPMs [root@Evkalipt ~]# rpm -qa|grep mongo mongo-10gen-server-2.2.0-mongodb_1.x86_64 mongo-10gen-2.2.0-mongodb_1.x86_64
2. Current user - root [root@Evkalipt ~]# id uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
3. Start server root@Evkalipt ~]# service mongod start Starting mongod (via systemctl): Job failed. See system journal and 'systemctl status' for details. [FAILED] 4. Error stack [root@Evkalipt ~]# systemctl status mongod.service mongod.service - SYSV: Mongo is a scalable, document-oriented database. Loaded: loaded (/etc/rc.d/init.d/mongod) Active: failed (Result: exit-code) since Sat, 06 Oct 2012 10:23:10 -0700; 6min ago Process: 2094 ExecStart=/etc/rc.d/init.d/mongod start (code=exited, status=1/FAILURE) CGroup: name=systemd:/system/mongod.service
Oct 06 10:23:10 Evkalipt runuser[2098]: pam_unix(runuser:session): session opened for user mongod by (uid=0) Oct 06 10:23:10 Evkalipt mongod[2094]: Starting mongod: can't open [/var/log/mongo/mongod.log] for log file: errno:13 Permission denied Oct 06 10:23:10 Evkalipt runuser[2098]: pam_unix(runuser:session): session closed for user mongod Oct 06 10:23:10 Evkalipt mongod[2094]: [FAILED]
5. List/owners/permissions of the directories
[root@Evkalipt ~]# ls -al /var/**/mong** /var/lib/mongo: total 8 drwxr-xr-x. 2 mongod mongod 4096 Aug 28 22:42 . drwxr-xr-x. 40 root root 4096 Oct 6 10:20 ..
/var/log/mongo: total 8 drwxr-xr-x. 2 mongod mongod 4096 Oct 6 10:20 . drwxr-xr-x. 12 root root 4096 Oct 6 10:20 .. rw-r----. 1 mongod mongod 0 Aug 28 22:42 mongod.log
> Installed 2.2.0 back and providing snapshots to show that I start it as
> root
> 1. List of installed mongodb RPMs
> [root@Evkalipt ~]# rpm -qa|grep mongo
> mongo-10gen-server-2.2.0-mongodb_1.x86_64
> mongo-10gen-2.2.0-mongodb_1.x86_64
> 2. Current user - root
> [root@Evkalipt ~]# id
> uid=0(root) gid=0(root) groups=0(root)
> context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> 3. Start server
> root@Evkalipt ~]# service mongod start
> Starting mongod (via systemctl): Job failed. See system journal and
> 'systemctl status' for details.
> [FAILED]
> 4. Error stack
> [root@Evkalipt ~]# systemctl status mongod.service
> mongod.service - SYSV: Mongo is a scalable, document-oriented database.
> Loaded: loaded (/etc/rc.d/init.d/mongod)
> Active: failed (Result: exit-code) since Sat, 06 Oct 2012 10:23:10 -0700;
> 6min ago
> Process: 2094 ExecStart=/etc/rc.d/init.d/mongod start (code=exited,
> status=1/FAILURE)
> CGroup: name=systemd:/system/mongod.service
> Oct 06 10:23:10 Evkalipt runuser[2098]: pam_unix(runuser:session):
> session opened for user mongod by (uid=0)
> Oct 06 10:23:10 Evkalipt mongod[2094]: Starting mongod: can't open
> [/var/log/mongo/mongod.log] for log file: errno:13 Permission denied
> Oct 06 10:23:10 Evkalipt runuser[2098]: pam_unix(runuser:session):
> session closed for user mongod
> Oct 06 10:23:10 Evkalipt mongod[2094]: [FAILED]
> 5. List/owners/permissions of the directories
> [root@Evkalipt ~]# ls -al /var/**/mong**
> /var/lib/mongo:
> total 8
> drwxr-xr-x. 2 mongod mongod 4096 Aug 28 22:42 .
> drwxr-xr-x. 40 root root 4096 Oct 6 10:20 ..
> /var/log/mongo:
> total 8
> drwxr-xr-x. 2 mongod mongod 4096 Oct 6 10:20 .
> drwxr-xr-x. 12 root root 4096 Oct 6 10:20 ..
> rw-r----. 1 mongod mongod 0 Aug 28 22:42 mongod.log
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
I did not change anything manually, did not change file permissions, nothing. I installed 2.2.0 from the mongodb/download and started it as recommended. It does not work "out of box" From my perspective I do not see any problem. The log file belongs to "mongod" user and has "rw" - read/write permissions, the log directory also belongs to the user. So the user can write and read the file,and even if the process runs as "root" user, root has access for any file in the system.
I submitted this issue to MongoDB team yesterday , they have not replied so far with anything useful: SERVER-7285 <https://jira.mongodb.org/browse/SERVER-7285> -Cannot start mongodb
On Sat, Oct 6, 2012 at 10:31 PM, Edouard Perov <edouardpe...@gmail.com> wrote:
> 1. mongodb user cannot login
> since its shell is /sbin/nologin
> cat /etc/passwd
> mongodb:x:995:992:MongoDB Database Server:/var/lib/mongodb:/sbin/nologin
> Also when I try "su" to "mongodb" from "root" I got
> [root@Evkalipt ~]# id
> uid=0(root) gid=0(root) groups=0(root)
> context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
> [root@Evkalipt ~]# su - mongodb
> This account is currently not available.
> [root@Evkalipt ~]#
> [root@Evkalipt log]# ls -ld mongo*
> drwxr-xr-x. 2 mongodb root 4096 Oct 5 21:33 mongodb
> [root@Evkalipt log]# ls -la mongodb
> drwxr-xr-x. 2 mongodb root 4096 Oct 5 21:33 .
> drwxr-xr-x. 12 root root 4096 Oct 6 09:46 ..
> -rw-r--r--. 1 mongodb mongodb 2197 Oct 5 23:59 mongodb.log
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Perhaps you should install it one more time... i'm using fedora 17 64b and
have 2.2.0 installed... it works fine if I'm starting it mongod -f
/path/to/conf
On Sat, Oct 6, 2012 at 10:10 PM, Edouard Perov <edouardpe...@gmail.com>wrote:
> I am starting as root.
> All permissions are provided in this thread.
> What is wrong with them?
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Yes, I have issues with service mongod too.. but those were different than
you described, although I haven't read all posts. It basically due
to systemctl (system will redirect to systemctl) and init files that are
installed (it will halt the script)... eventually I gave up and just using
an alias for mongod -f conf.file...
I don't remember if it was working with 2.0.x..
On Sun, Oct 7, 2012 at 1:37 AM, Edouard Perov <edouardpe...@gmail.com>wrote:
> mongod -f /path/to/conf seems working.
> Have you tried
> service mongod start?
> It does not work in 2.2.0 for me but was ok in 2.0.7
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Thank you very much. I am new to MongoDB, we use Oracle for decades and now thinking if we can replace some applications that do not require "heavy weight" databases. The choice is between Oracle NoSQL MongoDB, some others might be. This example shows that MongoDB does not work "out of box", to make it working requires "dances with drums" around it, MongoDB team has not provided any help after several days, which is critical for our customers' 24x7 systems.
Might be it is acceptable for home playing, student projects, non-critical applications, ... but for us the good, fast, and reliable support from all third party software vendors is mandatory otherwise we loose customers and might be even sued for damage. Probably, some kind of commercial license with MongoDB is available, I am not quite familiar with that, but in this case would it be cheaper for us and customers than Oracle? Most people prefer to use well known brands despite of the price: Mercedes, BMW, Buick, ... vs Dacia, Great Wall, Lada ... i.e. quality and reliability vs price.
> Thank you very much.
> I am new to MongoDB, we use Oracle for decades and
> now thinking if we can replace some applications that do not require
> "heavy weight" databases.
> The choice is between Oracle NoSQL MongoDB, some others might be.
> This example shows that MongoDB does not work "out of box",
> to make it working requires "dances with drums" around it,
> MongoDB team has not provided any help after several days, which is
> critical for our customers' 24x7 systems.
> Might be it is acceptable for home playing, student projects, non-critical
> applications, ...
> but for us the good, fast, and reliable support from all third party
> software vendors is mandatory otherwise we loose customers and might be
> even sued for damage.
> Probably, some kind of commercial license with MongoDB is available, I am
> not quite familiar with that, but in this case would it be cheaper for us
> and customers than Oracle?
> Most people prefer to use well known brands despite of the price:
> Mercedes, BMW, Buick, ... vs Dacia, Great Wall, Lada ...
> i.e. quality and reliability vs price.
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
> Thank you very much.
> I am new to MongoDB, we use Oracle for decades and
> now thinking if we can replace some applications that do not require
> "heavy weight" databases.
> The choice is between Oracle NoSQL MongoDB, some others might be.
> This example shows that MongoDB does not work "out of box",
> to make it working requires "dances with drums" around it,
> MongoDB team has not provided any help after several days, which is
> critical for our customers' 24x7 systems.
> Might be it is acceptable for home playing, student projects, non-critical
> applications, ...
> but for us the good, fast, and reliable support from all third party
> software vendors is mandatory otherwise we loose customers and might be
> even sued for damage.
> Probably, some kind of commercial license with MongoDB is available, I am
> not quite familiar with that, but in this case would it be cheaper for us
> and customers than Oracle?
> Most people prefer to use well known brands despite of the price:
> Mercedes, BMW, Buick, ... vs Dacia, Great Wall, Lada ...
> i.e. quality and reliability vs price.
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb
Yes, of course, we have a commercial Oracle license and we are Oracle partners. I can contact to Oracle Support 24x7, talk to their management anytime if the problem is important. If it is critical Oracle may provide a dedicated support person or even team until resolution, I had such experience a couple of times.
Fedora I am using at home only and wanted just to play with MongoDb to see how it looks like and whether it may fit with our needs. For business we use Red Hat Enterprise different versions (including several clusters for Oracle RAC), and AIX, Solaris, HP-UX, HP-UX Itanium (all versions available and released during last decade). Tens Oracle databases from 8.1.7 to 11.2.0.3.
I'd like to point out that 10gen (the MongoDB company) also offers commercial support for MongoDB: http://www.10gen.com/subscription
We offer training, consulting, on-boarding and health checks, as well as different levels of subscribed commercial support (including 24x7) and MMS, our free cloud-based monitoring service. You will find information on the different support levels and pricing on the website above as well.
This Google group is part of 10gen's free community support, and 10gen endeavours to provide answers for all MongoDB questions in a reasonable time frame. However, your problem looks like it is more related to incorrectly set user permissions, since other users report that 2.2 is working on Fedora for them. Maybe double-check these settings and compare them to your 2.0.7 permissions. You could also try to start mongod not as a service but from the command line, with "mongod" and the config parameters for log files etc and see if that makes a difference.
If you have any more questions please let us know.
On Tuesday, October 9, 2012 8:34:52 AM UTC+11, Edouard Perov wrote:
> Yes, of course, we have a commercial Oracle license and we are Oracle > partners. > I can contact to Oracle Support 24x7, talk to their management anytime if > the problem is important. > If it is critical Oracle may provide a dedicated support person or even > team until resolution, I had such experience a couple of times.
> Fedora I am using at home only and wanted just to play with MongoDb to see > how it looks like and whether it may fit with our needs. > For business we use Red Hat Enterprise different versions (including > several clusters for Oracle RAC), and AIX, Solaris, HP-UX, HP-UX Itanium > (all versions available and released during last decade). > Tens Oracle databases from 8.1.7 to 11.2.0.3.
At work I run MongoDB 2.2.0 successfully on my Linux Desktop running Fedora 17 and on a couple of our QA and production servers running RHEL 6. I use the same config for both Fedora and RHEL.
I have a fairly standard mongodb.conf file in /etc/mongodb/ (on some servers I need to run multiple instances, so I prefer to group all of their conf files into a single directory). I always install MongoDB from a tarball rather than an rpm. Personal preference.
I created a mongodb user and group under which I run mongod. I then have a custom init script for starting, stopping repairing, checking status, etc. I store logs in /var/log/mongodb/ (again, a directory for the log file for each instance).
I created the init file a year or two ago, based off someone else's script in a gist. It's probably not that different than the one that comes with the rpm, but this one is mine and it works well for me.
I run the init script directly to start, stop, etc. Typing service instead of /etc/init.d/ isn't a huge win for me. Have you tried that instead of service mongod start?
Some of your posts show lines like with the user and file name as mongodb:
-rw-r--r--. 1 mongodb mongodb 986 Oct 5 23:43 mongodb.log
and others with mongod:
rw-r----. 1 mongod mongod 0 Aug 28 22:42 mongod.log
Maybe check the init script to see which user account it is trying to use? I run my init script via sudo, but in the script I run mongod as the mongodb user. Also, in the start section of my init script, I first ensure the /var/log/mongodb/mongod.log file is there and properly owned via touch and chown.
On Monday, October 8, 2012 10:08:42 PM UTC-7, Thomas Rueckstiess wrote:
> Hi Edouard,
> I'd like to point out that 10gen (the MongoDB company) also offers > commercial support for MongoDB: http://www.10gen.com/subscription
> We offer training, consulting, on-boarding and health checks, as well as > different levels of subscribed commercial support (including 24x7) and MMS, > our free cloud-based monitoring service. > You will find information on the different support levels and pricing on > the website above as well.
> This Google group is part of 10gen's free community support, and 10gen > endeavours to provide answers for all MongoDB questions in a reasonable > time frame. However, your problem looks like it is more related to > incorrectly set user permissions, since other users report that 2.2 is > working on Fedora for them. Maybe double-check these settings and compare > them to your 2.0.7 permissions. You could also try to start mongod not as a > service but from the command line, with "mongod" and the config parameters > for log files etc and see if that makes a difference.
> If you have any more questions please let us know.
> Best Regards, > Thomas
> -- > Thomas Rueckstiess > 10gen Technical Support
> On Tuesday, October 9, 2012 8:34:52 AM UTC+11, Edouard Perov wrote:
>> Yes, of course, we have a commercial Oracle license and we are Oracle >> partners. >> I can contact to Oracle Support 24x7, talk to their management anytime if >> the problem is important. >> If it is critical Oracle may provide a dedicated support person or even >> team until resolution, I had such experience a couple of times.
>> Fedora I am using at home only and wanted just to play with MongoDb to >> see how it looks like and whether it may fit with our needs. >> For business we use Red Hat Enterprise different versions (including >> several clusters for Oracle RAC), and AIX, Solaris, HP-UX, HP-UX Itanium >> (all versions available and released during last decade). >> Tens Oracle databases from 8.1.7 to 11.2.0.3.
Hi Stuart, The user is different because of different versions, which means RPMs were packaged differently.
2.0.7 -rw-r--r--. 1 mongodb mongodb 2197 Oct 5 23:59 mongodb.log
2.2.0 rw-r----. 1 mongod mongod 0 Aug 28 22:42 mongod.log
What is the "normal/standard" username?
Just to recap: v 2.2.0 downloaded from momgodb.org/downloads - does not start as a service, starting "mongod -f <comf_file>" is ok v 2.0.7 from Fedora/updates - strating via service is ok