Error
Error Code: 140

MongoDB Error 140: Invalid SSL Configuration

📦 MongoDB
📋

Description

This error indicates that MongoDB failed to establish a secure connection due to issues with the SSL/TLS configuration. It commonly occurs when a client attempts to connect to a MongoDB instance or during replica set communication, and the provided SSL certificates or settings are incorrect or inaccessible.
💬

Error Message

Invalid S S L Configuration
🔍

Known Causes

4 known causes
⚠️
Missing or Corrupted Certificate Files
The specified SSL certificate, key, or CA files are missing, corrupted, or have incorrect file permissions, preventing MongoDB from accessing them.
⚠️
Mismatched Hostname
The hostname in the client's connection string does not match the hostname(s) specified in the SSL certificate's Subject Alternative Name (SAN) or Common Name (CN).
⚠️
Untrusted CA Certificate
The provided CA file is incorrect, corrupted, or does not contain the necessary root certificate to verify the server's certificate chain.
⚠️
Misconfigured SSL Options
MongoDB's `security.ssl` configuration options (e.g., `mode`, `allowInvalidCertificates`) are incorrectly set, leading to a failed SSL handshake.
🛠️

Solutions

Coming Soon

Detailed step-by-step solutions for this error are being prepared. In the meantime, try these general troubleshooting tips:

General Troubleshooting Tips

  • Check the error message carefully for specific details
  • Review recent changes that might have caused the error
  • Search for the exact error code in the official documentation
  • Check log files for additional context
  • Try restarting the application or service
🔗

Related Errors

5 related errors