Can't connect to MongoDB atlas serverless instance

Hi, i have a MongoDB serverless instance but i can't connect to that. 

I am using the connection string that mongo atlas gives me

but i get the following error:

"A TXT record is only permitted to contain the keys [authsource, replicaset], but the TXT record for 'quiz-serverless-instanc.iw9hz.mongodb.net' contains the keys [loadbalanced, authsource]."

I don't know what could be happening, it's a serverless instance

4 comments
Avatar
Yuriy Vinogradov
Comment actions Permalink

Just found similar issue here https://www.mongodb.com/community/forums/t/atlas-serverless-and-dns-txt-record/117967
Looks like your server returns TXT record which contains 'loadbalanced' value, so I guess you need to contact support on server side to change DNS records.

0
Comment actions Permalink

Hello Guys,

Last Monday I have Facing same problem Please any one can Help me. Thanks in Advance.

’m trying to connect to an Atlas Serverless database from Nodejs. It just won’t work. Tried and triple checked everything I found. mongosh connect works, so user/passwd must be right, and ip whitelisting must work too. 

OneCognizant.Cognizant.com Portal

I followed MongoDB Atlas Serverless Instances: Quick Start to the letter, yet the insertOne fails with “MongoDriverError: MongoClient must be connected to perform this operation”.

Help please!

0
Comment actions Permalink

Hello!, Nicomorales297

I have same type problem 

So I'm currently wirting a web application and I need database so I decided to go with mongodb and mongoose. Until now I tested everything on localhost and it worked but I wanted to move the data to a server. I had heard of Atlas and registered myself and "uploaded" the data.

Now I want to connect to the cluster via a node.js app.

mongoose.connect('mongodb+srv://engllucas:p%40ssw0rd@insight-quhku.mongodb.net/test');

I got the string of the mongodb Atlas site at the point Connect Your Application

Then I swapped my password.

mongoose.connect('mongodb://engllucas:p%40ssw0rd@insight-quhku.mongodb.net/test');

This didn't work either.

Thats the error message:

{ MongoError: failed to connect to server [insight-shard-00-02-quhku.mongodb.net:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 18.194.163.64:27017]
at Pool.<anonymous> (U:\WEBT\ProjectInsight\Quiz\node_modules\mongodb-core\lib\topologies\server.js:503:11)
at emitOne (events.js:115:13)
at Pool.emit (events.js:210:7)
at Connection.<anonymous> (U:\WEBT\ProjectInsight\Quiz\node_modules\mongodb-core\lib\connection\pool.js:326:12)
at Object.onceWrapper (events.js:318:30)
at emitTwo (events.js:125:13)
at Connection.emit (events.js:213:7)
at TLSSocket.<anonymous> (U:\WEBT\ProjectInsight\Quiz\node_modules\mongodb-core\lib\connection\connection.js:245:50)
at Object.onceWrapper (events.js:316:30)
at emitOne (events.js:115:13)
at TLSSocket.emit (events.js:210:7)
at emitErrorNT (internal/streams/destroy.js:64:8)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
  name: 'MongoNetworkError',

message: 'failed to connect to server [insight-shard-00-02-quhku.mongodb.net:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 18.194.163.64:27017]' } (node:4920) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): MongoNetworkError: failed to connect to server [insight-shard-00-02-quhku.mongodb.net:27017] on first connect [MongoNetworkError: connect ECONNREFUSED 18.194.163.64:27017] (node:4920) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. KohlsFeedback Survey

any one can help me 

Thanks 

 

0
Comment actions Permalink

I have had the same issue since I updated to the latest IntelliJ version 2022.2.

I have installed the previous version 2022.1.4 and there it works. That should indicate the problem does not come from the DNS. 

I have had success also connecting from mongosh and a python script from the same machine.

0

Please sign in to leave a comment.