I'm currently running an RPC (TCP) server in ubuntu (19.04) inside the WSL(2) in windows, listening to 0.0.0.0:7860
. If I run any query inside the WSL(2) itself with address 127.0.0.1:7860
it works. But, If I do the same query in Windows directly it just hangs waiting for the reply, (apparently is able to send it, although it never arrives at the server, so the server it is not able to reply back). I just need it to be able to contact it from my inner local network. I'm really confused and totally open to suggestions. Thanks for your help in advance.
1 Answer
The solution to my specific problem wasn't really difficult. To have a bit of context, WSL(2) has some issues when a process is listening to 0.0.0.0
(although I must say that a python http.server
worked). I simply make the server listen to the specific IP reported in ifconfig
=> 192.168.42.1
, and then I connected to the same address from the client.
0.0.0.0
, listening to the specific IP that can be got inifconfig
solve the problem. Is some common misbehave that happens there according to some documentation I found. There are some configuration to make it work, but for my specific case it was simpler to just listen to the local ip (Since I do not really want to listing to outer connections). Ill post an answer shortly, so in case someone have the same issue have an example here.