27 Nov 2013, 10:14
Generic-user-small

steven swigart (1 post)

Following the instructions and code on pages 25 - 27, although when I telnet into port 5432 I don’t get any output from the program.

Problem solved: Changed the port and it worked fine…

27 Nov 2013, 12:25
Avatar_pragsmall

Jim R. Wilson (60 posts)

Thanks for reporting this! I picked that particular port because it’s a high numbered port that seemed easy to remember—but it looks like it’s also the official port number for PostgreSQL.

Are you running PostgreSQL? Did the net-watcher.js program give you an error message at startup saying that it couldn’t bind the port?

28 Nov 2013, 09:06
Generic-user-small

Alan Gardner (6 posts)

Heh. Was just about to report this. Thanks for the confirm :)

16 Dec 2013, 10:16
Img_20131109_124437_1_pragsmall

Moandji Ezana (3 posts)

I had the same problem. Here’s the error message:

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

I suggest changing the port number or pointing it out as a potential source of problems.

16 Dec 2013, 16:54
Avatar_pragsmall

Jim R. Wilson (60 posts)

Thanks, that’s a good idea!

17 Mar 2014, 15:12
Richard mateosian 5x5a_smaller_pragsmall

Richard Mateosian (1 post)

I have a different problem with net-watcher.js. I thought I may have made an error typing it, but I get the same error with the code copied out of the online PDF. Changing the port number doesn’t change the symptoms.

The code runs, and in the first Cygwin console window, I see:

$ node --harmony net-watcher.js target.txt
Listening for subscribers...

In the second Cygwin console window, I telnet and see

$ telnet localhost 5721
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Now watching 'target.txt' for changes...
Connection closed by foreign host.

Then the first window shows the following additional lines:

Subscriber connected.

fs.js:1051
    throw errnoException(process._errno, 'watch');
          ^
Error: watch ENOENT
    at errnoException (fs.js:1019:11)
    at FSWatcher.start (fs.js:1051:11)
    at Object.fs.watch (fs.js:1076:11)
    at Server.<anonymous> (C:...\net-watcher.js:12:22)
    at Server.EventEmitter.emit (events.js:95:17)
    at TCP.onconnection (net.js:1180:8)

Any ideas?

30 Apr 2014, 16:52
Photo_2_pragsmall

Todd W Crone (8 posts)

Phew…I changed the port to 5433 and all is well. I have PostgreSQL running but odd I didn’t get any bind exception. Just quietly ran with nothing interesting happening.

22 May 2014, 18:08
Selfie on 5-6-14 at 11.30 pm s_pragsmall

Aniket Suryavanshi (7 posts)

This post is a blessing. I had no clue why the book programs were not running on my machine. Thanks!

26 May 2014, 11:10
Avatar_pragsmall

Jim R. Wilson (60 posts)

Richard, what OS and node version are you using?

  You must be logged in to comment