Giter VIP home page Giter VIP logo

Comments (13)

frederichoule avatar frederichoule commented on May 28, 2024 1

Or the SRV method:

mongodb+srv://user:[email protected]/admin

from mongoku.

julien-c avatar julien-c commented on May 28, 2024

Works for us, but we're gonna look into it, cc @n1t0

can you paste an example of the format string you try to use?

from mongoku.

frederichoule avatar frederichoule commented on May 28, 2024

mongodb://user:[email protected]:27017,replica2.gcp.mongodb.net:27017,replica3.gcp.mongodb.net:27017/admin

from mongoku.

Lianidaz avatar Lianidaz commented on May 28, 2024

Don't have srv method unfortunately, lousy cloud.
My connection string goes like this
mongodb://us3r:[email protected]:3223,192.168.100.38:3223,192.168.100.155:3223/cool_prod_db?replicaSet=replica

I know it's quite an obscure way to connect, but this case would benefit at least 40 devs and testers.

from mongoku.

n1t0 avatar n1t0 commented on May 28, 2024

I just published a new version that is more permissive with the URL format. As long as the mongodb driver accepts it, it should work fine. Let me know

from mongoku.

frederichoule avatar frederichoule commented on May 28, 2024

I'm still having trouble connecting to a replica set on MongoDB Atlas.

[Mongoku] listening on port 3100 [obfuscated.gcp.mongodb.net] Connected to obfuscated.gcp.mongodb.net Error while connecting to obfuscated.gcp.mongodb.net: undefined Server does not exist (node:14136) UnhandledPromiseRejectionWarning: MongoError: user is not allowed to do action [collStats] on [admin.system.roles] at Connection.<anonymous> (C:\Users\Frederic Houle\AppData\Roaming\npm\node_modules\mongoku\node_modules\mongodb-core\lib\connection\pool.js:443:61) at Connection.emit (events.js:197:13) at processMessage (C:\Users\Frederic Houle\AppData\Roaming\npm\node_modules\mongoku\node_modules\mongodb-core\lib\connection\connection.js:364:10) at TLSSocket.<anonymous> (C:\Users\Frederic Houle\AppData\Roaming\npm\node_modules\mongoku\node_modules\mongodb-core\lib\connection\connection.js:533:15) at TLSSocket.emit (events.js:197:13) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:269:11) at TLSSocket.Readable.push (_stream_readable.js:224:10) at TLSWrap.onStreamRead [as onread] (internal/stream_base_commons.js:145:17) (node:14136) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4) (node:14136) [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.

from mongoku.

n1t0 avatar n1t0 commented on May 28, 2024

This seems to be an error related to the permissions your user has. As you can see in your error message, it first connects, and then when it tries to issue a collStats command, you get this error.

Can you try using the same URL but without the /admin part?

from mongoku.

n1t0 avatar n1t0 commented on May 28, 2024

You can also try what we discussed here: #3

Let me know how it works. If it doesn't, can you give me more information about the roles of your user, mongo version your server is running, etc...

from mongoku.

Lianidaz avatar Lianidaz commented on May 28, 2024

So.
I pulled latest image. It now allows me to add server with that monstrous string. But it shows only first host of the set and Authentication failed.
Credentials are fine of course.

from mongoku.

frederichoule avatar frederichoule commented on May 28, 2024

@n1t0 You could possibly spin up a free MongoDB Atlas replica set, and see by yourself? We're using the free one, without any customization. Tried without the /admin at the end of the URL, without success.

This seems to be an error related to the permissions your user has. As you can see in your error message, it first connects, and then when it tries to issue a collStats command, you get this error.

Can you try using the same URL but without the /admin part?

from mongoku.

n1t0 avatar n1t0 commented on May 28, 2024

Awesome thank you! I'll have a look

from mongoku.

n1t0 avatar n1t0 commented on May 28, 2024

This should now be fixed in the new release

from mongoku.

Lianidaz avatar Lianidaz commented on May 28, 2024

Fixed indeed. Thank you!

from mongoku.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.