Back

[SOLVED] Impossible to renew SSL certificate

  • 0
  • Self Hosted
iStornZ
19 Jul, 2023, 15:54

When I try to open certificate details I see the expiration date ("Expire le" in French) is yesterday...

TL;DR
The user was having trouble renewing their SSL certificate. They checked for firewalls and possible blocking from the hosting provider. They found logs showing that SSL certificate generation was being skipped during an ACME challenge. The user tried manually generating the certificate but it failed with some challenges. They were advised to check the log file `/var/log/letsencrypt/letsencrypt.log` in the certificate container. They also mentioned upgrading to Appwrite 1.3.8 and running the migrate command. The user observed that the certificate had expired the previous day and they were seeing an `ERR_CERT_DATE_INVALID` error.
iStornZ
19 Jul, 2023, 15:58

PS: I upgraded my server dependencies to latest

Drake
19 Jul, 2023, 15:58

I tried to upgrade to Appwrite 1.3.8, then relaunch the server.

What version were you on before upgrade? And did you run the migrate command after upgrading?

When I force refresh to my website I see this window... with the error "NET::ERR_CERT_DATE_INVALID"

So you're not seeing the connection reset error anymore?

When I try to open certificate details I see the expiration date ("Expire le" in French) is yesterday

This error/warning page is expected if you don't have a valid certificate

iStornZ
19 Jul, 2023, 16:02

What version were you on before upgrade? And did you run the migrate command after upgrading? I was on 1.3.7, yes I did a migration, and see no error

So you're not seeing the connection reset error anymore? No only NET::ERR_CERT_DATE_INVALID πŸ™‚

This error/warning page is expected if you don't have a valid certificate Hum yeah, it seems regeneration of certificate failed...

Drake
19 Jul, 2023, 16:03

could you please DM me your domain?

Drake
19 Jul, 2023, 16:04

can you check this file in the certificate container?

TypeScript
/var/log/letsencrypt/letsencrypt.log
iStornZ
19 Jul, 2023, 16:04

ℹ️ New update ℹ️ I tried to run ssl certificate generation manually using docker-compose exec appwrite ssl

Here is the logs after:

TypeScript
appwrite-worker-certificates  | Appwrite certificates worker v1 has started
appwrite-worker-certificates  | [notice] Starting worker 2dfbbfa38cc2:7:v1-certificates
appwrite-worker-certificates  | [notice] Starting work on (Job{v1-certificates} | ID: 31b34d2ca3ea945502f8eda5fc35a769 | CertificatesV1 | [{"project":null,"domain":{"domain":"my-domain.com"},"skipRenewCheck":true}])
appwrite-worker-certificates  | Cannot renew domain (my-domain.com) on attempt no. 7 certificate: Failed to issue a certificate with message: Saving debug log to /var/log/letsencrypt/letsencrypt.log
appwrite-worker-certificates  | Some challenges have failed.
appwrite-worker-certificates  | Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
appwrite-worker-certificates  |
appwrite-worker-certificates  | [notice] (Job{v1-certificates} | ID: 31b34d2ca3ea945502f8eda5fc35a769 | CertificatesV1 | [{"project":null,"domain":{"domain":"my-domain.com"},"skipRenewCheck":true}]) has finished
iStornZ
19 Jul, 2023, 16:06

Hum how I can access it ? It is under the Docker volume ?

Drake
19 Jul, 2023, 16:07

nvm. the error is there in the logs you showed:

appwrite-worker-certificates | Some challenges have failed.

Drake
19 Jul, 2023, 16:07

you're replacing your actual domain from these logs right? these aren't the exact logs?

iStornZ
19 Jul, 2023, 16:07

Yes !

Drake
19 Jul, 2023, 16:09

anything in the appwrite logs?

Drake
19 Jul, 2023, 16:09

do you happen to have access logs enabled on traefik?

iStornZ
19 Jul, 2023, 16:14

What do you mean, you mean logs inside the docker container appwrite-traefik ?

iStornZ
19 Jul, 2023, 16:16

If yes, I see nothing at all inside ...

iStornZ
19 Jul, 2023, 16:20

Ok so I think this is this log you need πŸ™‚ docker-compose logs appwrite

Results:

TypeScript
appwrite  | Worker 2 started successfully
appwrite  | Worker 1 started successfully
appwrite  | Worker 3 started successfully
appwrite  | Worker 6 started successfully
appwrite  | Worker 4 started successfully
appwrite  | Worker 5 started successfully
appwrite  | Worker 7 started successfully
appwrite  | Worker 8 started successfully
appwrite  | Worker 9 started successfully
appwrite  | Worker 10 started successfully
appwrite  | Worker 11 started successfully
appwrite  | Worker 12 started successfully
appwrite  | [Setup] - Server database init started...
appwrite  | [Setup] - Creating database: appwrite...
appwrite  | [Setup] - Server database init completed...
appwrite  | Server started successfully (max payload is 6,291,456 bytes)
appwrite  | Master pid 1, manager pid 7
appwrite  | Skipping SSL certificates generation on ACME challenge.
appwrite  | Skipping SSL certificates generation on ACME challenge.
appwrite  | Skipping SSL certificates generation on ACME challenge.
Drake
19 Jul, 2023, 16:22

so it does look like appwrite is receiving the acme challenge...

Drake
19 Jul, 2023, 16:22

ok anything new in the certificates and appwrite logs?

Drake
19 Jul, 2023, 16:23

yes, but, by default, the access logs are disabled so there owuldn't be much in the logs

Drake
19 Jul, 2023, 16:31

weird....i wonder if hetzner has some block on letsencrypt 🧐

iStornZ
19 Jul, 2023, 16:33

Strange it worked fine 1 week ago ...

Drake
19 Jul, 2023, 16:37

Do you use zen or rbl or any sort of firewall or IP filtering?

Drake
19 Jul, 2023, 16:37

Letsencrypt could have been blocked between the time your certificate was last generated and it expired

iStornZ
19 Jul, 2023, 16:42

Nothing at all :/ I checked on Hetzner and I have no Firewalls...

iStornZ
20 Jul, 2023, 06:28

[SOLVED] Impossible to renew SSL certificate

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more