Lando fails to start proxy

857 Views Asked by At

I am running into a weird issue with lando. My setup is

  1. windows 11 with WSL2 Ubuntu 20
  2. Docker is installed on windows 11 with WSL support
  3. Lando(3.11) is installed on Ubuntu

The problem is that when I try to start lando I would get something like

Cannot start service proxy: Ports are not available: exposing port TCP 127.0.0.1:443 -> 0.0.0.0:0: listen tcp 127.0.0.1:443: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

I have checked both windows and ubuntu and I can't find any processes that are using port 443.

I have also tried updating lando's config.yml to change the proxyHttpsPort number to 444,4433,4443,4444. none of these are working. all getting the same error.

The localhost url is still working so I can use that to do some work.

P.S. the weird thing is that if I curl the localhost url from within ubuntu, I get a connection refused error. but it's all working fine and resolving in the host machine.

1

There are 1 best solutions below

0
Funky Dude On

turns out localhost on my ubuntu was blocked somehow. ran this and it was working after a restart.

sudo iptables -A INPUT -i lo -j ACCEPT
sudo iptables -A INPUT -s 127.0.0.1 -j ACCEPT
sudo iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT