ECONNREFUSED when requesting to an endpoint of an Adonis js API #1554
-
I have 2 Dockerized Adonis JS API app running on my local. When I request the API on the browser or postman it responds properly. What could be the problem here? Why cant APP1 request to APP2? while browsers and postman can? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
So this wasn't exactly an adonisjs problem, The complete explanation is here https://stackoverflow.com/a/40091406/10020611. So the problem was that my two docker container is not sharing same network. once i got the network name, type this command to see the network details of your app That would show you the details of your network:
I used the Gateway IP and added the port and was able to access the other dockerized app. |
Beta Was this translation helpful? Give feedback.
So this wasn't exactly an adonisjs problem,
The complete explanation is here https://stackoverflow.com/a/40091406/10020611.
So the problem was that my two docker container is not sharing same network.
First step I did is to identify the network name of my dockerized app using this command
docker network ls
once i got the network name, type this command to see the network details of your app
docker network inspect networkname
That would show you the details of your network: