Hi,
We are getting below mentioned connection error after configure SSL in Openshift cluster MongoDB, Could you please help to resolve this issue.
$ mongo --tls --tlsCAFile /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt --tlsAllowInvalidHostnames --host=localhost:27017 --username admin --password --authenticationDatabase admin
MongoDB shell version v5.0.20
Enter password:
connecting to: mongodb://localhost:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
{“t”:{“$date”:“2023-08-30T12:59:06.250Z”},“s”:“I”, “c”:“NETWORK”, “id”:5490002, “ctx”:“thread4”,“msg”:“Started a new thread for the timer service”}
Error: couldn’t connect to server localhost:27017, connection attempt failed: SocketException: stream truncated :
connect@src/mongo/shell/mongo.js:372:17
@(connect):2:6
exception: connect failed
exiting with code 1