我正在设置一个丛请求服务器(https://github.com/lokenx/plexrequests-meteor/blob/master/README.md)全新的ubuntu安装。
我开始下载流星curl https://install.meteor.com/ | sh
,它似乎没有任何问题。然后,我克隆了plex请求项目,并从该目录中运行meteor
。
这是生成的错误:
plex@johnpc:/home/plex/plexrequests-meteor$ meteor
[[[[[ /home/plex/plexrequests-meteor ]]]]]
=> Started proxy.
=> Started MongoDB.
Unexpected mongo exit code null. Restarting.
/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: spawn ENOMEM
at errnoException (child_process.js:1011:11)
at ChildProcess.spawn (child_process.js:958:11)
at Object.exports.spawn (child_process.js:746:9)
at spawnMongod (/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/runners/run-mongo.js:39:24)
at launchOneMongoAndWaitForReadyForInitiate (/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/runners/run-mongo.js:426:12)
at launchMongo (/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/runners/run-mongo.js:610:7)
at [object Object]._.extend._startOrRestart (/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/runners/run-mongo.js:704:19)
at [object Object].<anonymous> (/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/runners/run-mongo.js:762:14)
at runWithEnvironment (/var/lib/plexmediaserver/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/utils/fiber-helpers.js:143:21)
我想知道我是否缺少其他一些依赖项,或者是什么原因导致了这个问题。我的猜测是,这可能是某种权限问题,因为我在这台服务器上已经遇到了一些权限问题,但我不确定在哪里。在引发错误的目录上,权限似乎是正确的。
plex@johnpc:/home/plex/plexrequests-meteor$ ls -al /var/lib/plexmediaserver
total 40
drwxr-xr-x 8 plex plex 4096 Nov 29 17:31 .
drwxr-xr-x 45 root root 4096 Nov 29 19:28 ..
drwx------ 2 plex plex 4096 Nov 28 22:33 .cache
drwxrwxr-x 3 plex plex 4096 Nov 29 17:10 .cordova
drwxrwxr-x 3 plex plex 4096 Nov 28 21:26 Library
drwxr-xr-x 4 plex plex 4096 Oct 26 20:16 .meteor
-rw------- 1 plex plex 90 Nov 29 17:31 .meteorsession
drwxrwxr-x 11 plex plex 4096 Nov 29 17:31 .npm
drwxrwxr-x 3 plex plex 4096 Nov 29 19:34 .s3ql
-rw------- 1 plex plex 638 Nov 29 17:17 .viminfo
另一个问题是,我可能缺少依赖项——我安装了mongo,看看这是否能解决问题,但它似乎一直存在。我尝试了这里建议的解决方案,通过设置lang-env变量和重新设置流星,没有任何解决方案。想法?
下面显示的系统在我的macbook pro上运行得很完美,但一旦我试图在我新的ubuntu(ubuntu 14.04 x64)盒子上重新创建它,就会出现这个问题。
另一种可能性是,这可能与记忆有关。我在网上看到人们在记忆耗尽时与流星搏斗。这看起来并没有发生在我身上,但如果我错了,请纠正我。
免费:
/home/plex/plexrequests-meteor master 83s
# ❯ free -m
total used free shared buffers cached
Mem: 490 225 264 0 7 50
-/+ buffers/cache: 168 322
Swap: 0 0 0
/proc/meminfo:
# ❯ cat /proc/meminfo
MemTotal: 501800 kB
MemFree: 269708 kB
Buffers: 8004 kB
Cached: 51856 kB
SwapCached: 0 kB
Active: 147216 kB
Inactive: 48484 kB
Active(anon): 135940 kB
Inactive(anon): 260 kB
Active(file): 11276 kB
Inactive(file): 48224 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 135880 kB
Mapped: 13188 kB
Shmem: 348 kB
Slab: 18584 kB
SReclaimable: 9436 kB
SUnreclaim: 9148 kB
KernelStack: 1208 kB
PageTables: 5264 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 250900 kB
Committed_AS: 876812 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 7892 kB
VmallocChunk: 34359722172 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 32760 kB
DirectMap2M: 491520 kB
DirectMap1G: 0 kB
根据我使用cloud9的经验,它有768MB的内存,在流星运行几分钟并且内存已满后,我会遇到同样的异常。
如果你想用流星进行开发,你需要比现有RAM多得多的RAM。如果你只想运行它,你可以构建应用程序,并将其作为一个简单的节点应用程序运行,但这不是MongoDB附带的,你需要添加额外的功能。