Running under MacOS I connect from the node.js application with net.Socket () to the Docker container running on the same host that contains the C ++ socket server under Centos. Docker Launch Command:
docker run -it --rm -p 14000-14010:14000-14010 -v /Users/me/Development/spdz:/spdz spdz/spdzdev
When the C ++ server in docker does not work, I see a successful connection in node, and then after 3 ms through a closed socket message.
It seems that the proxy in front of the container accepts the request, passing it to the docking station, where it is rejected. However, this leads to erroneous messages in my front-end application, which considers that the connection was successful, only to find out later that it is not.
I want a simple connection to be rejected. Any suggestions as to how this could be fixed or better understood would be helpful.
I am sure that the behavior introduced by Docker, since running components outside of Docker gives the expected immediate connection failure. I also tried to map the exported ports to an external network interface, not localhost, but to see the same behavior.
Jonathan
source share