TLS Connection Error when connecting via Compass

I have setup mongodb to run on docker desktop and to requireTLS. What I am attempting to do is, only secure the traffic to and from mongo but not require MTLS.

My manifest is setup with the command:

command: [
  "mongod", 
  "--bind_ip_all", 
  "--tlsMode", "requireTLS", 
  "--tlsCertificateKeyFile", "/certs/mongodb.pem", 
  "--setParameter", "tlsUseSystemCA=true"
]

Regardless if I use a self-signed or root level cert, when using either Compass or mongosh, I end up getting the response:

image

When using the root level CA, I wouldn’t expect to be required to provide the CA or cert but unless I provide both, I am unable to connect.

What am I missing here.

Thank you in advance for your help.

hi , if u use docker , u need to add exstra hosts , or connect via ssh tunell

I ended up having to add the CAFile directly and then pass both of them when connecting either by compass or mongosh.

Thank you for your help