How to get past the MongoDB port error to launch the examples?

限于喜欢 提交于 2020-01-04 02:04:22

问题


I'm getting started with Meteor, using the examples:

https://www.meteor.com/examples/parties

If I deploy and load the deployment url ( http://radically-finished-parties-app.meteor.com/ ) , the app runs ... nothing magic there... it was an easy example

My issue occurs when I want to run it locally, I get the following message "You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number"

I got meteor running through the terminal command: meteor --port 3004

Setup: - Mac OS 10.9 - Chrome 31


回答1:


This is happening because you are accessing the mongodb port in your web browser.

When you run a meteor app, e.g on port 3004

  • Port 3004 would be a web proxy to port 3005
  • Port 3005 would be the meteor app in a 'raw' sort of sense (without the websockets part.. i think)
  • Port 3006 would be the mongodb (which you are accessing).

Try using a different port. Or use a simpler port e.g just run meteor and access port 3000 in your web browser.

If the reason you moved the port number up because it said the port is in use the meteor app may not have exited properly on your computer. Restart your machine or have a look at activity monitor to kill the rogue node process.

I think what might have happened is you ran in on 3000, then moved the ports up and the previous one may have not been exited correctly so what you're seeing is a mongodb instance of a previous meteor instance.




回答2:


This happens when you run another meteor on port 2999, forget about it and try to start a second instance on the usual port.




回答3:


Try making sure Meteor is using the local embedded mongo db, which it will manage on its own:

export MONGO_URL=''




回答4:


Something changed in my bash settings that I didn't copy over to zsh. I uninstalled zsh and meteor can now find and access mongo.



来源:https://stackoverflow.com/questions/20788198/how-to-get-past-the-mongodb-port-error-to-launch-the-examples

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!