Page 1 of 1

Server is down when enable lets encrypt

Posted: Thu Jan 19, 2017 8:17 pm
by cboursinos
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
* Restarting nginx nginx
nginx: [emerg] bind() to address:443 failed (98: Address already in use)
nginx: [emerg] bind() to address:443 failed (98: Address already in use)
nginx: [emerg] bind() to address:443 failed (98: Address already in use)
nginx: [emerg] bind() to address:443 failed (98: Address already in use)
nginx: [emerg] bind() to address:443 failed (98: Address already in use)
nginx: [emerg] still could not bind()
...fail!

netstat -tuapen | grep 443
(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 address:8443 0.0.0.0:* LISTEN 0 2379950900 -
tcp 0 0 127.0.0.2:8443 0.0.0.0:* LISTEN 0 2379950896 -
tcp 0 0 127.0.0.1:443 0.0.0.0:* LISTEN 0 2379950892 -
tcp 0 0 127.0.0.2:443 0.0.0.0:* LISTEN 0 2379950890 -
tcp 0 0 address:443 0.0.0.0:* LISTEN 0 2379950888 -
tcp 0 0 address:56977 50.31.164.148:443 TIME_WAIT 0 0 -

I got this error when trying to enable lets encrypt and all server is going down. Do you know the reason?

Re: Server is down when enable lets encrypt

Posted: Fri Jan 20, 2017 9:31 am
by mike08
Hello there,

Try stopping VestaCP and Apache

Code: Select all

service vesta stop

Code: Select all

service apache2 stop
And restart nginx

Code: Select all

service nginx restart
If you are able to bring nginx this way, then you may proceed to start vesta and apache2 since there seems to be a stucked process using that prot.

Re: Server is down when enable lets encrypt

Posted: Fri Jan 20, 2017 4:10 pm
by mehargags
when I read such threads
I feel it is worth spending $10-20 /year than risking a free Let's encrypt Certificate

Not at all ready for production use... the renewal is a pain in the ass

Unless there is a non-invasive way (without restarting Nginx/Apache) of using DNS challenge seamlessly, it is just plain risk using it for production use

Re: Server is down when enable lets encrypt

Posted: Sun Jan 22, 2017 11:10 am
by cboursinos
./letsencrypt-auto certonly --standalone -d domain
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for domain

-------------------------------------------------------------------------------
Port 443 is already in use by another process. This will prevent us from binding
to that port. Please stop the process that is populating the port in question
and try again.
-------------------------------------------------------------------------------

Re: Server is down when enable lets encrypt

Posted: Sun Jan 22, 2017 6:19 pm
by mehargags
nginx is using Port 443 for https (ssl mode).

Code: Select all

service nginx stop
then do the renewal. After it is done, don't forget to

Code: Select all

service nginx start

Re: Server is down when enable lets encrypt

Posted: Mon Jan 23, 2017 5:19 pm
by tjebbeke
Letsencrypt-auto use it own webserver. It's better to use the letsencrypt feature in vestaCP.