letsencrypt renew: Port 80 is already in use Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: letsencrypt renew: Port 80 is already in use

Post by Joulinar »

ok cool that we could fix it.

What is still strange that dietpi-letsencrypt did not stop your web server before renewing the certificate. That's why the port was blocked.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 16
Joined: Thu Sep 05, 2019 10:26 am

Re: letsencrypt renew: Port 80 is already in use

Post by lanznaster »

Hello again,

Im in the same situation again, but now I always get the error: "NET::ERR_CERT_DATE_INVALID"

dietpi-services stop lighttpd
certbot renew --standalone
dietpi-services start lighttpd

And no luck, even did the service lighttpd force-reload that I've did it last time with no luck.

And now I cannot try the renew again, says the certificate do not need to be renewed.

In the browser it says the date expired today, how can I check in the dir
/etc/letsencrypt/live/your-ddns.duckdns.org
, that contains the following:
cert.pem chain.pem combined.pem fullchain.pem privkey.pem

Thanks for the help once again :)
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: letsencrypt renew: Port 80 is already in use

Post by Joulinar »

which web server you are using? Because I can see nginx if I try to open the ddns your are posted below.
/etc/letsencrypt/live/your-ddns.duckdns.org
It's part if the dir name ;). But you restarted lighttpd below
dietpi-services stop lighttpd
certbot renew --standalone
dietpi-services start lighttpd
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 16
Joined: Thu Sep 05, 2019 10:26 am

Re: letsencrypt renew: Port 80 is already in use

Post by lanznaster »

Hi,

I use lighttpd, I've have never config ngix on dietpi :?

I dont understand how you end it up there :D
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: letsencrypt renew: Port 80 is already in use

Post by Joulinar »

well but this is what it tells me if I try to connect to your side. See attached picture

pls can you do following and pots the output

Code: Select all

ps -ef|grep www
Attachments
picture.png
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 16
Joined: Thu Sep 05, 2019 10:26 am

Re: letsencrypt renew: Port 80 is already in use

Post by lanznaster »

This is very strange :D

Here is the processes related to www
lightttp.PNG
When I open the url I only get the certificate error, something fishy :D
cert.PNG
I'll PM you the url, and tks for changing on my post ;)
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: letsencrypt renew: Port 80 is already in use

Post by Joulinar »

I guess you can accept the error message and continue to the website itself.

Strange that you did not have nginx running but the default web page is showing nginx. Unusual it should show default page from lighttpd :?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
lanznaster
Posts: 16
Joined: Thu Sep 05, 2019 10:26 am

Re: letsencrypt renew: Port 80 is already in use

Post by lanznaster »

I need a good certificate because I use it along wiht nextcloud, and the mobile app is not working anymore for this reason, so I think Im going to try do delete the directory /etc/letsencrypt/live/your-ddns.duckdns.org and try to recreate. Or is there another way to remove it?

And if I'll need to create via cmd, what is the command used? Do you know? I've search and found something like this:
certbot certonly --webroot -w /srv/htdocs/your-ddns.duckdns.org -d your-ddns.duckdns.org
Or should it be:
certbot certonly --webroot -w /etc/letsencrypt/live/your-ddns.duckdns.org -d your-ddns.duckdns.org
User avatar
Joulinar
Posts: 2068
Joined: Sat Nov 16, 2019 12:49 am

Re: letsencrypt renew: Port 80 is already in use

Post by Joulinar »

basically you could start dietpi-letsencrypt. That should work as well to refresh your cert. If you go for a command line, you would need to use the original file location at /etc/letsencrypt/live/your-ddns.duckdns.org. So should be more easier to use dietpi tool instead the command :)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
trendy
Posts: 122
Joined: Tue Feb 25, 2020 2:54 pm

Re: letsencrypt renew: Port 80 is already in use

Post by trendy »

This error could mean that the time is not correct. Certificates are valid from a date/time to a date/time. If the system has the wrong date/time, it will think that the certificate is invalid.
If the time is correct, check if you have an antivirus which might be checking https in its options.
Post Reply