-2

I have issue with mongod service after adding keyFile in config. I follow instruction from here : https://docs.mongodb.com/manual/tutorial/deploy-replica-set-with-keyfile-access-control/

after adding keyFile in config, and restart the service, it give me this error :

ERROR: child process failed, exited with error number 1

I already set chmod 400 to the keyfile and set permission to mongod. Also have check and follow instruction from this https://dba.stackexchange.com/a/174014, but still no luck

anyone maybe know what is the problem that causing that error? Thanks in advance

XatroX
  • 1
  • 1

1 Answers1

1

As here Mr. onetwopunch said that I had the same thing and it turned out to be a permissions issue .If the owner of the child process cannot access the log path or the log path does not exist, it will fail.

What I did was put the log directory in my home directory:

mkdir ~/log
mongod --fork --logpath ~/log/mongodb.log
Md Haidar Ali Khan
  • 6,523
  • 9
  • 40
  • 62