Docker plugin update broke site during latest update

AI-generated summary

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.

The site itself is throwing an SSL error.

Anyone know what might cause this?

You probably have another webserver or reverse proxy running on the server itself and that is occupying port 443

Can you share the output of

netstat -tulpn | grep 443

Thanks for your reply @itsbhanusharma

(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 

with sudo

sudo netstat -tulpn | grep 443
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      868/nginx: master p

I’ve tried removing all plugins as suggested, and ran discourse-doctor again but it won’t build and fire up.

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.

Thank you so much @itsbhanusharma. That command, then rebuilding the app worked to get it live again. I have no idea what caused that issue.

If you didn’t install nginx on your server, You might want to do

sudo apt purge nginx*
sudo apt autoremove

To make sure nginx doesn’t start again.