title: Can't connect to MongoDB with Nodejs
body: <p>I am using Node js to try to connect to MongoDB. Here are the related code snippets:</p>
  <pre><code>{
    &quot;port&quot;: 3001,
    &quot;appPort&quot;: 8080,
    &quot;host&quot;: &quot;localhost:3001&quot;,
    &quot;protocol&quot;: &quot;http&quot;,
    &quot;allowedOrigins&quot;: [&quot;*&quot;],
    &quot;domain&quot;: &quot;http://localhost:3001&quot;,
    &quot;basePath&quot;: &quot;&quot;,
    &quot;mongo&quot;: &quot;mongodb://100.10.10.10:27017/database&quot;,
    &quot;mongoConfig&quot;: &quot;&quot;,
    &quot;mongoCA&quot;: &quot;&quot;,
    &quot;mongoSecret&quot;: &quot;--- change me now ---&quot;
  }
  </code></pre>
  <pre><code>MongoClient.connect(dbUrl, {useUnifiedTopology: true}, function(err, client) {
        if (err) {
          console.log(err);
          debug.db(`Connection Error: ${err}`);
          unlock(function() {
            throw new Error(`Could not connect to the given Database for server updates: ${dbUrl}.`);
          });
        }
        db = client.db(client.s.options.dbName);
  
        debug.db('Connection successful');
  }
  </code></pre>
  <p>When I use 'npm start' to start the server, I got this error:</p>
  <pre><code>MongoServerSelectionError: connect EACCES 100.10.10.10:27017
      at Timeout._onTimeout (formio\node_modules\mongodb\lib\core\sdam\topology.js:438:30)
      at listOnTimeout (internal/timers.js:549:17)
      at processTimers (internal/timers.js:492:7) {
    reason: TopologyDescription {
      type: 'Unknown',
      setName: null,
      maxSetVersion: null,
      maxElectionId: null,
      servers: Map { '100.10.10.10:27017' =&gt; [ServerDescription] },
      stale: false,
      compatible: true,
      compatibilityError: null,
      logicalSessionTimeoutMinutes: null,
      heartbeatFrequencyMS: 10000,
      localThresholdMS: 15,
      commonWireVersion: null
    }
  }
  </code></pre>
  <p>I have tried to enable/disable the firewall but the results still don't change. Could you help me fix it?
  Thanks
  More information about the repository:
  <a href="https://github.com/formio/formio" rel="nofollow noreferrer">https://github.com/formio/formio</a></p>