Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

In attempting to run the command

mongod --fork --logpath /var/log/mongodb.log

On a amazon ec2 32 bit instance (Amazon Linux AMI release 2014.09), I run into the following error:

2015-02-18T18:14:09.007+0000 

2015-02-18T18:14:09.007+0000 warning: 32-bit servers don't have journaling    

enabled by default. Please use --journal if you want durability.

2015-02-18T18:14:09.007+0000 

about to fork child process, waiting until server is ready for connections.

forked process: 17116

ERROR: child process failed, exited with error number 1

I also notice no log file is created in the process.

1 Answer

0 votes
by (18.2k points)

I ran into the same problem and found out that that was actually permissions issue. If the log path is not accessible to the owner of the child process then the log path doesn't exist.

So, here's what I did:

mkdir ~/log

mongod --fork --logpath ~/log/mongodb.log

You can put it in your /var/log directory by changing the permissions to 740 on /var/log

If you want to learn more about it, you can also read the AWS EC2.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer

Browse Categories

...