SSL Cert for Go app


#1

Hi there,

I’m having trouble with SSL connection from my Go app to the provided Mongo.

x509: cannot validate certificate for 54.39.130.53 because it doesn't contain any IP SAN

What should I do?


#2

Can you attempt the operation again. I have updated the chain certificate.


#3

Sorry for late replying, and thanks for your supports, but I have no luck getting it work. The raw error log of the app is as following

server selection error: server selection timeout\ncurrent topology: Type: ReplicaSetNoPrimary\nServers:\nAddr: 54.39.130.53:27017, Type: Unknown, State: Connected, Avergage RTT: 0, Last error: x509: cannot validate certificate for 54.39.130.53 because it doesn't contain any IP SANs\n

anything I can help for better identifying the problem?


#4

This seems like a GO specific issue. You can connect to the database without the ?ssl=true parameter set on the connection string since you are connecting in the same data center. However if SSL is a requirement, I did a google search and noticed a post on this on a Github issue thread and a couple others. You might want to check if any of these post provide further information.


#5

I am researching around, but I’ve had tried to run the code on my local machine, and it works fine with the provided mongodb connection string.