Im getting this error about to fork child process, waiting until server is ready for connections. forked process: 3290 ERROR: child process failed, exited with error number 1 To see additional information in this output, start without the “–fork” option

im getting this error
about to fork child process, waiting until server is ready for connections.
forked process: 3290
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the “–fork” option.

and without the fork option mongod is not running at all neither shows any error
please help

Without --fork if it is not giving any error does not mean it is not working
Please check if mongod was up by ps -ef|grep mongod
or try to connect to mongod
mongo --port port_number (give the port number on which you started mongod)

i have checked @Ramachandra_37567 its not working

Is any mongod running at os level
ps -ef|grep mongod

You can connect only if mongod is up and running

Please check your config file
Do you have all necessary dirs/permissions in place
You would have used logpath
Please check what mongod.log says

see @Ramachandra_37567 .

hey @Ramachandra_37567 see this is the log file
it says there is no key-file or directory exist .but there is a key-file and also i have provided a permissiom for read write.
what should i do .its very strange

Did you create the key file.What command you used
Can you show the listing or screen shot

ls -lrt /var/mongodb/pki/

yes @Ramachandra_37567 i have made the keyfile .i have used the command
openssl rand -base64 741 > /var/mongodb/pki/m103-keyfile
provided in the lab


here is permission

Ok i see the file but looks like permissions issues
Please check your steps again

Did you chmod the file to required permissions?

i got this from log that it unable to create a lock file on destination folder

but again i m unable to change the permission
vagrant@m103:~$ chmod 600 ./var/mongodb/db/{1,2,3}
chmod: changing permissions of ‘./var/mongodb/db/1’: Operation not permitted
chmod: changing permissions of ‘./var/mongodb/db/2’: Operation not permitted
chmod: changing permissions of ‘./var/mongodb/db/3’: Operation not permitted

it says operation not permitted

I thought your issue was with only key file permissions but you are trying to change permissions of other folders
Just run this
chmod 600 /var/mongodb/pki/m103-keyfile

Please note ./var/mongod/db is different from /var/mongod/db
dot(.)means current dir

Please check again what your lab asked you to do
dir paths are important in Unix
If you create dbpath and logpaths in different locations than what was specified in lab you will have issues

You have to use sudo to change permissions on files/dirs owned by root

yes i think i messed up my location for db path and logpath .let me check once again with correct permission

thanks @Ramachandra_37567 for helping me .its working now .
error becoz of mismatching the directories