INFORMATION
Relevant information to this issue:
- auth-service
- NestJS app
- public app
- http port 3001
- db-service
- NestJS app
- private app
- http port 3000
- tcp port 4200
Both apps are up and running:
ISSUE
In auth-service env variables I created an alias to db-service host internal. I use this to communicate to the db-service from auth-service.
auth-service is a publicly exposed app that receives a requests via http, and then wants to communicate to the private db-service using TCP_DB_HOST via tcp port 4200 as shown above. When trying to do that I get ECONNREFUSED.
auth-service:
db-service:
Things that I’ve checked:
- db-service Dockerfile exposes port 3000 and 4200 on top of what is exposed in qovery
- auth-service does receive the request (I can see that in the logs)
- db-service does not receive the request (cannot see anything in the logs)
- connect to db-service with
qovery shell
and runnetstat -tln | grep 3000
andnetstat -tln | grep 4200
, both return that it’s listening on both ports - connect to auth-service with
qovery shel
and rannc -vz app-z04509040-ist-db 4200
did not return anything. Then rannc -vz app-z04509040-ist-db 3000
got response that is open - In the console settings for auth-service I also exposed the port 4200 as private with protocol TCP. Thinking that I need to ‘open’ the port in auth-service
- same setup with same env variables and http/tcp ports is working locally