R
Railwayβ€’2w ago
Paddy

connectivity Testing

Hello every one, I have a seemingly very simple question which I was not able to answer for my self. Also I should say that I'm new to railway. Started using it last Week or so. I have two simple Services where service A wants to talk to service B. I saw that in an private network every service has already a dns name assigned. Therefore I created a Variable for service A with the name from service B and vice versa. The url for the request in service A look something like
`http://${process.env.name}:8000/happy
Endpoint`
`http://${process.env.name}:8000/happy
Endpoint`
for my local machine ${process.env.name} will evaluate to localhost in railway it evaluates to the name I configured (I double checked this with logs). But beside my expectation these two services can't talk to each other. I clearly missing something here. Maybe someone can explain to me the networking in Railway Private Networks. In the Docs I saw something about only Ipv6 an no Ipv4 in Private Networks but I am not sure if this is the Problem. If I were using Docker or K8 I would now try to execute commands inside the Container to check the dns and or ping the other container to check if packages reaching its destination. I hope someone can shed some Light on this as I'm fairly lost at the moment πŸ˜… Thank you in advance.
Solution:
are the two services in the same project within the same environment? if not, they need to be because that is how the private networks are scoped. is service B listening on IPv6? since it's a IPv6 only network, this is usually achieved by having the service listen on the host ::...
Jump to solution
4 Replies
Percy
Percyβ€’2w ago
Project ID: 845b8606-c58a-4950-8c12-cc01484b0da8
Paddy
Paddyβ€’2w ago
845b8606-c58a-4950-8c12-cc01484b0da8 I now got an Error from the logs
ERROR [AppController] connect ECONNREFUSED fd12:4dc4:103a::a8:271c:914c:8000
ERROR [AppController] connect ECONNREFUSED fd12:4dc4:103a::a8:271c:914c:8000
Solution
Brody
Brodyβ€’2w ago
are the two services in the same project within the same environment? if not, they need to be because that is how the private networks are scoped. is service B listening on IPv6? since it's a IPv6 only network, this is usually achieved by having the service listen on the host ::
Brody
Brodyβ€’2w ago
your error indicates that the DNS lookup was successful, meaning the services are in the same project within the same environment, but I thought id mention the first point for anyone else that may come across this thread. point two is what your issue likely is from my experience of seeing that error