MongoServerSelectionError: Hostname/IP does not match certificate's altnames: IP: 127.0.0.1 is not in the cert's list:


I have created x509 certificates for mongodb . But with those certifications, I am unable to connect to mogodb using mongosh .It is giving error.

MongoServerSelectionError: Hostname/IP does not match certificate’s altnames: IP: 127.0.0.1 is not in the cert’s list:

But when I run the same host with same files through ‘mongo’ ,it gets connected.

Please, give me a solution for this issue.

Is the certificate you created a SAN certificate?

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.