Ioredis Node connection issue.
My connection object above
[ioredis] Unhandled error event: Error: getaddrinfo ENOTFOUND http://redis-cache-staging.railway.internal
Solution:Jump to solution
please see this for ioredis https://docs.railway.app/guides/private-networking#known-configuration-requirements-for-ipv6
30 Replies
Project ID:
13314144-b328-475d-867f-a0337164519f
13314144-b328-475d-867f-a0337164519f
I have set the family as you can see
i also have
sleep 3
in my start commandnixpacks or dockerfile?
nixpacks with the sleep command in the package.json start command
according to the redis service settings, is that host correct?
redis-cache-staging.railway.internal
Should i have the http infront ?
redis does not use http
kkk let me check. should i justhave
redis-cache-staging.railway.internal
is the redis database in the same environment as the service thats trying to connect to it
yes
are you sure the sleep 3 is being ran?
yes
how so?
![No description](https://cdn.answeroverflow.com/1214605212916908072/Screenshot_2024-03-05_at_16.07.24.png)
i have removed http:// and redeploying now to check
[ioredis] Unhandled error event: Error: connect ECONNREFUSED 127.0.0.1:6379
at node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at node_internal_exceptionWithHostPort (node:internal/errors:671:12)
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)