<p>Mongoose can't connect to mogodb Atlas. It every times give me this error:</p>

<pre><code> Error: querySrv ENOTIMP _mongodb._tcp.cluster1-owfxv.mongodb.net
</code></pre>

<p>I am running inside kubernetes cluster inside minikube locally.
If I run project directly then it works perfectly but with minikube it alwasy give me error.</p>

<p>Following is my code:</p>

<pre><code>  const url = "mongodb+srv://name:password@cluster1-owfxv.mongodb.net/test?retryWrites=true";

    const mongoDbOptions = {
        useNewUrlParser: true,
        reconnectTries: 10,
        autoReconnect: true

    };
    mongoose.connect(url, mongoDbOptions).then((r) =&gt; { }).catch((e) =&gt; {
        console.log(e);
    });
</code></pre>

<p>Error message is not so clear to me. Its strange that it works directly but with kubernetes cluster it does not work.</p>

<p>I will really appreciate for any contribution.</p>

Ayyaz Zafar
<p>Try using connection string compatible with mongo driver 2.2.12 or later i.e. one with mongodb://username:password@host1:port,host2:port,host3:port/databaseName</p>

<p>It's not clear why connection to mongodb is not working with new url.</p>
