Unable to run on Openshift, Error: listen EACCES

223 views
Skip to first unread message

Gareth Jeanne

unread,
Mar 6, 2015, 7:40:15 PM3/6/15
to keyst...@googlegroups.com
Hi,

Firstly, in local testing loving Keystone.js, got me to a great place really quickly.

Now, i am trying to push my site to Openshift and failing miserably.

I have gotten mongo to connect by adding this to keystone.js:

var mongoDbConnectionString =  process.env.OPENSHIFT_MONGODB_DB_URL || 'mongodb://localhost/my-project';

However i cannot get the thing to run correctly as it seems to be having issues binding to the ip and port i am feeding it on Openshift, i am using the following code:

var host = process.env.OPENSHIFT_NODEJS_IP || process.env.OPENSHIFT_INTERNAL_IP || "127.0.0.1";

var port = process.env.OPENSHIFT_NODEJS_PORT  || process.env.OPENSHIFT_INTERNAL_PORT || 3000;

Combined with:

'mongo': mongoDbConnectionString,
  'host': host,
  'port':  port,

But i keep getting:

==> app-root/logs/nodejs.log <==

Error: listen EACCES

    at errnoException (net.js:901:11)

    at Server._listen2 (net.js:1020:19)

    at listen (net.js:1061:10)

    at Server.listen (net.js:1135:5)

    at EventEmitter.app.listen (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/node_modules/express/lib/application.js:595:24)

    at Object.events.onMount (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/lib/core/start.js:128:30)

    at mounted (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/lib/core/mount.js:614:29)

    at /var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/lib/updates.js:180:15

    at /var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/async/lib/async.js:157:25

    at Promise.<anonymous> (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/lib/updates.js:120:5)

    at Promise.<anonymous> (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)

    at Promise.EventEmitter.emit (events.js:95:17)

    at Promise.emit (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)

    at Promise.fulfill (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)

    at /var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/node_modules/mongoose/lib/query.js:1400:13

    at model.Document.init (/var/lib/openshift/54f8b4884382ec1555000153/app-root/runtime/repo/node_modules/keystone/node_modules/mongoose/lib/document.js:254:11)

DEBUG: Program node keystone.js exited with code 1

DEBUG: Starting child process with 'node keystone.js'

DEBUG: Sending SIGTERM to child...




Now i have checked the env via SSH and they seems to be correct, i am getting poot 8080 and what seems like a correct IP address.


I'm obviously missing something simple here, so help greatly appreciated!


Thanks


Gareth

Gareth Jeanne

unread,
Mar 6, 2015, 8:14:00 PM3/6/15
to keyst...@googlegroups.com
I've even tried hard coding the values into my keystone.js as taken directly from the env of openshift and i still get the same error.

Very frustrating!

Jed Watson

unread,
Mar 8, 2015, 7:43:40 PM3/8/15
to keyst...@googlegroups.com
Hey guys,

There were some OpenShift fixes included in our latest release (0.3.3) - can you let me know if they solve the problem for you?

Otherwise it would be great if you could open an issue on our GitHub project with debugging info, and we'll get this fixed up.

Cheers,
Jed.

Gareth Jeanne

unread,
Mar 9, 2015, 2:58:53 PM3/9/15
to keyst...@googlegroups.com
Hi Jed,

Thanks for your reply, i am using the generator...@0.3.0 and keyston...@0.1.13 which are the latest i am getting from NPM?

Will open an issue on github now.

Cheers

Gareth
Reply all
Reply to author
Forward
0 new messages