Failed connection throws exception #63

Closed
mridgway opened this Issue Oct 17, 2012 · 5 comments

Comments

Projects
None yet
3 participants

In version 0.1.0, failed connections did not throw an exception, but this seems to be happening in 0.1.2. Is this a regression or expected behavior? Will I need to do my own handling now?

events.js:66
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: connect ECONNREFUSED
    at errnoException (net.js:768:11)
    at Object.afterConnect [as oncomplete] (net.js:759:19)
Owner

3rd-Eden commented Oct 18, 2012

Do you have a more complete stack trace? I can't really see where the error originates from. And thanks for reporting this.

On Wednesday, October 17, 2012 at 10:42 PM, Michael Ridgway wrote:

In version 0.1.0, failed connections did not throw an exception, but this seems to be happening in 0.1.2. Is this a regression or expected behavior? Will I need to do my own handling now?
events.js:66 throw arguments[1]; // Unhandled 'error' event ^ Error: connect ECONNREFUSED at errnoException (net.js:768:11) at Object.afterConnect as oncomplete


Reply to this email directly or view it on GitHub (3rd-Eden#63).

That was unfortunately the full stack trace that it gave me.

Steps to reproduce:

  • new Memcached(...) without memcached running on the location specified.
  • Try to run a get or set
Owner

3rd-Eden commented Oct 19, 2012

Well, that sucks lol. I'll see what i can do.

On Oct 18, 2012, at 9:30 PM, Michael Ridgway notifications@github.com wrote:

That was unfortunately the full stack trace that it gave me.


Reply to this email directly or view it on GitHub.

The problem is that Jackpot (manger) regenerate emits an error message which no one is listening to. Not sure what the proper fix is, but anyone looking for something temporary, go into jackpot.js (which is a dependency of memcached itself) and comment out line 76, which should look like

 if (err) self.emit('error', err);

3rd-Eden closed this in 85e9233 Nov 4, 2012

Owner

3rd-Eden commented Nov 4, 2012

@karlseguin Thanks for noticing, I have added an error listener to it which resolves this issue. I'll push out a new version in a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment