The issue is this. I am getting a zip file made by pyinstaller. Inside the file there is a setting making the server listen only to localhost server.add_insecure_port(f'localhost:{port_num}')
. I want to run this python file from a centos docker. Docker is running on WSL2.
So far I was able to run the docker but the issue is as follow: I can make grpcUrl calls to localhost:port from the WSL2 (in my case ubunty). But when I try to make those calls from windows cmd I get the following error:
Failed to dial target host "localhost:9111": dial tcp [::1]:9111: connectex: No connection could be made because the target machine actively refused it.
Or this Failed to dial target host "127.0.0.1:9111": dial tcp 127.0.0.1:9111: connectex: No connection could be made because the target machine actively refused it.
I have started the docker using --network="host"
hoping it can help me, but it only help ubuntu to do grpcUrl calls, but not windows.
Any help would be appriciated. Note that I cannot change localhost to 0.0.0.0...