javascriptnode.jsredisnode-redisioredis

how to connect to redislab using nodejs(ioredis) and why this error occuring


at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) { errno: -3004, code: 'EAI_FAIL', syscall: 'getaddrinfo', hostname: 'redis:123.redislabs.com:18094' }

how to connect with redis lab in nodejs using ioredis


Solution

  • That looks like a malformed Redis URL and not a hostname to me. If your using a URL to connect to Redis is should be like this:

    redis://123.rediabs.com:18094
    

    Hope this helps.