Running peerjs-server on OpenShift returns 503 Service Unavailable

I have set up up a node.js 0.10 gear in OpenShift which I deployed a simple server which is based off peerjs-server. All I want this server to do is act as a signalling server to communicate the connection info between peers connected to my application and from then on they communicate peer-to-peer using WebRTC. Everything works when pointing to the demo "PeerJS Cloud" signalling server but when trying to use my own server set up I keep getting returned 503 status codes.

Here is the server creation code I use:

var host = process.env.OPENSHIFT_NODEJS_IP;
var port = process.env.OPENSHIFT_NODEJS_PORT || 8080;

var server = new PeerServer({ port: port, host: host});

NB: I have added host to peerjs-server so I can use OpenShift's IP, not sure if this was necessary but it wasn't working without this either.

The server peerjs-server uses is restify. Here is the server create and listen code:

this._app = restify.createServer(this._options.ssl);

/* A lot of set up code that I have not changed from peerjs-server */


Where this._options.port and are the ones defined in the previous code segment and I am not using SSL so nothing is being passed in there.

When deploying this code to OpenShift I get no errors but when accessing the site on port 80 or 8000 (the open external ports) I get 503's. I also checked rhc tail and this is what I get: Screenshot (Can't post images because I have no reputation..). Not sure exactly what that means if anything.

Any help is much appreciated, and if more info is needed I can add more, was not sure what was important information or not.

UPDATE: It's a scaled application using 1-3 small gears.



// Listen on user-specified port and IP address.
if (this._options.ip) {
  this._app.listen(this._options.port, this._options.ip);
} else {

So, use 'ip' and not 'host'. Worked for me.

Need Your Help

GridView Lostfocus in edit mode javascript

Can anybody let me know how to display a Pop up to confirm if he wants to save the changes ,when a record is in Edit mode in Gridview

webkit mobile input zoom disable still zooming when adding width attribute

css3 mobile input webkit viewport

Plenty of posts on how to disable autozoom on focused input fields.