Failed: can’t create session: could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: localhost:38917, Type: Unknow
n, State: Connected, Average RTT: 0, Last error: connection() : x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0 }, ] }
Can someone help me? Sorry for my bad Language!
P.S. Downgrade mongodb-database-tools to v100.2.1 and mongodb-org-tools to 4.4.2 mongodump command working as espected!
Thx for your fast reply! The SANs in my certificate is follow:
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = IT
ST = CA
L = Milano
O = Ferrari
OU = Web Development
CN = localhost
[v3_req]
keyUsage = critical, digitalSignature, keyAgreement
extendedKeyUsage = serverAuth
subjectAltName = @alt_names
[alt_names]
DNS.1 = www.localhost.com
DNS.2 = localhost.com
DNS.3 = localhost
Btw, i have put env variables in my node_env path like: {env: {GODEBUG: 'x509ignoreCN=0'}} and problem is solved!