Mongodump "failed to parse private key"

In MongoDB 4.2.14, mongodump is not able to decrypt the private key of a PEM file despite the fact that --sslPEMKeyPassword is provided with the correct password.

It displays below error:
2021-05-25T07:25:50.601+0000 Failed: can’t create session: error configuring the connector: error configuring client, can’t load client certificate: tls: failed to parse private key

This seems same issue as reported in Jira issue TOOLS-2755"\"failed%20to%20parse%20private%20key\""

So I updated this Jira issue, providing certificates and mongod.conf permitting to easily reproduce it.

Does anybody faced same issue and found a correct workaround ?


1 Like

Jira issue TOOLS-2755 was closed, so I created TOOLS-2878.

Also I found a workaround:
I have rebuilt the Docker image of MongoDB 4.2.14 with the “MongoDB Database Tools” mongodb-database-tools-ubuntu2004-x86_64-100.3.1.deb downloaded from
I confirm that mongodump 100.3.1 doesn’t have the issue.