【问题标题】:error starting todos example错误启动 todos 示例
【发布时间】:2012-05-09 03:46:02
【问题描述】:

这里是菜鸟。在 linux 上,我安装了流星,尝试加载“todos”应用程序,出现此错误。它似乎与文件系统监控有关?我错过了包裹或烫发吗?我用 sudo 安装了流星,但我安装了“todos”作为我的基本用户。

提前致谢!

~$ mkdir meteorDev
~$ cd meteorDev/
~/meteorDev$ meteor create --example todos
todos: created.

To run your new app:
   cd todos
   meteor
~/meteorDev$ cd todos/
~/meteorDev/todos$ meteor
[[[[[ ~/meteorDev/todos ]]]]]

Running on: http://localhost:3000/

fs.js:663
    throw errnoException(errno, 'watch');
          ^
Error: watch EMFILE
    at errnoException (fs.js:636:11)
    at FSWatcher.start (fs.js:663:11)
    at Object.watch (fs.js:691:11)
    at [object Object]._scan (/usr/lib/meteor/app/meteor/run.js:322:12)
    at Array.forEach (native)
    at Function.<anonymous> (/usr/lib/meteor/app/lib/third/underscore.js:76:11)
    at new <anonymous> (/usr/lib/meteor/app/meteor/run.js:264:5)
    at /usr/lib/meteor/app/meteor/run.js:455:17
    at /usr/lib/meteor/app/meteor/run.js:512:5
    at /usr/lib/meteor/app/meteor/run.js:570:9

【问题讨论】:

  • 我也有同样的问题。我正在使用 Debian 6 并尝试以 root 身份运行,尝试增加 inotify 实例(inotify 与guard btw 一起工作正常)。我什至尝试单独安装 mongodb。似乎没有必要,因为流星运行它自己的Mongo。
  • 我在 Linux Mint Debian (wheezy/sid) 下再次尝试,现在效果很好。只有在我们的服务器上,我遇到了这个问题:(
  • 不知道为什么,但如果我只运行meteor 我会收到此错误消息。如果我以sudo meteor 运行它,我不会

标签: meteor


【解决方案1】:

Meteor 使用 node 的“fs.watch”命令,该命令使用 linux 的 inotify API。您的系统可能没有 inotify 支持,或者它已关闭。试试这个看看你是否启用了 inotify:

 cat /proc/sys/fs/inotify/max_user_instances

如果该文件存在并且其中的编号较小,请尝试以 root 身份 以达到上限:

 echo 8192 > /proc/sys/fs/inotify/max_user_instances

如果该文件不存在,可能是您的系统不支持 inotify 或者它被某种方式关闭了。

max_user_instances 的增加是暂时的,重启后不会持续。使其永久化:

 echo fs.inotify.max_user_instances=8192 | sudo tee /etc/sysctl.d/10-inotify.conf && sudo sysctl -p

【讨论】:

  • 我需要在我正在运行的虚拟机上使用它,我们能否在meteor.com 网站上提供一个常见问题部分?
  • FAQ 部分需要作为优先事项,这只是在 Ubuntu 上发生在我身上,随机我们的蓝色和崩溃的 Meteor。
  • 我遇到了一个类似的错误,无法通过调整 max_user_instances 而是调整 max_user_watches 来解决。所以我必须在我的 Fedora 16(64 位)机器上执行此操作:# echo 10000 > /proc/sys/fs/inotify/max_user_watches # echo 10000 > /proc/sys/fs/inotify/max_user_instances
【解决方案2】:

您安装了 MongoDB 吗?尝试在另一个 shell 中运行它。

mongod

【讨论】:

  • 我没有安装它,但是检查进程,我在我的流星安装下运行了 mongod:/usr/lib/meteor/mongodb/bin/mongod --bind_ip 127.0.0.1 --port 3002 --dbpath /home/bmurrell/meteorDev/todos/.meteor/local/db
猜你喜欢
  • 2018-03-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-04-18
  • 2021-10-26
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多