Chapter 3: Internal Authentication Learning Activity: Implementing Internal Authentication

Followed instructions. Configured each of the 3 mongod_X.conf files via the IDE.
replSetName: m150-replSet
keyFile: var/mongodb/pki/node1/keyfile

However, when I try to perform the following “Start 3 mongod processes using each of the configuration files.”
using the command “mongod -f mongod_1.conf” I receive the following error:

user@M150# mongod -f mongod_1.conf
   about to fork child process, waiting until server is ready for connections.
   forked process: 665
  ERROR: child process failed, exited with 1
 To see additional information in this output, start without the "--fork" option.
Also tried to start mongodb using "mongo" and received the following error:
  MongoDB shell version v4.4.3
connecting to: mongodb://
Error: couldn't connect to server, connection attempt failed: SocketException: Error connecting to :: caused by :: Connection refused :
exception: connect failed
exiting with code 1

I’ve tried to “reset the Workspace” and that didn’t help.
What I’m I doing wrong here?

Do you have all the dirs existing for dbpath,logpath etc
Also is keyFile path correct?
I think you are missing / before var/mongodb/…/…

I work with LINUX everyday…You are correct, the / was missing from /var/mongodb…
However, the video lecture and the learning activity show it missing as well.
Got passed this one…onto the next!!
Thank you for the extra pair of eyes!!


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.