Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ioredis] Unhandled error event #896

Closed
ghost opened this issue Jun 13, 2019 · 9 comments · May be fixed by raindigi/haraka-plugin-wildduck#3 or saurabharch/GraphqlType-API-Registration#3
Closed

Comments

@ghost
Copy link

ghost commented Jun 13, 2019

ioredis cluster client will print out connection issues even if I register to error handler.

console.error('[ioredis] Unhandled error event:', error.stack);

Even when your cluster redis instance registered for 'error' or 'node error'.
Look like getInfoFromNode duplicates Redis instance, the current duplicate implementation does not close the event listeners. Any error on the cloned instance will fall to the console.log.

This is an issue as when there are connection problems the process prints out to the console and doesn't trigger the event on the cluster instance.

@luin luin added the pinned label Jun 14, 2019
@kjr247
Copy link

kjr247 commented Jun 15, 2019

Is this a new bug? Can I use an earlier version? What needs to be done?

@ghost
Copy link
Author

ghost commented Jun 16, 2019

Not sure it is new - but when you clone the listeners when you duplicate the Redis instance I think we will get the right behavior.

@ghost
Copy link
Author

ghost commented Jun 16, 2019

Created PR #899

@luin luin closed this as completed in 9a113ca Jul 19, 2019
ioredis-robot pushed a commit that referenced this issue Jul 19, 2019
# [4.13.0](v4.12.2...v4.13.0) (2019-07-19)

### Bug Fixes

* **cluster:** suppress errors emitted from internal clients ([9a113ca](9a113ca)), closes [#896](#896) [#899](#899)

### Features

* **cluster:** support binary keys ([b414ed9](b414ed9)), closes [#637](#637)
@ioredis-robot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.13.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Kristoffer95
Copy link

Kristoffer95 commented May 6, 2020

I am having this error

Using ts-node version 8.10.1, typescript version 3.8.3
http://localhost:3000
[ioredis] Unhandled error event: Error: write EPIPE
at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: write EPIPE
at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: write EPIPE
at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: write EPIPE
at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: write EPIPE
at WriteWrap.afterWrite (net.js:789:14)
[ioredis] Unhandled error event: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
[ioredis] Unhandled error event: Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)

@Ha2ryZhang
Copy link

Long Time no operation will report this error

[ioredis] Unhandled error event: Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
[ioredis] Unhandled error event: Error: connect ENETUNREACH 103.44.240.118:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)

@bakdakonusuruz
Copy link

Hi all, I'm having this error quite frequently

[ioredis] Unhandled error event: Error: write EPIPE
afterWriteDispatched (internal/stream_base_commons.js:156:25)
writeGeneric (internal/stream_base_commons.js:147:3)
Socket._writeGeneric (net.js:785:11)
Socket._write (net.js:797:8)
writeOrBuffer (_stream_writable.js:352:12)
Socket.Writable.write (_stream_writable.js:303:10)
Redis.sendCommand (/app/node_modules/ioredis/built/redis/index.js:659:33)
Redis.info (/app/node_modules/ioredis/built/commander.js:111:25)
Redis._readyCheck (/app/node_modules/ioredis/built/redis/index.js:475:10)
Socket.<anonymous> (/app/node_modules/ioredis/built/redis/event_handler.js:54:18)
Object.onceWrapper (events.js:421:28)
Socket.emit (events.js:327:22)
TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10)

@zhuzhengjing
Copy link

[ioredis] Unhandled error event: Error: write EPIPE
at afterWriteDispatched (internal/stream_base_commons.js:156:25)
at writeGeneric (internal/stream_base_commons.js:147:3)
at Socket._writeGeneric (net.js:785:11)
at Socket._write (net.js:797:8)
at writeOrBuffer (internal/streams/writable.js:358:12)
at Socket.Writable.write (internal/streams/writable.js:303:10)
at Redis.sendCommand (/root/app-service/node_modules/ioredis/built/redis/index.js:608:33)
at Redis.info (/root/app-service/node_modules/ioredis/built/commander.js:124:21)
at Redis._readyCheck (/root/app-service/node_modules/ioredis/built/redis/index.js:430:10)
at Socket. (/root/app-service/node_modules/ioredis/built/redis/event_handler.js:47:18)
at Object.onceWrapper (events.js:482:28)
at Socket.emit (events.js:388:22)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1132:10)

@SirawichDev
Copy link

can you guys fixed it yet ?

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this issue Mar 1, 2024
# [4.13.0](redis/ioredis@v4.12.2...v4.13.0) (2019-07-19)

### Bug Fixes

* **cluster:** suppress errors emitted from internal clients ([9a113ca](redis/ioredis@9a113ca)), closes [#896](redis/ioredis#896) [#899](redis/ioredis#899)

### Features

* **cluster:** support binary keys ([b414ed9](redis/ioredis@b414ed9)), closes [#637](redis/ioredis#637)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment