I got a problem with the Deployment of my Replica Set.
My mongod_1 file looks as follows:
I essentially followed the procedure described in the preceding lecture “setting up a replica set”. I created the keyfile, changed ownership, created all the directories. After I ran “mongod -f mongod_1.conf” then “mongo --port 27001” and successfully connected to the database, I always run into an error when I try running “rs.initiate()”.
I always get the following error message:
“ok” : 0,
“errmsg” : “This node was not started with the replSet option”,
“code” : 76,
“codeName” : “NoReplicationEnabled”
I can’t explain this, because I thought that I added the replSet option by adding the replSetName to the config file. (I ran mongod after I changed the config file). When I uncomment the fork:true I get following error “about to fork child process, waiting until server is ready for connections.
forked process: 446
ERROR: child process failed, exited with error number 48
To see additional information in this output, start without the “–fork” option.” but this shouldn’t affect the replica set or am I wrong? If so, how would I go about solving this issue.