Discourse rebuild fails with port 443 in use

Yesterday discourse stopped working, when you try to run the command

/var/discourse# ./launcher rebuild app is an error.

Error response from daemon: driver failed programming external connectivity on endpoint app (fc5fe43d9a3baadebc8c50fe62b740c08a65fe197697f6fb10e010541e390474): Error starting userland proxy: listen tcp 0.0.0.0:443: bind: address already in use.

http://pastebin.com/TB8gzv5p

My app.yml
http://pastebin.com/WNp5tMk7

When trying to enter the site, I get the error “SEC_ERROR_EXPIRED_CERTIFICATE”

1 Like

Is it related to Let’s Encrypt issues?

Yes, Let’s Encrypt said that the certificate is completed

Your certificate (or certificates) for the names listed below will expire in 9 days (on 29 Nov 16 04:54 +0000). Please make sure to renew your certificate before then, or visitors to your website will encounter errors.

I tried to update the team
root@user:/var/discourse# rm -rf /var/discourse/shared/standalone/ssl
root@user:/var/discourse# rm -rf /var/discourse/shared/standalone/letsencrypt
root@user:/var/discourse# ./launcher rebuild app

I tried to update it with the command
But it didn’t help(

You have something using the 443 port on the host. Please remove it and try again.

netstat -tulpn | grep 443
2 Likes

Here’s the result

How can I remove it?

sudo apt remove nginx

Why did you install nginx on the host? If you installed it by accident it may be safe to remove.

Now here’s a line, but the site is not working.

Did you rebuild after removing outside nginx?

First I removed nginx, then this command /var/discourse# ./launcher rebuild app
discourse and not working(

First, like I said:

If you installed it by accident it may be safe to remove.

Looking again trough your pastebin:

  1. Your SMTP user & password is there, please remove

  2. You were setting Discourse to a higher port, so you were using nginx to host anything else right? So you shouldn’t remove the outside nginx

  3. IF you are running a reverse proxy outside the docker container, you can’t use the Let’s Encrypt template inside the docker container. You must get SSL in another way.

Thank You))) Understood))
After removing Nginx
in the yml file changed - “25654:80” # http 80:80

3 Likes

@Falco I have been having issues with port 443 and Let’s Encrypt as well probably due to the fact that I unintentionally installed Discourse behind nginx following the instruction here.

Is there a way to safely reverse this process? Sorry I am not a professional programmer. :confused:

This topic was automatically closed after 2746 days. New replies are no longer allowed.