I wish you had shown your config long before this.
you are trying to enable the security from start, but that is not allowed until you create an admin user first while authorization is “disabled”. and to do that, you need to first initialize the replica set and its members.
either comment it out back or set the security value to “disabled” until you successfully complete the replica set.
of course, when all your nodes work, you will find a few other obstacles relating to mongodb 4.4, but they are not this annoying. check these links when you come to that point:
- Either all host names in a replica set configuration must be localhost references, or none must be; found 1 out of 2 - Ops and Admin / Replication - MongoDB Developer Community Forums
- How to reset MongoDB replica set settings - Server Fault.)
- How to initiate authentication for replica set - MongoDB - Stack Overflow
PS:when you change to net.bindIp: 10.0.15.21
, you will no longer be able to connect to localhost without host name or address: mongo --host mongo1