0

I want to use Redis on AWS. And my development env is depends on Skaffold with Kubernetes.

My security group configuration is:

Inbound rules

Outbound rules

And my Redis config like that:

Redis config

I want to connect this Redis on my nodeJS app from Kubernetes pods So, my code snipped like that:

let statsQueue = new Queue('statistics', '<Primary-Endpoint-On-AWS-Redis');

But I getting this error:

         triggerUncaughtException(err, true /* fromPromise */);
          ^

Error: connect EINVAL 0.0.24.235:6379 - Local (0.0.0.0:0)
    at internalConnect (node:net:909:16)
    at defaultTriggerAsyncIdScope (node:internal/async_hooks:431:12)
    at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1055:9)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:8) {
  errno: -22,
  code: 'EINVAL',
  syscall: 'connect',
  address: '0.0.24.235',
  port: 6379
}

Why I'm getting this error? How can ı solve this?

1 Answer 1

1

The error solved with adding Redis:// from URL.

So connection like that: let statsQueue = new Queue('statistics', 'Redis://<Primary-Endpoint-On-AWS-Redis');

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.