The top line in your latest log file makes it sound like the command that was run was rs.initiate()
with no document passed in. I’m also not seeing any attempt to communicate with the other two members in the replicaset so the machine that you’re on doesn’t know about them. Have you tried to manually add the other two instances from the mongo
shell of the machine that you ran the rs.initiate(...)
command on? If not try running rs.add('ip-10-0-1-100:27017')
to see if it gets added. If it does then add the third member to make sure it gets added. Once you can manually get all three members added then you can try automating it. For the automation process recreate the machines or delete the contents from the data directory so you have instances that are not part of a replicaset and try running the shell script with the rs.initiate(...)
command with the members list in it. If that don’t work then you’ll have to troubleshoot what’s failed. MongoDB should give errors for any failures that it encounters.
At this point in time without being physically being on the machine and running commands I can’t say what’s going on. What you say you’re running and what the logs are showing are not aligning.
Since you state that you’re new to MongoDB, I would recommend taking the Basic Cluster Administration course from MongoDB University to help give you a better understanding of how things work. This course is currently running so you should still be able to get in on this run and work through everything.
Unfortunately I’m not sure what else I can do to try provide help at this time.