I have something new. i passed the mapped ip to the shell and when i run my instance, still is not automated the replicaset, but funny thing is if i open the mongo console and type rs.initiate(), it does initiate the current instance as primary but ignores the slaves.
my rs.stauts look like:
rs0:PRIMARY> rs.status()
{
"set" : "rs0",
"date" : ISODate("2020-05-12T04:16:58.695Z"),
"myState" : 1,
"term" : NumberLong(1),
"heartbeatIntervalMillis" : NumberLong(2000),
"members" : [
{
"_id" : 0,
"name" : "ip-10-0-1-100:27017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"uptime" : 68,
"optime" : {
"ts" : Timestamp(1589257005, 1),
"t" : NumberLong(1)
},
"optimeDate" : ISODate("2020-05-12T04:16:45Z"),
"infoMessage" : "could not find member to sync from",
"electionTime" : Timestamp(1589257004, 2),
"electionDate" : ISODate("2020-05-12T04:16:44Z"),
"configVersion" : 1,
"self" : true
}
],
"ok" : 1
}
while in my mongolog i got:
2020-05-12T04:16:44.282+0000 I COMMAND [conn17] initiate : no configuration specified. Using a default configuration for the set
2020-05-12T04:16:44.282+0000 I COMMAND [conn17] created this configuration for initiation : { _id: "rs0", version: 1, members: [ { _id: 0, host: "ip-10-0-1-100:27017" } ] }
2020-05-12T04:16:44.282+0000 I REPL [conn17] replSetInitiate admin command received from client
2020-05-12T04:16:44.282+0000 I REPL [conn17] replSetInitiate config object with 1 members parses ok
2020-05-12T04:16:44.282+0000 I REPL [conn17] ******
2020-05-12T04:16:44.282+0000 I REPL [conn17] creating replication oplog of size: 990MB...
2020-05-12T04:16:44.288+0000 I STORAGE [conn17] Starting WiredTigerRecordStoreThread local.oplog.rs
2020-05-12T04:16:44.288+0000 I STORAGE [conn17] The size storer reports that the oplog contains 0 records totaling to 0 bytes
2020-05-12T04:16:44.288+0000 I STORAGE [conn17] Scanning the oplog to determine where to place markers for truncation
2020-05-12T04:16:44.320+0000 I REPL [conn17] ******
2020-05-12T04:16:44.344+0000 I REPL [ReplicationExecutor] New replica set config in use: { _id: "rs0", version: 1, protocolVersion: 1, members: [ { _id: 0, host: "ip-10-0-1-100:27017", arbiterOnly: false, buildIndexes: true, hidden: false, priority: 1.0, tags: {}, slaveDelay: 0, votes: 1 } ], settings: { chainingAllowed: true, heartbeatIntervalMillis: 2000, heartbeatTimeoutSecs: 10, electionTimeoutMillis: 10000, getLastErrorModes: {}, getLastErrorDefaults: { w: 1, wtimeout: 0 }, replicaSetId: ObjectId('5eba232c528c300e954ae166') } }
2020-05-12T04:16:44.344+0000 I REPL [ReplicationExecutor] This node is ip-10-0-1-100:27017 in the config
2020-05-12T04:16:44.344+0000 I REPL [ReplicationExecutor] transition to STARTUP2
2020-05-12T04:16:44.344+0000 I REPL [conn17] Starting replication applier threads
2020-05-12T04:16:44.345+0000 I REPL [ReplicationExecutor] transition to RECOVERING
2020-05-12T04:16:44.346+0000 I REPL [ReplicationExecutor] transition to SECONDARY
2020-05-12T04:16:44.346+0000 I REPL [ReplicationExecutor] conducting a dry run election to see if we could be elected
2020-05-12T04:16:44.346+0000 I REPL [ReplicationExecutor] dry election run succeeded, running for election
2020-05-12T04:16:44.384+0000 I REPL [ReplicationExecutor] election succeeded, assuming primary role in term 1
2020-05-12T04:16:44.384+0000 I REPL [ReplicationExecutor] transition to PRIMARY
2020-05-12T04:16:45.346+0000 I REPL [rsSync] transition to primary complete; database writes are now permitted
Any idea about why it ignores the other configuration? from the primary i can ping the other mongodb. Thank you again for you time and patience.