title: Mongoose is not connecting MongoDB Atlas
body: <p>This is the first time I use MongoDB Atlas to work with Mongo, and while trying to connect, that's the error I get:</p>
  
  <pre><code>Error: connect ECONNREFUSED 3.209.60.172:27017
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1054:14) {
    name: 'MongoNetworkError',
    errorLabels: [ 'TransientTransactionError' ],
    [Symbol(mongoErrorContextSymbol)]: {}
  }
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre><code>const express = require('express');
  const mongoose = require('mongoose');
  
  const app = express();
  
  mongoose.connect('mongodb+srv://johnnybox:&lt;password&gt;@cluster0-cgxqx.mongodb.net/test?retryWrites=true&amp;w=majority', { 
    useNewUrlParser: true
  }).then(() =&gt; console.log('MongoDB Connected...'))
    .catch(err =&gt; console.log(err));
  
  app.use(express.json());
  app.use(express.urlencoded({ extended: true }));
  
  app.use(require('./routes'));
  
  app.listen(3331);
  </code></pre>
  
  <p>ps* I'm not missing my credentials</p>
  
  <p>Already looked for a solution here but there's nothing similar to my problem.</p>
  
  <p>My whitelist:</p>
  
  <p><a href="https://i.stack.imgur.com/E8vGF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E8vGF.png" alt="enter image description here"></a></p>