0 votes
1 view
in AWS by (9.4k 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.6k 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.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...