Mongorestore Key Mismatch Issue

Hi, I’m getting below error when trying to restore Mongo3.6 data collection via AWS snapshot to newly created Mongo4.4 instance.
Command → mongorestore --ssl --host={{ mongod_replset_name }}/{{ mongod_host }}
–port={{ mongod_port }}
–sslPEMKeyFile=/etc/ssl/{{ mongod_ssl_key_name }} --sslCAFile=/etc/ssl/{{ mongod_root_ca }}
–authenticationDatabase {{ authDb }}
-u {{ mongo_root_username }}
-p {{ mongo_root_password }}
{{ mongodump_path }}
Error → error connecting to host: error configuring the connector: error configuring client, can’t load client certificate: tls: private key does not match public key

Hi @Abhineet_Sood, thanks for the message!

Which activity in M150 are you doing? I don’t think we use mongorestore in the course.


Hi @Abhineet_Sood , I am facing the same issue while migrating data in one of our servers. Did you find any solution ?

An error like this has to do with connectivity and not specifically with restoring data. I would try to connect to the server with mongosh shell, or Compass and see if that works, if not I’d recommend providing all the details and full error message plus all the details about security configuration (it looks like the OP’s issue was TLS and certificate related).

1 Like