sabari sabari - 1 year ago 165
Node.js Question

EAddrInUse for live reload - node js - on running gulp command

I run gulp for my mean-io stack application.

I get the below error.

13:15:54] Starting 'server'...
13:15:54] Finished 'server' after 47 ms
13:15:54] Live reload server listening on: 35729

.. Uhoh. Got error listen EADDRINUSE ...
rror: listen EADDRINUSE
at errnoException (net.js:901:11)
at Server._listen2 (net.js:1039:14)
at listen (net.js:1061:10)
at Server.listen (net.js:1127:5)

I guess the port 35729 is being used by some other application. Am I right? I have also tried changing the port number in livereload.js. But then, I got the same error.

The below are the files where, I see the 35729 port number assigned. Please let me know if should change the port number any where.

321: this.port = 35829;
20: options.port = parseInt(options.port || 35729, 10);
21: // .option('port', '-p', 'Port to listen on (default: 35729)', Number)
14: .option('port', '-p', 'Port to listen on (default: 35729)', Number)
18: opts.port = opts.port || 35729;


Answer Source

I made a change .in

gulpexpress/index.js == port number changed to 35829. And it worked.

It seems same port number 35729 is used more than once for two different process.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download