2

I'm setting up a plex requests server (https://github.com/lokenx/plexrequests-meteor/blob/master/README.md) on a completely fresh ubuntu installation.

I started by downloading meteor curl https://install.meteor.com/ | sh which seemed to work without any issues. I then cloned the plex-requests project, and ran meteor from inside that directory.

This is the error that is generated:

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)

I am wondering whether there are some other dependencies that I am missing, or what else could be causing this issue. My guess is that it could be a permissions issue of some kind, because I've run into a handful of those already on this server, but I'm not sure where. It appears as though the permissions are correct on the directory where the error was thrown.

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

The other issue is it may be that I'm missing dependencies - I installed mongo to see if that would fix the problem but it seems to be persisting. I tried the solutions suggested here, by setting the lang env variables and reseting meteor, nothing there solved the issue. Thoughts?

The system shown below works flawlessly on my macbook pro, but once I try to recreate it on my fresh ubuntu (Ubuntu 14.04 x64) box this problem arises.

Another possibility is that this could be memory related. I've seen people online struggle with meteor when the memory runs out. It doesn't look like that's happening to me, but correct me if I'm wrong about that.

free:

/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
4

1 回答 1

2

根据我对拥有 768MB 内存的 cloud9 的经验,在流星运行几分钟并且内存已满后,我会遇到同样的异常。

如果你想用流星开发,你需要的内存比你可用的多得多。如果您只想运行它,您可以构建应用程序并将其作为一个简单的节点应用程序运行,但这不随 MongoDB 提供,您需要添加额外的。

于 2015-11-30T01:34:23.717 回答