Skip to content
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

Error: listen EADDRINUSE #97

Closed
mindvox opened this issue Aug 12, 2015 · 2 comments
Closed

Error: listen EADDRINUSE #97

mindvox opened this issue Aug 12, 2015 · 2 comments

Comments

@mindvox
Copy link

mindvox commented Aug 12, 2015

This is really annoying.. I cannot get this to restart on a file change, without throwing an error. Here is the complete output from the console:

>> File "app/core/controllers/client.js" changed.

Running "express:dev" (express) task
Starting background Express server
events.js:85
throw er; // Unhandled 'error' event
          ^
Error: listen EADDRINUSE
    at exports._errnoException (util.js:746:11)
    at Server._listen2 (net.js:1156:14)
    at listen (net.js:1182:10)
    at Server.listen (net.js:1267:5)
    at Object.<anonymous> (/home/karlbateman/Projects/boilerplate/app.js:6:39)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
Stopping Express server

Running "watch" task
Completed in 1.097s at Wed Aug 12 2015 18:50:29 GMT+0100 (BST) - Waiting...

Is there a way of specifying nodemon app from the command option so that the server can restart without this issue. This could make for a good workaround as I have not seen any real solution on the previous issues regarding this error.

Any help with this would be greatly appreciated 😄

Regards,
Karl

@jlsutherland
Copy link
Collaborator

Hi @karlbateman,

This issue seems to arise with new versions of node. Processes spun up by newer versions of node don't respond to SIGTERM in the same way that they used to. I've put up a PR that I would expect to merge as soon as I run a few more checks (see #99)---it solves the EADDRINUSE issue. If you'd like, feel free to try it out and follow up!

In the mean time, if you need a quick fix to stop the process: run ps -a | grep node and see what the process id is for your sticky processes. Then kill -9 {pid here}.

(see also #102)

@jlsutherland
Copy link
Collaborator

Merged #99

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants