The Docker plugin update caused a site to break, resulting in an error message indicating that port 443 was already in use. Drew-ART tried rebuilding the app, running discourse-doctor, and removing plugins, but none of these solutions worked.
itsbhanusharma suggested that another webserver or reverse proxy might be running on the server and occupying port 443. After running netstat -tulpn | grep 443, it was confirmed that an external nginx instance was running and causing the issue.
itsbhanusharma suggested stopping the nginx service with sudo systemctl stop nginx, which allowed the app to rebuild and start successfully. Drew-ART confirmed that this solution worked.
To prevent the issue from happening again, itsbhanusharma recommended purging and removing nginx with sudo apt purge nginx* and sudo apt autoremove.
I ran the latest update. The update page 1st prompted me to update the Docker plugin. After doing so i got the message saying i’d need to rebuild the apps in the server as there was an issue with the site image, which seems to happen every 3 or 4 times i update.
In the server when trying to rebuild i get this error message:
x86_64 arch detected.
starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (83f3d2e718d3bedaac581e14f9ce21eed1c41564483523b3a7ae2a2af1baf6fe): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
Error: failed to start containers: app
If i try discourse-doctor i get a similar message:
starting up existing container
+ /usr/bin/docker start app
Error response from daemon: driver failed programming external connectivity on endpoint app (8937ea42fba161e42f9ffde7b2958bdba6212f0030aaebbebfe15a1fe69a0156): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use
Error: failed to start containers: app
Failed to restart the container.
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
Could you share your app.yml (redact any passwords & sensitive info)
In the meantime, try
sudo systemctl stop nginx
Then try rebuilding?
From what I can see, You somehow have an external nginx running on this server. Unless you’ve configured it to reverse proxy discourse, this is the cause of your failed rebuild.