Deploying on Server - MongoParseError
See original GitHub issueHi Arun,
This has to be best piece of GUI for Mongo I have seen ever.
kudos for the great work - have to buy you coffee sometime soon.
So there is this section you mention in your documentation:
Installed via npm:
mongo-gui -u mongodb+srv://<username>:<password>@host/<dbnames>?retryWrites=true&w=majority
I’d like to execute this line as this:
mongo-gui -u mongodb+srv://steve:mi%23llion@localhost:27071/chickendb?retryWrites=true&w=majority
Which should open a port 4321 where I can view from my server e.g. http:32.66.74.32:4321
But I keep getting this error:
Failed to connect mongoDB - MongoParseError: URI does not have hostname, domain name and tld
Kindly tell me what I am doing wrong.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Deploying to Heroku: MongoParseError: Invalid scheme ...
I am having issues deploying to Heroku. I have uploaded the relevant env variables under "Config Vars" within Heroku Dashboard but am ...
Read more >Heroku deployment with mongodb atlas failed - Node
My error reads: 'MongoNetworkError: failed to connect to server ... 2021-02-14T15:55:22.489428+00:00 app[web.1]: 'MongoParseError: Unescaped ...
Read more >mongoparseerror: invalid scheme, expected connection ...
When I hosted my web-app on cyclic.sh "npm run start" script is returning an error in deployment logs. App is working fine when...
Read more >Unable to connect with node.js due to "mongodb+srv"
I'm having the EXACT same error as Getting error upon await client.connect() in node.JS and Error with await client.connect() node.JS.
Read more >MongoError: failed to connect to server [localhost:27017] · ...
MongoDB connection error: MongoError: failed to connect to server ... After deploy to my external server (running in Cpanel) is when I get:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It worked!!
This is what I did - let me leave this here for future reference to others:
Open mongo on your server via the terminal
Mongo will print out a line with the link you need to use e.g.
mongodb://127.0.0.1:27017/?authSource=admin&compressors=disabled&gssapiServiceName=mongodb
Use this for the -u tag. In my case I had to remove compressors section and user:password@127.0.0.1… at the beginning of the URL.
Now all that is left is to figure out how to automate this step by default - not having to run to the terminal over and over again.
Also note - your user may need a root role: https://stackoverflow.com/questions/23943651/mongodb-admin-user-not-authorized
Hello @arunbandari ,
mongo-gui
By itself works on my server by opening up a browser. It is using the admin user who can edit many thing 😦
So I created a user that only has “find” or “read” roles 😃
I tried:
mongo-gui -u mongodb://localhost:27017/powerless_user -p 4321
On the server so that I can get it to fire up an instance for exploring in a browser. For that user. But I get this error:
`events.js:167 throw er; // Unhandled ‘error’ event ^
Error: listen EADDRINUSE :::4321 at Server.setupListenHandle [as _listen2] (net.js:1286:14) at listenInCluster (net.js:1334:12) at Server.listen (net.js:1421:7) at Function.listen (/home/steve/.nvm/versions/node/v10.13.0/lib/node_modules/mongo-gui/node_modules/express/lib/application.js:618:24) at Function.app.once (/home/steve/.nvm/versions/node/v10.13.0/lib/node_modules/mongo-gui/server.js:47:7) at Object.onceWrapper (events.js:273:13) at Function.emit (events.js:182:13) at InitDB.mongoClient.connect.then.client (/home/steve/.nvm/versions/node/v10.13.0/lib/node_modules/mongo-gui/src/db/dataAccessAdapter.js:27:24) at process._tickCallback (internal/process/next_tick.js:68:7) Emitted ‘error’ event at: at emitErrorNT (net.js:1313:8) at process._tickCallback (internal/process/next_tick.js:63:19)`