Unhandled stream error in pipe. #107

Open
romanesko opened this Issue Sep 6, 2012 · 8 comments

Projects

None yet

9 participants

@romanesko

if host is unreachable:

stream.js:105
      throw er; // Unhandled stream error in pipe.

I use dnode.on('error') but it doesn't help.

Looks like Stream.js will always fall if no error handler passed

function onerror(er) {
  cleanup();
  if (this.listeners('error').length === 0) {
    throw er; // Unhandled stream error in pipe.
  }
}```
@rngadam
rngadam commented Nov 6, 2012

I think I've seen a similar issue, this time with a connection reset:

stream.js:81
      throw er; // Unhandled stream error in pipe.
            ^
Error: write ECONNRESET
    at errnoException (net.js:769:11)
    at Object.afterWrite (net.js:593:19)
@panosru
panosru commented Dec 11, 2012

Same for me...

stream.js:81
      throw er; // Unhandled stream error in pipe.
            ^
Error: connect ETIMEDOUT
    at errnoException (net.js:769:11)
    at Object.afterConnect [as oncomplete] (net.js:760:19)
@natevw
natevw commented Jan 10, 2013

Researching an unrelated issue that yielded this issue in results, so this is kind of a shot in the dark, but I wonder if this is related to nodejs/node-v0.x-archive#4155

@ZeroForm
ZeroForm commented May 9, 2013

I'm able to test a ECONNRESET by telnetting in and terminating the telnet process. Looks in index.js ~ line 100 the error being emitted here isn't being propagated back through the main dnode server so any code using this library has no option to catch it.

Possibly should use server.emit('error') instead of d.emit('error')?

stream.on('error', function (err) {
            if (err && err.code === 'EPIPE') return; // eat EPIPEs
            d.emit('error', err);
        });
@ajie0112

you can work around this error by inserting the following code:
d.on('error', function(err) {
console.log("d.id=%s,err=%s,delete it", d.id, err.errno);
delete server.sessions[d.id];
});
before :
stream.on('error', function (err) {
if (err && err.code === 'EPIPE') return; // eat EPIPEs
d.emit('error', err);
});

@bradvogel

Any update on this? I'm still seeing this.

@v0d1ch
v0d1ch commented Feb 26, 2015

I am too very curios about this issue. I am using cakePHP 3.0 and node 0.10.35, anybody have another workaround ? I tried this that @ajie0112 suggested but no luck

@azadsagar

any updates on this ? i am using node js as server and dnode-php on client.

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