Closed yaseenyahya closed 3 years ago
Are you running inside a container?
Probably you did not mount the CacheDir into it, so every time your application starts up, no cert is found and a new one will be obtained.
Check the simplecert log file, it will tell you whether a cert was found or not.
2021/02/06 22:25:08 [ERROR] len(cert.DNSNames): [mep.api.axonmobilepk.com] != len(c.Domains): [mep.api.axonmobilepk.com mep.api.axonmobilepk.com]
2021/02/06 22:25:08 [INFO] domains have changed. Obtaining a new certificate...
2021/02/06 22:25:09 [INFO] simplecert: client creation complete
2021/02/06 22:25:09 [INFO] simplecert: set HTTP challenge
2021/02/06 22:25:09 [INFO] simplecert: set TLS challenge
2021/02/06 22:25:09 simplecert init failed: simplecert: failed to obtain cert: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates already issued for exact set of domains: mep.api.axonmobilepk.com: see https://letsencrypt.org/docs/rate-limits/, url:
2021/02/06 22:28:27 [ERROR] len(cert.DNSNames): [mep.api.axonmobilepk.com] != len(c.Domains): [mep.api.axonmobilepk.com mep.api.axonmobilepk.com]
2021/02/06 22:28:27 [INFO] domains have changed. Obtaining a new certificate...
2021/02/06 22:28:29 [INFO] simplecert: client creation complete
2021/02/06 22:28:29 [INFO] simplecert: set HTTP challenge
2021/02/06 22:28:29 [INFO] simplecert: set TLS challenge
2021/02/06 22:28:29 simplecert init failed: simplecert: failed to obtain cert: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates already issued for exact set of domains: mep.api.axonmobilepk.com: see https://letsencrypt.org/docs/rate-limits/, url:
2021/02/06 22:28:32 [ERROR] len(cert.DNSNames): [mep.api.axonmobilepk.com] != len(c.Domains): [mep.api.axonmobilepk.com mep.api.axonmobilepk.com]
2021/02/06 22:28:32 [INFO] domains have changed. Obtaining a new certificate...
2021/02/06 22:28:33 [INFO] simplecert: client creation complete
2021/02/06 22:28:33 [INFO] simplecert: set HTTP challenge
2021/02/06 22:28:33 [INFO] simplecert: set TLS challenge
2021/02/06 22:28:33 simplecert init failed: simplecert: failed to obtain cert: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates already issued for exact set of domains: mep.api.axonmobilepk.com: see https://letsencrypt.org/docs/rate-limits/, url:
thsi my log can you guide me.
problem solved my blunder mistake cfg.Domains = []string{"mep.api.axonmobilepk.com", "mep.api.axonmobilepk.com"} wrote same domain multiple times
Is this possible to use old certificate while app starts check if its expire then renew. Renewing all the time make the letsencrypt cross thier rate limit.