error: Error when starting http server on port 5488 Error: listen EADDRINUSE :::5488



  • hi everybody
    when using command"jsreport start"
    i have this error
    error: Error when starting http server on port 5488 Error: listen EADDRINUSE :::5488


  • administrators

    hi, it seems like you already have something running on port 5488, try executing jsreport start --httpPort 5900 or other port that you like



  • thanks it working



  • Not worked for me



  • Here is the erroe

    Error when starting http server on port 5900 Error: listen EADDRINUSE :::5900
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at Server.listen (net.js:1476:7)
    at /home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:23:12
    at Promise._execute (/home/ubuntu/report_latest/node_modules/bluebird/js/release/debuggability.js:300:9)
    at Promise._resolveFromExecutor (/home/ubuntu/report_latest/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/home/ubuntu/report_latest/node_modules/bluebird/js/release/promise.js:79:10)
    at startAsync (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:15:10)
    at startExpressApp (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:49:12)
    at module.exports.<anonymous> (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:184:12)
    at /home/ubuntu/node_modules/listener-collection/lib/listenerCollection.js:171:33
    at /home/ubuntu/node_modules/listener-collection/lib/listenerCollection.js:151:16
    at tryCatcher (/home/ubuntu/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ubuntu/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/ubuntu/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/ubuntu/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/ubuntu/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/ubuntu/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/ubuntu/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/ubuntu/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
    2018-03-19T18:35:20.030Z - error: Error occured during reporter init Error: listen EADDRINUSE :::5900
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at Server.listen (net.js:1476:7)
    at /home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:23:12
    at Promise._execute (/home/ubuntu/report_latest/node_modules/bluebird/js/release/debuggability.js:300:9)
    at Promise._resolveFromExecutor (/home/ubuntu/report_latest/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/home/ubuntu/report_latest/node_modules/bluebird/js/release/promise.js:79:10)
    at startAsync (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:15:10)
    at startExpressApp (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:49:12)
    at module.exports.<anonymous> (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:184:12)
    at /home/ubuntu/node_modules/listener-collection/lib/listenerCollection.js:171:33
    at /home/ubuntu/node_modules/listener-collection/lib/listenerCollection.js:151:16
    at tryCatcher (/home/ubuntu/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ubuntu/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/ubuntu/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/ubuntu/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/ubuntu/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/ubuntu/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/ubuntu/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/ubuntu/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
    Error: An error has occurred when trying to initialize jsreport.. seems like there is already a server running in port: 5900
    at /home/ubuntu/node_modules/jsreport-cli/lib/instanceHandler.js:31:23
    at tryCatcher (/home/ubuntu/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ubuntu/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/ubuntu/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/ubuntu/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/ubuntu/node_modules/bluebird/js/release/promise.js:689:18)
    at Async._drainQueue (/home/ubuntu/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/ubuntu/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/home/ubuntu/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5) {"originalError":{"code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"listen","address":"::","port":5900}}
    (Original) Error: listen EADDRINUSE :::5900
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at Server.setupListenHandle [as _listen2] (net.js:1351:14)
    at listenInCluster (net.js:1392:12)
    at Server.listen (net.js:1476:7)
    at /home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:23:12
    at Promise._execute (/home/ubuntu/report_latest/node_modules/bluebird/js/release/debuggability.js:300:9)
    at Promise._resolveFromExecutor (/home/ubuntu/report_latest/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/home/ubuntu/report_latest/node_modules/bluebird/js/release/promise.js:79:10)
    at startAsync (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:15:10)
    at startExpressApp (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:49:12)
    at module.exports.<anonymous> (/home/ubuntu/report_latest/node_modules/jsreport-express/lib/reporter.express.js:184:12)
    at /home/ubuntu/node_modules/listener-collection/lib/listenerCollection.js:171:33
    at /home/ubuntu/node_modules/listener-collection/lib/listenerCollection.js:151:16
    at tryCatcher (/home/ubuntu/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/ubuntu/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/home/ubuntu/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/home/ubuntu/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/home/ubuntu/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/home/ubuntu/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/home/ubuntu/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/home/ubuntu/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5) {"code":"EADDRINUSE","errno":"EADDRINUSE","syscall":"listen","address":"::","port":5900}


  • administrators

    hi @xotiv_tech, did you try other ports too? like 9500 or 8700? this error is just about jsreport trying to use a port that is already used by another process.

    if you want to check if some port is being used before deciding in which jsreport should be started use the command sudo lsof -n -i :5489 | grep LISTEN , if it gives you some output then try again with another port until it gives you no output, then you can use that port in jsreport.

    if you still get this error after that then please share more details, like how you installed jsreport (try to provide the exact commands that you are using)?, what version of node and jsreport you are using? how are you starting jsreport?



  • Hello, I tried to use other ports like 9500 or 8700 however it gives the same result.

    I did use the command sudo lsof -n -i :5489 | grep LISTEN and it does not give any output.

    Our jsreport were working fine on trial version however as soon as we add the enterprise license the previously build templates and data were disappeared. Then I upgraded jsreport from 1.9 to 1.10.

    Node version is v8.9.4.
    We were running trial version on pm2 version 2.9.3.
    We use command jsreport start to run
    We use EC2 server to host jsreport
    cli version: 1.3.2

    I have taken backup of the same report on local machine and it is running.



  • This post is deleted!


  • This post is deleted!

  • administrators

    hi @xotiv_tech

    I have taken backup of the same report on local machine and it is running.

    let me see if i understood, so now you have taken the same copy that you had on your local machine into your EC2 instance and now it works in EC2 too, right? so, don't you have the issue anymore?

    We were running trial version on pm2 version 2.9.3.

    hmm the other thing that comes to my mind that could it be causing the problem is that for some reason pm2 is starting your jsreport app multiple times in fork mode. you mention that you were running pm2 before, when the problem occurred, did you use it also? if so, how are you starting things with pm2 (the exact command or any other definition of your app in pm2 will be helpful)?


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.