7 months ago
Internal Service URL is not working and returning DNS Exception.
Pinned Solution
7 months ago
If you’re using ioredis on Railway with private networking, this config works for me:
export const queue_kv = new Redis(process.env.REDIS_QUEUE_URL, {
family: 0,
maxRetriesPerRequest: null,
enableOfflineQueue: true,
});
15 Replies
7 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
7 months ago
PFA. Screenshot of error. We have to switch to public URLs to make it work.
Attachments
7 months ago
Hey, can you show a snippet of how you are accessing your service via private networking? The service that is being accessed via private networking has to listen on IPv6 and has to be referenced with http://${{service.RAILWAY_PRIVATE_DOMAIN}}:${{service.PORT}}, with service being the service's name.
7 months ago
It's a redis instance and i'm using this URL: `${{queue-kv.REDIS_URL}}`.
7 months ago
If your services are in different projects the internal url will not work, you need to use a public one.
kulterryan
It's a redis instance and i'm using this URL: `${{queue-kv.REDIS_URL}}`.
7 months ago
In this case, please check out https://docs.railway.com/reference/errors/enotfound-redis-railway-internal, setting the family option to 0 should solve the problem.
phoenixauro
If your services are in different projects the internal url will not work, you need to use a public one.
7 months ago
all of my services are in the same project only.
uxuz
In this case, please check out https://docs.railway.com/reference/errors/enotfound-redis-railway-internal, setting the family option to 0 should solve the problem.
7 months ago
tried this as well but it was not working
kulterryan
tried this as well but it was not working
7 months ago
Please provide a snippet of your code.
uxuz
Please provide a snippet of your code.
7 months ago
Queue KV:
export const queue_kv = new Redis(`${process.env.REDIS_QUEUE_URL}?family=0`, {
maxRetriesPerRequest: null,
enableOfflineQueue: true,
offlineQueue: true,
});kulterryan
Queue KV:export const queue_kv = new Redis(`${process.env.REDIS_QUEUE_URL}?family=0`, { maxRetriesPerRequest: null, enableOfflineQueue: true, offlineQueue: true, });
7 months ago
If you’re using ioredis on Railway with private networking, this config works for me:
export const queue_kv = new Redis(process.env.REDIS_QUEUE_URL, {
family: 0,
maxRetriesPerRequest: null,
enableOfflineQueue: true,
});
sanjeev-kumar78
If you’re using ioredis on Railway with private networking, this config works for me:export const queue_kv = new Redis(process.env.REDIS_QUEUE_URL, {family: 0,maxRetriesPerRequest: null,enableOfflineQueue: true,});
7 months ago
let me try this as well!
7 months ago
kulterryan, it's basically an issue that arises when you try to use the INTERNAL URL (which is meant to be used in Railway environment only) outside of Railway (most probably on your local machine). You can refer to this post to get more hold on this issue: https://station.railway.com/questions/backend-service-unable-to-connect-to-pos-22ad5b8c#kjs0
Do let me know if the helps
clashing
kulterryan, it's basically an issue that arises when you try to use the INTERNAL URL (which is meant to be used in Railway environment only) outside of Railway (most probably on your local machine). You can refer to this post to get more hold on this issue: https://station.railway.com/questions/backend-service-unable-to-connect-to-pos-22ad5b8c#kjs0Do let me know if the helps
7 months ago
Any update, kulterryan
Status changed to Solved chandrika • 5 months ago
