Openshift + Meteor =听EACCES?

时间:2013-09-01 22:08:58

标签: node.js unix meteor redhat openshift

我在Node 0.6 + Mongo 2.2 Openshift盒式磁带上部署了Meteor.js,并在数据目录中安装了自定义节点0.8.24(类似于this tutorial)。

我在调用应用程序之前设置了正确的端口。 server.js中的代码如下:

// Setup env
process.env.ROOT_URL = "http://" + (process.env.OPENSHIFT_APP_DNS || "localhost");
process.env.MONGO_URL = (process.env.OPENSHIFT_MONGODB_DB_URL + process.env.OPENSHIFT_APP_NAME) || "mongodb://localhost:27017/";
process.env.PORT = process.env.OPENSHIFT_NODEJS_PORT || 8000;
process.env.IP = process.env.OPENSHIFT_NODEJS_IP || '0.0.0.0';

// Show connection details on startup
console.log("MONGO_URL IS: " + process.env.MONGO_URL);
console.log("ROOT_URL IS: " + process.env.ROOT_URL);
console.log("PORT: " + process.env.PORT);
console.log("IP: " + process.env.IP);

require(require('path').join(__dirname, 'main.js'));

然后,当我rhc app restart myappname应用时,我得到:

> node server.js

MONGO_URL IS: mongodb://<login>:<pass>@127.5.x.x:27017/<myapp>
ROOT_URL IS: http://<myappname>-<mydomain>.rhcloud.com
PORT: 8080
IP: 127.5.x.x

events.js:71
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: listen EACCES
    at errnoException (net.js:770:11)
    at Server._listen2 (net.js:893:19)
    at listen (net.js:932:10)
    at Server.listen (net.js:1006:9)
    at dns.js:72:18
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)
npm info <mydomain>@0.0.1 Failed to exec start script
npm ERR! weird error 1
npm ERR! not ok code 0

main.js是我Meteor应用程序的常规入口点。

env设置看起来像是正确的。为什么我一直这样做EACCESS

0 个答案:

没有答案