Fleet can't connect to WSL2, logs say permission denied

269 Views Asked by At

When opening a new project in the WSL file space, it will prompt if I'd like to open in Windows or WSL2. When selecting WSL2 the app hangs on the connecting screen.

enter image description here

When tailing the logs I get the following output.

[20230805 22:00:52.544 INFO  FR fleet.rpc.ktor.KtorTransport] Connecting to ws://172.20.245.127:40905/ws?clientId=odsdndm447l67jtboc5m
[20230805 22:00:52.559 INFO  FR fleet.rpc.core.ConnectionLoop] Connection by <frontend ShipId(id=lqi7ig4tovmd7f5kor5h) > withKernel > frontend ShipId(id=lqi7ig4tovmd7f5kor5h) > withKernel > FleetClient connection> lost. Cause=Connection failed (ws://172.20.245.127:40905/ws?clientId=odsdndm447l67jtboc5m), Permission denied: no further information
Consider increasing logging level to DEBUG for fleet.rpc.core.ConnectionLoop
[20230805 22:00:52.559 INFO  FR fleet.rpc.core.ConnectionLoop] Reconnect by <frontend ShipId(id=lqi7ig4tovmd7f5kor5h) > withKernel > frontend ShipId(id=lqi7ig4tovmd7f5kor5h) > withKernel > FleetClient connection> attempt #25 in 30000ms

I've tried

  • re-installing fleet (with different versions)
  • re-installing new WSL2 instance
  • allowing fleet and wsl through firewall
  • checking /etc/resolv.conf and changing nameserver to 1.1.1.1 (I had to do this to get internet access for some reason)
  • checking 'Run as administrator' in jetbrains toolbox settings
1

There are 1 best solutions below

0
On

Try shutting down wsl (open cmd or powershell, then run 'wsl --shutdown') and then open a wsl workspace in fleet. Worked for me, I did not bother to figure out why.