Problem connecting to mongot after scale event

We are receiving a lot of connection errors after a scale event.

Unexpected error occurred: Command failed with error 6 (HostUnreachable): 'Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused' on server xxxxxxxx.mongodb.net:27017. The full response is {"ok": 0.0, "errmsg": "Error connecting to localhost:28000 (127.0.0.1:28000) :: caused by :: Connection refused", "code": 6, "codeName": "HostUnreachable", "$clusterTime": {"clusterTime": {"$timestamp": {"t": 1712829848, "i": 9}}, "signature": {"hash": {"$binary": {"base64": "CEFhxGmC+4Ztl/kYSgTLgwTh8LY=", "subType": "00"}}, "keyId": 7316846516700708866}}, "operationTime": {"$timestamp": {"t": 1712829848, "i": 9}}}

For what I can see in the error message above, the replica was made available before the mongot got started. If this is the case, can we do something to prevent this from happen?

2 Likes

I’m having the same issue, did you found some solution?

Not really.

After getting in touch with the support, and wait for about two weeks for a reply, I was told that this is a normal behavior, given the way the mongo and mongot processes are initialized and are dependent on each other.

So, to cut a long store short, to solve this issue, the only way they gave me, was to run dedicated search replicas.