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

Cluster UnhandledPromiseRejectionWarning #883

Closed
jstewmon opened this issue Jun 7, 2019 · 13 comments · Fixed by #884
Closed

Cluster UnhandledPromiseRejectionWarning #883

jstewmon opened this issue Jun 7, 2019 · 13 comments · Fixed by #884
Labels

Comments

@jstewmon
Copy link
Contributor

jstewmon commented Jun 7, 2019

I'm intentionally causing a connection error (by omitting a NAT mapping for one cluster node) to verify my application's error handling, but I'm seeing an UnhandledPromiseRejectionWarning:

(node:18) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:288:20)
    at Socket.emit (events.js:200:13)
    at Socket.EventEmitter.emit (domain.js:471:20)
    at TCP.<anonymous> (net.js:586:12)

My code is executing a multi command like this:

redisClient
      .multi()
      .expire(key, this.expire)
      .hgetall(key)
      .exec()
      .then(
        async ([[expErr, expVal], [hashErr, hashVal]]) => {
          if (expErr || hashErr) {
            throw expErr || hashErr;
          }
          return Object.values(hashVal);
        },
      )
      .then(x => cb(null, x))
      .catch(err => cb(err, []));

I believe this is the relevant debug output preceding the throw:

  ioredis:redis status[127.0.0.1:7000]: [empty] -> wait +5ms
  ioredis:delayqueue send 1 commands in failover queue +119ms
  ioredis:redis status[127.0.0.1:7000]: wait -> connecting +1ms
  ioredis:redis queue command[127.0.0.1:7000]: 0 -> multi([]) +1ms
  ioredis:redis queue command[127.0.0.1:7000]: 0 -> expire([ 'mykey', '2592000' ]) +0ms
  ioredis:redis queue command[127.0.0.1:7000]: 0 -> hgetall([ 'mykey' ]) +0ms
  ioredis:redis queue command[127.0.0.1:7000]: 0 -> exec([]) +1ms
  ioredis:connection error: Error: connect ECONNREFUSED 127.0.0.1:7000
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1054:14) {
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 7000
} +9ms
  ioredis:redis status[127.0.0.1:7000]: connecting -> close +2ms
  ioredis:connection skip reconnecting because `retryStrategy` is not a function +1ms
  ioredis:redis status[127.0.0.1:7000]: close -> end +0ms

The promise for exec does reject as expected (json taken from my log):

{
  "type": "Error",
  "message": "Connection is closed.",
  "stack": "Error: Connection is closed.\n    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)\n    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)\n    at Object.onceWrapper (events.js:288:20)\n    at Socket.emit (events.js:200:13)\n    at Socket.EventEmitter.emit (domain.js:471:20)\n    at TCP.<anonymous> (net.js:586:12)",
  "previousErrors": [
    {
      "previousErrors": "[Circular]"
    },
    {
      "previousErrors": "[Circular]"
    },
    {
      "previousErrors": "[Circular]"
    }
  ]
}

Is there something I can do to catch the rejection?

Possibly related, the 'error' event listener I have attached to the cluster does not trigger when this happens, which also seems unexpected.

I was using 4.9.0 and tried updating to 4.9.5, and have the same experience with both versions.

TIA for any guidance!

@luin
Copy link
Collaborator

luin commented Jun 7, 2019

You can see the command that caused the UnhandledPromiseRejectionWarning by enabling showFriendlyErrorStack option:

new Cluster([], { showFriendlyErrorStack: true })

It's also possible that the command were sent from ioredis internal, if that is the case, we'll figure out a way to solve it.

@jstewmon
Copy link
Contributor Author

jstewmon commented Jun 7, 2019

@luin thanks for the reply.

The showFriendlyErrorStack option isn't working when passed to the Cluster constructor because this.options is somehow having {showFriendlyErrorStack: false}, so lodash.defaults does not pick up the value passed to the constructor.

I couldn't figure out why that's happening, but it seems like merge({}, this.options, DEFAULT_CLUSTER_OPTIONS, options) would be more appropriate to ensure the passed options override the defaults.

Anyway, I worked around that using the chrome inspector and I see the friendly stack trace reporting the callsite of the exec call in my original post.

This code is running during an http request, and I've confirmed that the callsite is only executed once during a request. Yet, I count 16 of these unhandled rejections for every request. If I pause on uncaught exceptions with inspector, it pauses 17 times on throw execResult[0].

Are those numbers a clue as to what might be happening?

@jstewmon
Copy link
Contributor Author

jstewmon commented Jun 7, 2019

I put together a minimal reproduction:

docker-compose.yaml:

version: '3.7'
services:
  web:
    image: node:dubnium-alpine
    user: node
    working_dir: /home/node/app
    depends_on:
      - redis
    environment:
      DEBUG: 'ioredis:*'
      NODE_ENV: dev
    ports:
      - '3000:3000'
      - '9222:9222'
    volumes:
      - .:/home/node/app
    init: true
    command: node --inspect=0.0.0.0:9222 index.js
    stdin_open: true
  redis:
    image: grokzen/redis-cluster:5.0.4
    environment:
      IP: '0.0.0.0'
    ports:
      - '7000-7005:7000-7005'

package.json:

{
  "name": "ioredis-repo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ioredis": "^4.9.5"
  }
}

index.js:

const http = require('http');
const Redis = require('ioredis');
const util = require('util');
const cluster = new Redis.Cluster(
  [{host: 'redis', port: 7000}],
  {
    natMap: {
      '127.0.0.1:7000': {host: 'redis', port: 7000},
      '127.0.0.1:7001': {host: 'redis', port: 7001},
      // '127.0.0.1:7002': {host: 'redis', port: 7002},
      '127.0.0.1:7003': {host: 'redis', port: 7003},
      '127.0.0.1:7004': {host: 'redis', port: 7004},
      '127.0.0.1:7005': {host: 'redis', port: 7005},
    },
  },
).on('error', err => {
  console.error('CLUSTER ERROR:', err)
});

http.createServer(async (req, res) => {
  const key = 'foo';
  cluster
    .multi()
    .expire(key, 300)
    .hgetall(key)
    .exec()
    .then(results => res.end(JSON.stringify(results)))
    .catch(err => {
      res.statusCode = 500
      res.end(util.format('%o', err))
    });
}).listen(3000);

http request:

$ curl -i http://localhost:3000/
HTTP/1.1 500 Internal Server Error
Date: Fri, 07 Jun 2019 18:05:53 GMT
Connection: keep-alive
Content-Length: 811

{ Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
  [stack]:
   'Error: Connection is closed.\n    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)\n    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)\n    at Object.onceWrapper (events.js:286:20)\n    at Socket.emit (events.js:198:13)\n    at TCP._handle.close (net.js:606:12)',
  [message]: 'Connection is closed.',
  previousErrors: [ [Circular], [Circular], [Circular], [length]: 3 ] }

snippet from container output:

2019-06-07T18:05:53.703Z ioredis:cluster:connectionPool Connecting to 127.0.0.1:7002 as master
2019-06-07T18:05:53.704Z ioredis:redis status[127.0.0.1:7002]: [empty] -> wait
2019-06-07T18:05:53.704Z ioredis:delayqueue send 1 commands in failover queue
2019-06-07T18:05:53.704Z ioredis:redis status[127.0.0.1:7002]: wait -> connecting
2019-06-07T18:05:53.704Z ioredis:redis queue command[127.0.0.1:7002]: 0 -> multi([])
2019-06-07T18:05:53.705Z ioredis:redis queue command[127.0.0.1:7002]: 0 -> expire([ 'foo', '300' ])
2019-06-07T18:05:53.705Z ioredis:redis queue command[127.0.0.1:7002]: 0 -> hgetall([ 'foo' ])
2019-06-07T18:05:53.705Z ioredis:redis queue command[127.0.0.1:7002]: 0 -> exec([])
2019-06-07T18:05:53.706Z ioredis:connection error: Error: connect ECONNREFUSED 127.0.0.1:7002
2019-06-07T18:05:53.706Z ioredis:redis status[127.0.0.1:7002]: connecting -> close
2019-06-07T18:05:53.706Z ioredis:connection skip reconnecting because `retryStrategy` is not a function
2019-06-07T18:05:53.706Z ioredis:redis status[127.0.0.1:7002]: close -> end
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:6) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 7)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 9)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 10)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 11)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 12)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 13)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 14)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 15)
(node:6) UnhandledPromiseRejectionWarning: Error: Connection is closed.
    at close (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:102:25)
    at Socket.<anonymous> (/home/node/app/node_modules/ioredis/built/redis/event_handler.js:73:20)
    at Object.onceWrapper (events.js:286:20)
    at Socket.emit (events.js:198:13)
    at TCP._handle.close (net.js:606:12)
(node:6) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 16)

@jstewmon
Copy link
Contributor Author

jstewmon commented Jun 8, 2019

The number of unhandled rejections corresponds to the maxRedirections option. If I set it to 0, I get 0 unhandled rejections.

@jstewmon
Copy link
Contributor Author

jstewmon commented Jun 8, 2019

The unhandled rejections are originating here. If I change it to _this.exec().catch(err => console.error('BOOM %o', err)), I get the errors logged instead of unhandled rejection warnings.

Edit: On a whim, I tried changing that to _this.exec().catch(_this.reject), and it appears to address the unhandled rejection issue without regressing any existing tests. But, I've had a hard time understanding how the code is intended to work, so I'm not confident in suggesting that change. Hopefully, my debugging work will help identify a proper solution. 😅

luin added a commit that referenced this issue Jun 8, 2019
Pipeline#exec() is a little tricky: it has a init process when
called first time (indicated by whether Pipeline#nodeifiedPromise
is true). Transaction#exec() is similar to that, it has a init
process that parse the result from Pipeline#exec before returning
to users. However, #nodeifiedPromise is not checked here.

Closes: #883
luin added a commit that referenced this issue Jun 8, 2019
Pipeline#exec() is a little tricky: it has a init process when
called first time (indicated by whether Pipeline#nodeifiedPromise
is true). Transaction#exec() is similar to that, it has a init
process that parse the result from Pipeline#exec before returning
to users. However, #nodeifiedPromise is not checked here.

Closes: #883
@luin
Copy link
Collaborator

luin commented Jun 8, 2019

Thanks for providing the minimal reproduction, it've been a great help. I created a pr to solve the issue: #884. Still writing tests for it.

@luin luin closed this as completed in #884 Jun 8, 2019
luin added a commit that referenced this issue Jun 8, 2019
Pipeline#exec() is a little tricky: it has a init process when
called first time (indicated by whether Pipeline#nodeifiedPromise
is true). Transaction#exec() is similar to that, it has a init
process that parse the result from Pipeline#exec before returning
to users. However, #nodeifiedPromise is not checked here.

Closes: #883
ioredis-robot pushed a commit that referenced this issue Jun 8, 2019
## [4.10.2](v4.10.1...v4.10.2) (2019-06-08)

### Bug Fixes

* pipeline with transactions causes unhandled warnings ([#884](#884)) ([bbfd2fc](bbfd2fc)), closes [#883](#883)
@ioredis-robot
Copy link
Collaborator

🎉 This issue has been resolved in version 4.10.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@kunal-til
Copy link

Hi,

I am facing the same issue in ioredis@4.9.0, but I have redis sentinel rather than redis cluster on production. So will upgrading to ioredis to 4.10.2 will solved for me also?

@luin
Copy link
Collaborator

luin commented Jun 28, 2019

@kunal-til It should only happens when exec() is called multiple times, which is often the case in cluster mode since pipeline in cluster mode will retry when failed in some cases. Did you code call exec() multiple times? Is there a minimal reproduction?

@kunal-til
Copy link

@luin We are not using the pipeline in code.

@luin
Copy link
Collaborator

luin commented Jun 28, 2019

@kunal-til Then that should be a separate problem. Please create a new issue for that.

@kunal-til
Copy link

@luin Thanks for the quick response.

@abhijeetbadouriya
Copy link

abhijeetbadouriya commented Jun 28, 2019

This is error we are getting

0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.768Z ioredis:connection error: Error: connect ETIMEDOUT
0|main | 2019-06-28 17:24:13 +05:30: Error Error: connect ETIMEDOUT
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.768Z ioredis:redis status[localhost:6379]: connecting -> close
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.769Z ioredis:connection reconnect in 50ms
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.769Z ioredis:redis status[localhost:6379]: close -> reconnecting
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.769Z ioredis:connection error: Error: connect ETIMEDOUT
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.770Z ioredis:redis status[localhost:6379]: connecting -> close
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.770Z ioredis:connection skip reconnecting since the connection is manually closed.
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.770Z ioredis:redis status[localhost:6379]: close -> end
0|main | 2019-06-28 17:24:13 +05:30: errror: Error: Connection is closed.
0|main | at close (/nodeApi/node_modules/ioredis/built/redis/event_handler.js:109:25)
0|main | at Socket. (/nodeApi/node_modules/ioredis/built/redis/event_handler.js:76:20)
0|main | at Object.onceWrapper (events.js:277:13)
0|main | at Socket.emit (events.js:189:13)
0|main | at Socket.EventEmitter.emit (domain.js:441:20)
0|main | at TCP._handle.close (net.js:600:12)
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.780Z ioredis:connection error: Error: connect ETIMEDOUT
0|main | 2019-06-28 17:24:13 +05:30: Error Error: connect ETIMEDOUT
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.784Z ioredis:redis status[localhost:6379]: connecting -> close
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.784Z ioredis:connection reconnect in 50ms
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.785Z ioredis:redis status[localhost:6379]: close -> reconnecting
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.805Z ioredis:connection error: Error: connect ETIMEDOUT
0|main | 2019-06-28 17:24:13 +05:30: [ioredis] Unhandled error event: Error: connect ETIMEDOUT
0|main | at Socket. (/nodeApi/node_modules/ioredis/built/redis/index.js:270:31)
0|main | at Object.onceWrapper (events.js:277:13)
0|main | at Socket.emit (events.js:189:13)
0|main | at Socket.EventEmitter.emit (domain.js:441:20)
0|main | at Socket._onTimeout (net.js:443:8)
0|main | at ontimeout (timers.js:436:11)
0|main | at tryOnTimeout (timers.js:300:5)
0|main | at listOnTimeout (timers.js:263:5)
0|main | at Timer.processTimers (timers.js:223:10)
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.806Z ioredis:redis status[localhost:6379]: connecting -> close
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28T11:54:13.806Z ioredis:connection reconnect in 50ms
0|main | 2019-06-28 17:24:13 +05:30: 2019-06-28

janus-dev87 added a commit to janus-dev87/ioredis-work that referenced this issue Mar 1, 2024
## [4.10.2](redis/ioredis@v4.10.1...v4.10.2) (2019-06-08)

### Bug Fixes

* pipeline with transactions causes unhandled warnings ([#884](redis/ioredis#884)) ([bbfd2fc](redis/ioredis@bbfd2fc)), closes [#883](redis/ioredis#883)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants