AMP-SCZ / dpdash

Deep phenotyping dashboard
Other
2 stars 1 forks source link

mongodb export failure due to SSL error #46

Open tashrifbillah opened 2 years ago

tashrifbillah commented 2 years ago

(base) [root@rc-predict-dev singularity]# mongoexport --ssl --sslCAFile=/opt/dpdash/dpdash-state/ssl/ca/cacert.pem --sslPEMKeyFile=/opt/dpdash/dpdash-state/ssl/mongo_client.pem --uri="mongodb://dpdash:password@rc-predict-dev.partners.org:27019/dpdmongo?authSource=admin" --collection=configs --query='{"name":"AMPSCZ"}' --out /tmp/my_config.json

2021-12-20T17:34:46.995-0500 could not connect to server: server selection error: server selection timeout, current topology: { Type: Single, Servers: [{ Addr: rc-predict-dev.partners.org:27019, Type: Unknown, Last error: connection() error occured during connection handshake: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0 }, ] }

Following the suggestion, if we set export GODEBUG=x509ignoreCN=0, then the above mongoexport works. Can this be fixed?

tashrifbillah commented 2 years ago

TODO: document this in wiki

tashrifbillah commented 2 years ago

After this export, my_config.json needs to be formatted as https://github.com/AMP-SCZ/dpdash/wiki/Configuration-schema before being able to upload through DPdash web interface.