App unable to connect to qovery container mongodb


Relevant information to this issue:

  • OS: Mac
  • databases: MongoDB
  • Programming language and version: Mongo 6.0
  • Link to your application : Qovery


I can’t connect to the database

I try to connect with mongosh but it failed with error The --host argument contains an invalid character: ?

I go on my Qovery service and copy connection string:


Then I enter the following command:
mongosh --host "" --username "root" --password "xxxx"

What am I missing?
The string connection has missing mongodb:// at least

Hey @Geoffrey_S !

Not a Mongo expert here but given the error message, I think you are not supposed to pass ?ssl_ca_certs=rds-combined-ca-bundle.pem to the host. Can you try to use the CLI flag instead? --tlsCertificateKeyFile

Also from documentation I am not sure you need to specify mongodb://

Let me know !

Thank you for your answer.
I used tlsCertificateKeyFile like this

mongosh --host "" --username "root" --password "xxxxxx" --tlsCertificateKeyFile "rds-combined-ca-bundle.pem"

Now I just have the following message:

MongoNetworkError: connect ECONNREFUSED

I suppose the connection string is not a public one. How can access remotely to a mongodb container db ?

Indeed, your container is private so you cannot reach it from the outside.
What you can do is connect to a pod in your cluster, or to an app in your cluster using Qovery shell and connect to the mongo from here.