2 years 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
2 years ago
pls reply
a year 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.
a year 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
a year 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
a year 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
a year ago
yo
a year ago
pls
a year 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.
a year 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.
a year ago
There is no redis database in the project.
https://docs.railway.app/overview/best-practices#deploying-related-services-into-the-same-project
a year ago
hi! im not sure what you mean. I do use redis in my project. could you explain more?
a year ago
I think i see my issue now, I can deploy multiple things on same project
Status changed to Solved brody • over 1 year ago