a year 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}
Pinned Solution
a year ago
Yep! Go to https://railway.com/account/feature-flags and enable the IPv4 feature flag.
13 Replies
a year ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 Internal Networking
- 🧵 internal networking error
- 🧵 Private Networking ECONNREFUSED
- 🧵 Postgres DATABASE_URL either invalid or internal networking is down, application connected to DB crashing
If you find the answer from one of these, please let us know by solving the thread!
a year 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 nico • 11 months ago
a year 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`
a year 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
a year 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?
a year 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}:8080 and it didn’t help connect ECONNREFUSED fd12:59f6:1207:0:1000:16:814e:cb22:8080 {"reqId":2}
a year ago
In program B, what is the IP address you are binding to?
a year 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.
a year ago
Hello
Attachments
dimon1936
Hello 
a year ago
Yep. You'll need to change that to be dual stack. Bind to :: instead of 0.0.0.0.
a year 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?
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?
a year ago
Howdy!
Did what Loudbook suggested end up resolving that?
Curious what web framework you’re using as well!
Status changed to Solved noahd • 11 months ago

