I am trying to do a manual cloud bootstrap to an ec2 instance. But after the client has installed juju-db it can’t connect to it. How can I troubleshoot this. I have been trying to read the logs but can’t really pin it down to something concrete. I was thinking it might be a security groups issue but opening up ports has not helped either. Are there any caveats that one might need to consider in a manual controller setup on ec2 instance.
Below is an excerpt of messages from the logs that it keeps repeating
{"t":{"$date":"2022-09-17T10:49:31.977+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"/tmp/mongodb-37017.sock"}}
{"t":{"$date":"2022-09-17T10:49:32.006+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"0.0.0.0"}}
{"t":{"$date":"2022-09-17T10:49:32.006+00:00"},"s":"I", "c":"NETWORK", "id":23015, "ctx":"listener","msg":"Listening on","attr":{"address":"::"}}
{"t":{"$date":"2022-09-17T10:49:32.006+00:00"},"s":"I", "c":"NETWORK", "id":23016, "ctx":"listener","msg":"Waiting for connections","attr":{"port":37017,"ssl":"on"}}
{"t":{"$date":"2022-09-17T10:49:32.476+00:00"},"s":"I", "c":"ACCESS", "id":20248, "ctx":"conn1","msg":"note: no users configured in admin.system.users, allowing localhost access"}
{"t":{"$date":"2022-09-17T10:49:32.483+00:00"},"s":"I", "c":"REPL", "id":21356, "ctx":"conn1","msg":"replSetInitiate admin command received from client"}
{"t":{"$date":"2022-09-17T10:49:32.483+00:00"},"s":"I", "c":"REPL", "id":6015317, "ctx":"conn1","msg":"Setting new configuration state","attr":{"newState":"ConfigInitiating","oldState":"ConfigUninitialized"}}
{"t":{"$date":"2022-09-17T10:50:02.538+00:00"},"s":"I", "c":"NETWORK", "id":4834700, "ctx":"conn1","msg":"isSelf could not connect via connectSocketOnly","attr":{"hostAndPort":"3.1X5.2X4.2X3:37017","error":{"code":6,"codeName":"HostUnreachable","errmsg":"couldn't connect to server 3.1X5.2X4.2X3:37017, connection attempt failed: SocketException: Error connecting to 3.1X5.2X4.2X3:37017 :: caused by :: Connection timed out"}}}
{"t":{"$date":"2022-09-17T10:50:02.539+00:00"},"s":"E", "c":"REPL", "id":21425, "ctx":"conn1","msg":"replSetInitiate error while validating config","attr":{"error":{"code":74,"codeName":"NodeNotFound","errmsg":"No host described in new configuration with {version: 1, term: 0} for replica set juju maps to this node"},"config":{"_id":"juju","version":1,"protocolVersion":1,"members":[{"_id":1,"host":"3.1X5.2X4.2X3:37017","tags":{"juju-machine-id":"0"}}]}}}
{"t":{"$date":"2022-09-17T10:50:02.539+00:00"},"s":"I", "c":"REPL", "id":6015317, "ctx":"conn1","msg":"Setting new configuration state","attr":{"newState":"ConfigUninitialized","oldState":"ConfigInitiating"}}
{"t":{"$date":"2022-09-17T10:50:02.539+00:00"},"s":"I", "c":"COMMAND", "id":51803, "ctx":"conn1","msg":"Slow query","attr":{"type":"command","ns":"admin.$cmd","command":{"replSetInitiate":{"_id":"juju","version":1,"protocolVersion":1,"members":[{"_id":1,"host":"3.1X5.2X4.2X3:37017","tags":{"juju-machine-id":"0"}}]},"$readPreference":{"mode":"secondaryPreferred"},"$db":"admin"},"numYields":0,"ok":0,"errMsg":"No host described in new configuration with {version: 1, term: 0} for replica set juju maps to this node","errName":"InvalidReplicaSetConfig","errCode":93,"reslen":218,"locks":{"ReplicationStateTransition":{"acquireCount":{"w":2}},"Global":{"acquireCount":{"r":2}},"Database":{"acquireCount":{"r":2}},"Collection":{"acquireCount":{"r":2}},"Mutex":{"acquireCount":{"r":2}}},"protocol":"op_query","durationMillis":30055}}