2 months ago
Message:
Hello,
We are trying to connect one service to another using Railway internal networking (idcard-recognition.railway.internal).
Our setup:
Service A (backend) tries to call Service B (
idcard-recognition) on port8080.Both services are in the same Railway project and private networking is enabled.
[2025-09-24 17:39:53.760 +0000] INFO (1 on 30e018a454ea): Calling KBY-AI API endpoint: /idcard_recognition {"reqId":1}
[2025-09-24 17:39:53.916 +0000] ERROR (1 on 30e018a454ea): Error calling KBY-AI API at /idcard_recognition: connect ECONNREFUSED fd12:59f6:1207:0:1000:65:439a:6a9d:8080 {"reqId":1}
13 Replies
2 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!
2 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open itsrems • 2 months ago
2 months ago
Are you specifying the port after the private domain? You may need to call http://idcard-recognition.railway.internal:8080 instead of just http://idcard-recognition.railway.internal. This is because http defaults to port 80 so if nothing is listening on port 80 it'll return ECONNREFUSED
dev
Are you specifying the port after the private domain? You may need to call http://idcard-recognition.railway.internal:8080 instead of just http://idcard-recognition.railway.internal. This is because http defaults to port 80 so if nothing is listening on port 80 it'll return ECONNREFUSED
2 months ago
The port 8080 is open on the server side, and it is accessible via the public network and TCP proxy. However, I cannot connect to it via the internal network
dimon1936
The port 8080 is open on the server side, and it is accessible via the public network and TCP proxy. However, I cannot connect to it via the internal network
2 months ago
What are you binding to in your program B? Is it possible you're only binding to IPv4?
samgordon
What are you binding to in your program B? Is it possible you're only binding to IPv4?
2 months ago
I was directly connecting to the container's network, http://{project.RAILWAY_PRIVATE_DOMAIN}:8080
and it didn’t help
connect ECONNREFUSED fd12:59f6:1207:0:1000:16:814e:cb22:8080 {"reqId":2}
dimon1936
I was directly connecting to the container's network, http://{project.RAILWAY_PRIVATE_DOMAIN}:8080and it didn’t helpconnect ECONNREFUSED fd12:59f6:1207:0:1000:16:814e:cb22:8080 {"reqId":2}
2 months ago
In program B, what is the IP address you are binding to?
2 months ago
What web server are you using for your application? My next assumption is that it may not be dualbinding to IPv6 in which case you may need to listen on both 0.0.0.0 and ::1 or you can enable IPv4 private networks in feature flags.
dev
What web server are you using for your application? My next assumption is that it may not be dualbinding to IPv6 in which case you may need to listen on both 0.0.0.0 and ::1 or you can enable IPv4 private networks in feature flags.
2 months ago
Hello
Attachments
dimon1936
Hello
2 months ago
Yep. You'll need to change that to be dual stack. Bind to :: instead of 0.0.0.0.
2 months ago
Hello,
Our SDK currently only supports IPv4.
Railway internal networking assigns IPv6 addresses by default, which causes connection errors.
Is it possible to enable IPv4 private networking for our project, so that services can communicate internally over IPv4 instead of IPv6?
2 months ago
Yep! Go to https://railway.com/account/feature-flags and enable the IPv4 feature flag.
dimon1936
Hello,Our SDK currently only supports IPv4.Railway internal networking assigns IPv6 addresses by default, which causes connection errors.Is it possible to enable IPv4 private networking for our project, so that services can communicate internally over IPv4 instead of IPv6?
2 months ago
Howdy!
Did what Loudbook suggested end up resolving that?
Curious what web framework you’re using as well!
Status changed to Solved noahd • 2 months ago

