I have the web application which is running on the docker container and that one must send requests to my local machine (localhost) and when I'm trying to do that I get the following exception:
java.util.concurrent.ExecutionException: java.net.ConnectException: Connection refused: localhost/127.0.0.1:9033
I'm trying to give you some more details. I looked at this post but it does not work for me.
First of all, I want to explain my project's structure:
1. I have a project that consist of two parts: frontend (angular 9) and backend (play 2.8.x framework)
2. I have another one project (web-service)
My first projects (backend, frontend) are placing in the docker container and the second (web-service) is placing at the localhost. I have the following flow between these projects:
1. The user sends a request (from the web browser) to the backend it may be login request for instance.
2. The backend process this request (retrieve data from the database) and sends these data to the web-service which is placing on the localhost.
and I have a problem with step 2 where I trying to send data to the web-service. I'm getting the exception which was writing above.
I'm trying to set --network=host
but in this case, I get 404 status code
in the browser.
How can I solve this issue?