-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Openshift close listen debug #37
Comments
I bet 8080 is already taken on that machine? |
I tried replacing each one process.env.OPENSHIFT_NODEJS_IP |
So it looks like |
I have tried many ways to find the cause, but there is no way but it runs on OpenShift What I do not understand why! |
the truth I am very interested in jxm but by no vps / server should run on OpenShift free |
What is the result of the following code? console.log('env port', process.env.OPENSHIFT_NODEJS_PORT); |
env port 8080 |
OK, but if you say:
then maybe this is a reason? Are you using OpenShift free ? |
I'm testing right on OpenShift free. |
So maybe this is the reason for error? |
I'm thinking maybe jxm code system problems when running on the host Openshift? one listen was closed after the show: jx_server.js: 268: 16) |
You can do a simple test without jxm: var http = require('http');
var server_port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';
var server = http.createServer(function (request, response){
response.end('Request received ' + request.url);
});
server.listen(server_port, server_ip_address, function(){
console.log("Server listening on: http://%s:%s", server_ip_address, server_port);
});
server.on('error', function(e) {
console.log(e);
}); |
code good not debug ! |
Maybe today the port 8080 is free? Try jxm today. |
jxm.io v0.3.9 events.js:72 a connection port has been closed . |
BTW; I've updated it on npm to latest |
I tried my best to open jxm on OpenShift results were unexpected error returns listen AECES
jxm.io v0.3.9
HTTP -> http://127.12.248.1:8080/
events.js: 72
throw er; // Unhandled 'error' event
^
Error: listen EACCES
at errnoException (net.js: 905: 11)
at Server._listen2 (net.js 1024: 19)
at listen (net.js: 1065: 10)
at Server.listen (net.js: 1139: 5)
at Object.exports.startServer (/var/lib/openshift/563b86a389f5cf62c400021e/app-root/runtime/repo/node_modules/jxm/backend/jx_server.js:268:16)
at Object.rabbit.OnConnected (/var/lib/openshift/563b86a389f5cf62c400021e/app-root/runtime/repo/node_modules/jxm/backend/jx_server_events.js:169:17)
at Object.exports.start (/var/lib/openshift/563b86a389f5cf62c400021e/app-root/runtime/repo/node_modules/jxm/backend/jx_rabbit_api.js:134:21)
at Object.exports.Start (/var/lib/openshift/563b86a389f5cf62c400021e/app-root/runtime/repo/node_modules/jxm/backend/jx_server_events.js:174:12)
at Object.exports.start (/var/lib/openshift/563b86a389f5cf62c400021e/app-root/runtime/repo/node_modules/jxm/backend/jxm.js:327:39)
at Object. (/var/lib/openshift/563b86a389f5cf62c400021e/app-root/runtime/repo/server.js:16:8)
DEBUG: Program exited with code 8 node server.js
DEBUG: Starting child process with 'node server.js'
var server = require('jxm');
server.setApplication("kjnw89dfho2j3bfoweyhf892h", "/", "908j1n23okdnwqe98hf2oi3ubrowehf98wehroi24bfoiqewhf08293hr09243hbre8hfi0owehf420ith20");
var server_port = process.env.OPENSHIFT_NODEJS_PORT || 8080;
var server_ip_address = process.env.OPENSHIFT_NODEJS_IP || '127.0.0.1';
server.addJSMethod("serverMethod", function (env, params) {
server.sendCallBack(env, params + " World!");
});
server.linkResource("/", ["index.html", "text/html" ]);
server.on('request', function(req, res){
return true;
});
server.start({address:server_ip_address,port:server_port });
The text was updated successfully, but these errors were encountered: