如何克服 MongoDB 端口错误以启动示例? [英] How to get past the MongoDB port error to launch the examples?

查看:62
本文介绍了如何克服 MongoDB 端口错误以启动示例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用示例开始使用 Meteor:

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

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

如果我部署并加载部署 url ( http://radically-finished-parties-app.meteor.com/ ) ,应用程序运行......没有什么神奇......这是一个简单的例子

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

我想在本地运行时出现问题,我收到以下消息您正在尝试在本机驱动程序端口上访问 MongoDB.对于 http 诊断访问,请将 1000 添加到端口号"

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"

我通过终端命令运行了meteor:流星 -- 端口 3004

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

设置:- Mac 操作系统 10.9- 铬 31

Setup: - Mac OS 10.9 - Chrome 31

推荐答案

发生这种情况是因为您正在 Web 浏览器中访问 mongodb 端口.

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

当你运行流星应用程序时,例如在端口 3004

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

  • 端口 3004 将是端口 3005 的网络代理
  • 端口 3005 将是原始"意义上的流星应用程序(没有 websockets 部分......我认为)
  • 端口 3006 将是 mongodb(您正在访问).

尝试使用不同的端口.或者使用更简单的端口,例如只需运行 meteor 并在您的网络浏览器中访问端口 3000.

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

如果您将端口号上移是因为它说端口正在使用中,那么meteor 应用程序可能没有在您的计算机上正确退出.重新启动您的机器或查看活动监视器以终止恶意节点进程.

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.

我认为可能发生的情况是您在 3000 上运行,然后将端口向上移动,而前一个可能没有正确退出,因此您看到的是前一个流星实例的 mongodb 实例.

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.

这篇关于如何克服 MongoDB 端口错误以启动示例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆