Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use

ERROR: for caddy Cannot start service caddy: driver failed programming external connectivity on endpoint tutor_local_caddy_1 (a78a533576c3b1078f50333e6f5dc1eb9b25090c25296504eb703fe77d92126c): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Hi @johansantri! When asking for support, please do the following:

  1. Mention which tutor version you are running (tutor --version)
  2. Describe the command that you are running (I’m guessing tutor local quickstart, right?)
  3. Please copy-paste the error log instead of posting screenshots. This makes it easier for other people with the same issue to find a solution.

Your problem is almost certainly related to this one: Troubleshooting — Tutor documentation

Basically, you already have a service running on port 80, so Caddy cannot start. You must figure out what is this service and stop it. In most cases, it’s either Apache or Nginx:

sudo netstat -nlptu | grep 80
sudo systemctl stop nginx
sudo systemctl stop apache
1 Like

In my case it was another docker instance running on port 80 so if you see docker-proxy when running the first command suggested by @regis then you should probably look for the service listening to this port already in docker ps.

@yaron can you tell me exactly how to stop services?

when i run netstat i get below

root@aydxbopenedx:/home/tabrezg# sudo netstat -nlptu | grep 80
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      45437/docker-proxy

but i cant run stop

root@aydxbopenedx:/home/tabrezg# systemctl stop nginx
Failed to stop nginx.service: Unit nginx.service not loaded.

below is the container which is running nginx service

a00c1a02c22a   nginx:1.19.9                      "/docker-entrypoint.…"   6 minutes ago    Up 6 minutes                      80/tcp                tutor_local_nginx_1

Hey @tabrezgoilkar
Well, in your case, stopping the nginx service requires stopping the relevant container manually (using the docker command).

I assume the service listening to port 80 is dockerized so you’ll need to stop that container and then try restarting tutor.

If you’re unsure and you can send me the full list from docker ps I’ll be able to assist you with stopping the container.

(BTW try to style it as a code, it will be more readable, thanks!)

I’m having the same error!

I’ve used ss command to see which process was listening :80 port: it’s a process called docker-proxy

What do you think i can do?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.