Internal networking is not working
kulterryan
PROOP

5 months ago

Internal Service URL is not working and returning DNS Exception.

Solved$10 Bounty

Pinned Solution

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

Railway
BOT

5 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!


kulterryan
PROOP

5 months ago

PFA. Screenshot of error. We have to switch to public URLs to make it work.

Attachments


uxuz
MODERATOR

5 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.


kulterryan
PROOP

5 months ago

It's a redis instance and i'm using this URL: `${{queue-kv.REDIS_URL}}`.


phoenixauro
HOBBY

5 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}}`.

uxuz
MODERATOR

5 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.

kulterryan
PROOP

5 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.

kulterryan
PROOP

5 months ago

tried this as well but it was not working


kulterryan

tried this as well but it was not working

uxuz
MODERATOR

5 months ago

Please provide a snippet of your code.


uxuz

Please provide a snippet of your code.

kulterryan
PROOP

5 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, });

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,});

kulterryan
PROOP

5 months ago

let me try this as well!


kulterryan

let me try this as well!

uxuz
MODERATOR

5 months ago

Hey, did you solve the problem?


clashing
HOBBY

5 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

clashing
HOBBY

5 months ago

Any update, kulterryan


Status changed to Solved chandrika 4 months ago


Loading...