Bind for 0.0.0.0:443 failed: port is already allocated

Forums are down since rebuild failed during the upgrade (var/discourse/launcher rebuild app).

I tried the solution from here. The Following solution did not work.

systemctl stop docker
rm -rf /var/lib/docker/network/files
systemctl start docker

/usr/bin/docker: Error response from daemon: driver failed programming external connectivity on endpoint app (db53): **Bind for 0.0.0.0:443 failed: port is already allocated**.

# netstat -tulpen | grep 443
tcp6       0      0 :::443                  :::*                    LISTEN      0          488127     30700/docker-proxy  

# docker ps

1d8b7461b27d        local_discourse/import   "/sbin/boot"        6 weeks ago         Up 9 minutes        0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   import

What else can I do to get the forums back online?

Thanks in advance.

1 Like

[Solution]

  1. Update the Docker Container
  2. Stop the Container
  3. Run rebuild

I missed step 1 and 2. Because the instructions on the UI said to only to run step 3 using the console.

  1. To update the Docker Container
apt-get update
apt-get dist-upgrade lxc-docker
  1. Stop the Docker Container
docker container ps
docker stop containerID
  1. Manual Upgrade of Docker Container
cd /var/discourse/
git pull
./launcher rebuild app

You may have to run the launcher twice.

Reason for Error “bind was already in use”>> Trying to upgrade the discourse while container is running.

I hope this helps someone.

5 Likes

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