HW 2.5 Enable the encrypted storage engine

Hi,
I shut down one of the secondaries and deleted all the files within the corresponding folder.
When I restarted the server passing the enableEncryption and encryptionKeyFile options along with other options for spinning up a member of the replica set, i got an error below

ERROR: child process failed, exited with error number 14

Don’t know why. If i removed the encryption related options, I could spin up the server.

So something is wrong with my encryption syntax but I thought I use the same syntax provided in the lecture.

Also I am reusing the mongodb-keyfile file created from previous exercises and just moved that file to the relevant folder and granted permission again. Not sure if that’s the problem.

Please advise.
Thanks

Hi Wini_mongo,

It’ likely your key file. The requirements for a master key for encryption are different then for a keyfile for internal authentication.

To encrypt using a keyfile, you must have a base64 encoded keyfile that contains a 16 or 32 character string. The keyfile must only be accessible by the owner of the mongod process.

You can review the lesson video for the command Kirby uses to create the master keyfile.

Hope that helps,

David

Got it! thank you, it worked! :slight_smile:

1 Like

failed answer, can’t post the answer here but what should I do?

sorry, I got what is the wrong in my answer, it’s correct now :slight_smile: