ChrisWren/grunt-nodemon

Problems with > 0.0.09

Closed this issue · 8 comments

Anytime nodemon restarts Node within Grunt, I get the error below (not terminating properly). It can be triggered by entering "rs" . If I roll back to 0.0.09, the problem goes away.

Any ideas?

Failed to open socket on port 5858, waiting 1000 ms before retrying
Server pid 66379 listening on port 3030 in development mode

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE

Could you post your gruntfile? I can help you better when seeing the whole scenario.


Sent from Mailbox for iPhone

On Mon, Nov 25, 2013 at 6:14 PM, Steve McLelland notifications@github.com
wrote:

Anytime nodemon restarts Node within Grunt, I get the error below (not terminating properly). It can be triggered by entering "rs" . If I roll back to 0.0.09, the problem goes away.
Any ideas?

Failed to open socket on port 5858, waiting 1000 ms before retrying
Server pid 66379 listening on port 3030 in development mode
events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE

Reply to this email directly or view it on GitHub:
#25

Hmm... says EADDRINUSE which means another process is running on the same port, is there anything else on 3030?

Right EADDRINUSE because the process isn't shutting down properly. Node is still actively holding open that port, when it should be killed and restarted by nodemon. Fire it up through nodemon directly, no problems. Fire it up using grunt-nodemon (older revs), no problem. Newer revs though...

Got it, I am having trouble re-producing, any way you could post a snapshot of your terminal output right when you launch grunt-nodemon and then after a file change occurs?

No prob. Here's a verbose dump. You can see on 563 typing in "rs".

This is with v0.0.10

This is with v0.0.09

Thanks for the info, I will look into it more this weekend.

After messing around with it, I discovered that the --debug flag was not being accepted by nodemon when running a coffeescript file. When you reverted to 0.0.9, the nodeArgs option was being ignored as it was added in 0.0.10, so that is why your server worked.

nodemon --debug test/server.coffee
30 Nov 10:00:37 - [nodemon] v0.7.10
30 Nov 10:00:37 - [nodemon] to restart at any time, enter `rs`
30 Nov 10:00:37 - [nodemon] watching: /Users/christopherwren/Documents/GitHub/grunt-nodemon
30 Nov 10:00:37 - [nodemon] starting `coffee --nodejs --debug test/server.coffee`
30 Nov 10:00:37 - [nodemon] reading ignore list
debugger listening on port 5858
rs
30 Nov 10:07:10 - [nodemon] restarting child process
30 Nov 10:07:10 - [nodemon] starting `coffee --nodejs --debug test/server.coffee`
debugger listening on port 5858
Failed to open socket on port 5858, waiting 1000 ms before retrying

Here is the corresponding nodemon issue. I will close this down as it will be resolved with a new release of nodemon.