9 months ago
Hello! Id love to connect my node backend to redis. I can connect it over the public url but that will hold additional costs, I would like to be able to connect using the private url env variable. on my backend I added the var they told me to but it fails to connect. i use the env var REDIS_URL = ${{Redis.REDIS_URL}}
13 Replies
9 months ago
pls reply
9 months ago
I print out the redis url from node and its nothing, all my other vars are correct however. the error message states cant connect to redis, as such I printed it out.
9 months ago
I want to get the team plan but I cant get it yet as if I have to use the public url and will add egress costs
9 months ago
Please see my above message, we need an actual error message to help you debug this.
Without an error message the best I can do for you is to send you this link - https://docs.railway.app/guides/private-networking#known-configuration-requirements-for-ipv6
9 months ago
Failed to connect to redis
Error: connect ECONNREFUSED ::1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 6379
}
here u go
this is for a node express backend
9 months ago
yo
9 months ago
pls
9 months ago
The error message of ECONNREFUSED ::1:6379
indicates you have a code issue, mainly you are incorrectly using your redis config, likely incorrect syntax.
Use the correct syntax as per your client's documention, along with using environment variables.
9 months ago
hi! as I stated prior it works for the public url but not the private. I have read your docs for the private url and sleeping 10 seconds.
9 months ago
There is no redis database in the project.
https://docs.railway.app/overview/best-practices#deploying-related-services-into-the-same-project
9 months ago
hi! im not sure what you mean. I do use redis in my project. could you explain more?
9 months ago
I think i see my issue now, I can deploy multiple things on same project
Status changed to Solved brody • 8 months ago