.internal.railway domain for one service is not working
2amfusion
PROOP

4 days ago

I have this this service deployed "embedding-service" which is not able to access through to its private networking domain embedding-service.internal.railway there are other services in the project which are accessible on their respective internal domains but only this service is not. Although its working on public domain. Can someone please guide me whats wrong with it.

Awaiting Conductor Response$20 Bounty

33 Replies

Railway
BOT

4 days ago

This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.

Status changed to Open Railway 4 days ago


Status changed to Awaiting Railway Response Railway 4 days ago


Private network domain always end with .railway.internal not .internal.railway, use reference variable to the embedded-service.RAILWAY_PRIVATE_DOMAIN so you will always the right private endpoint


mayori

Private network domain always end with `.railway.internal` not `.internal.railway`, use reference variable to the `embedded-service.RAILWAY_PRIVATE_DOMAIN` so you will always the right private endpoint

2amfusion
PROOP

4 days ago

yes i have it correct in the code embedding-service.railway.internal typo in the ticket


2amfusion

yes i have it correct in the code embedding-service.railway.internal typo in the ticket

marlonwq
FREETop 10% Contributor

4 days ago

If the domain is already correct in your code, then the issue is almost certainly how you are formatting the request regarding the port and protocol.


marlonwq
FREETop 10% Contributor

4 days ago

Public domains automatically route traffic to your app's port and handle HTTPS. Internal domains do not. You must explicitly append the port and use http:// (since internal traffic is already encrypted but doesn't use SSL certificates).


marlonwq
FREETop 10% Contributor

4 days ago

If you just try to fetch embedding-service.railway.internal, it defaults to port 80 and fails. Make sure your request looks exactly like this: http://embedding-service.railway.internal:<YOUR_APP_PORT>.


marlonwq

Public domains automatically route traffic to your app's port and handle HTTPS. Internal domains do not. You must explicitly append the port and use http:// (since internal traffic is already encrypted but doesn't use SSL certificates).

2amfusion
PROOP

4 days ago

i am simply doing python -c "import httpx; r = httpx.get('http://embedding-service.railway.internal:8000/health', timeout=5); print(r.status_code, r.text)" and its giving connection refused error


where are you executing it? in a project sandbox?


sam-a
EMPLOYEE

4 days ago

Can you confirm if you are still seeing an issue? There may have been a brief internal networking issue with this service.


Status changed to Awaiting User Response Railway 4 days ago


sam-a

Can you confirm if you are still seeing an issue? There may have been a brief internal networking issue with this service.

2amfusion
PROOP

4 days ago

still seeing error

root@488614a5a035:/app# python -c "import httpx; r = httpx.get('http://embedding-service.railway.internal:8000/health', timeout=5); print(r.status_code, r.text)"

Traceback (most recent call last):

File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 69, in map_httpcore_exceptions

yield

File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 233, in handle_request

resp = self._pool.handle_request(req)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request

raise exc from None

File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request

response = connection.handle_request(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 101, in handle_request

raise exc

File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 78, in handle_request

stream = self._connect(request)

         ^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 124, in _connect

stream = self._network_backend.connect_tcp(**kwargs)

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpcore/_backends/sync.py", line 207, in connect_tcp

with map_exceptions(exc_map):

File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit

self.gen.throw(typ, value, traceback)

File "/usr/local/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions

raise to_exc(exc) from exc

httpcore.ConnectError: [Errno 111] Connection refused

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "", line 1, in

File "/usr/local/lib/python3.11/site-packages/httpx/_api.py", line 198, in get

return request(

       ^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_api.py", line 106, in request

return client.request(

       ^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 827, in request

return self.send(request, auth=auth, follow_redirects=follow_redirects)

       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 914, in send

response = self._send_handling_auth(

           ^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth

response = self._send_handling_redirects(

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects

response = self._send_single_request(request)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_client.py", line 1015, in _send_single_request

response = transport.handle_request(request)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 232, in handle_request

with map_httpcore_exceptions():

File "/usr/local/lib/python3.11/contextlib.py", line 158, in exit

self.gen.throw(typ, value, traceback)

File "/usr/local/lib/python3.11/site-packages/httpx/_transports/default.py", line 86, in map_httpcore_exceptions

raise mapped_exc(message) from exc

httpx.ConnectError: [Errno 111] Connection refused


Status changed to Awaiting Railway Response Railway 4 days ago


mayori

where are you executing it? in a project sandbox?

2amfusion
PROOP

4 days ago

from other service console


sam-a

Can you confirm if you are still seeing an issue? There may have been a brief internal networking issue with this service.

2amfusion
PROOP

2 days ago

any thoughts?


2amfusion
PROOP

a day ago

Still seeing the issue as of July 11. The service is confirmed listening on port 8000 (verified in logs and with localhost test). Public domain works perfectly. Internal DNS timeout only happens for this specific service. This is blocking production. Need escalation to Railway's engineering team.


2amfusion

Still seeing the issue as of July 11. The service is confirmed listening on port 8000 (verified in logs and with localhost test). Public domain works perfectly. Internal DNS timeout only happens for this specific service. This is blocking production. Need escalation to Railway's engineering team.

Since the service is confirming it's listening on port 8000, responding to localhost requests only, it might be bound to 127.0.0.1 instead of 0.0.0.0, which is preventing connections from other services on the private network.

Check your application's network configuration to ensure it's listening on all interfaces.


2amfusion
PROOP

a day ago

application startup at http://0.0.0.0:8000


  1. Ensure your app is configured to listen on all interfaces by binding it to 0.0.0.0
  2. Verify that the request is formatted by http://, the correct internal domain (ending in .railway.internal), and the port.

2amfusion

application startup at http://0.0.0.0:8000

What's your current status?


2amfusion
PROOP

2 hours ago

same


h701h

1. Ensure your app is configured to listen on all interfaces by binding it to 0.0.0.0 2. Verify that the request is formatted by http://, the correct internal domain (ending in .railway.internal), and the port.

Did you verify the correct internal domain?

Ending in .railway.internal


2amfusion
PROOP

2 hours ago

yeah everything was verified, i typo in the the original post


2amfusion
PROOP

2 hours ago

service is running like

INFO: Application startup complete.

INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)


2amfusion

application startup at http://0.0.0.0:8000

This is the root cause of your issue.

Railway's private Networking (.railway.internal) operates on IPv6. By binding your app to 0.0.0.0, your service only listens to IPv4 traffic. While the service requests to fetch data via embedding-service.railway.internal

  1. Change your app's host binding from 0.0.0.0 to ::

(Use commands depending on the python ASGI/WSGI server)

  1. Once app is listening on :: , internal networking will connect smoothly

2amfusion
PROOP

2 hours ago

good catch let me test this


2amfusion

service is running like INFO: Application startup complete. INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

So you are using uvicorn(fastApi)

Just run this command: uvicorn main:app --host :: --port 8000


2amfusion

good catch let me test this

Go on. I am waiting here for you


2amfusion
PROOP

2 hours ago

Worked! Thank you, accepted your solution. Enjoy the bounty!


2amfusion

Worked! Thank you, accepted your solution. Enjoy the bounty!

Good to hear that your issue is resolved.


2amfusion

Worked! Thank you, accepted your solution. Enjoy the bounty!

Kindly mark the thread as solved


2amfusion
PROOP

an hour ago

its saying "Awaiting Conductor Response"


Just click on green resolve thread button if you see any


2amfusion

its saying "Awaiting Conductor Response"

Yes. Sam-a is the conductor for this.


h701h

Just click on green resolve thread button if you see any

2amfusion
PROOP

an hour ago

there is no green button to mark resolve, just had accept solution which I did on your comment


2amfusion

there is no green button to mark resolve, just had accept solution which I did on your comment

Do you see this button in the bottom of the chat thread?

Screenshot_2026-07-13-00-12-59-488_com.microsoft.emmx.png

Attachments


2amfusion

there is no green button to mark resolve, just had accept solution which I did on your comment

If not, Then we wait for any moderators to mark it solved.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...