GithubHelp home page GithubHelp logo

Comments (9)

online-stuff avatar online-stuff commented on July 27, 2024 1

I'm having this issue too and trying to figure out why..

Same error..

It is weird to be because the certificate was renewed automatically, 30 days before expiry, but it doesn't deploy it to the server..

Trying to just 'deploy' it tells me that it is the same certificate, so it doesn't need to deploy..

Trying #3 from @lovelord83..

Otherwise, good work.

The annoying part about Lets Encrypt, for me anyways, is that we have to wait 2-3 months to find out if the troubleshooting changes worked..

from certbot-zimbra.

jjakob avatar jjakob commented on July 27, 2024

You do not want to force renew every time the cronjob runs. I never had that issue or needed to use preferred-chain, so I don't know if this is completely accurate, but I suspect so: you should have to force renew just once with that preferred-chain option, after that every renewal should use the same chain. The script itself only runs certbot when you request a certificate with "-n", you can pass additional parameters to certbot with -L (this was mentioned in #140)

from certbot-zimbra.

lovelord83 avatar lovelord83 commented on July 27, 2024

Yo jjakob,

I wrote this because this happened for the 2nd time in 180days. Like I've done when first auto-renewal failed, I updated ca-certificates and forced renewal with certbot and it has been solved. So, what I suppose, is that CA expires, no matter what you do (don't know if I'm saying bulls***) because when certbot try to auto-renew certs and the deploy, that still lands to a "cat: /etc/ssl/certs/2e5ac55d.0 error". This is solved when you manually updates ca-certs + force renewal so I supposed it is a good idea to do so just when cert should be renewed, from here my idea to append those operations to deploy hook (that happens only when you really need to renew cert, and not at every crontab run).
Do you agree with it? Is this syntax correct or it is not?

from certbot-zimbra.

jjakob avatar jjakob commented on July 27, 2024

I suppose your 2nd or 3rd method would work. I'm not sure why that even happens though. Can't you make certbot remember the preferred lineage for that cert forever? Maybe you can put it in its config file in /etc/letsencrypt. I'm not sure how you'd do that.

from certbot-zimbra.

lovelord83 avatar lovelord83 commented on July 27, 2024

Just to be safe I've applied 3rd method, that replicate exactly what I had to do when auto-deploy hangs (after a correct cert renewal from certbot). I suppose this is not a big problem at last, it is a little bit annoying indeed, but if it is solvable just adding few pre-step to deploy, why not doin' so?

from certbot-zimbra.

jjakob avatar jjakob commented on July 27, 2024

It's not what everyone should be doing, because it force renews the certificate immediately after it's already renewed, it's a workaround and not a fix. It also puts more load on Letsencrypts's servers and uses up more of the account's quota.
I might do some research if it's possible to manually set the desired lineage for the cert permanently in certbot. If not, I don't want to work with certbot in the future, I'd sooner rewrite the script with acme.sh (I also need to look if anyone already made something for zimbra with acme.sh)

from certbot-zimbra.

lovelord83 avatar lovelord83 commented on July 27, 2024

Just noticed that using my code proposed before

# Replace /usr/bin/certbot with the location of your certbot binary, use this to find it: which certbot-auto certbot letsencrypt
12 5 * * * root /usr/bin/certbot renew --pre-hook "/usr/local/src/certbot-zimbra/certbot_zimbra.sh -p" --deploy-hook "/usr/sbin/update-ca-certificates; /usr/bin/certbot --force-renewal --preferred-chain "ISRG Root X1" renew; /usr/local/src/certbot-zimbra/certbot_zimbra.sh -d"

there is a problem with double quotes into --deploy-hook because opened double quote is closed on ISRG Root X1 starting double quote, and this is an error. I've tried any kind of double quote escaping, even variable substitution but I can't make it works. I preffered to separate those commands into certbot cronjob dedicating them a more flexyble and reliable approach like this:

# CA automatic renewal
0 0 */15 * * root /usr/sbin/update-ca-certificates; /usr/bin/certbot --force-renewal --preferred-chain "ISRG Root X1" renew >/dev/null 2>&1

# Replace /usr/bin/certbot with the location of your certbot binary, use this to find it: which certbot-auto certbot letsencrypt
12 5 * * * root /usr/bin/certbot renew --pre-hook "/usr/local/src/certbot-zimbra/certbot_zimbra.sh -p" --deploy-hook "/usr/local/src/certbot-zimbra/certbot_zimbra.sh -d"

Doing so you obtain CA renewal only twice a month (every current month on 15th and 30th at midnight) and certbot default script remains "untouched" so deploy-hook is not called every time (even if it should be executed only if pre-hook has a correct exit status, so @jjakob is not true that it is called every day, because it starts only when deploy starts: if everything works as intended it should be every 60 days...).

I repeat, this is not a solution, this is just a workaround fix, but while we're waiting for a complete acme rewrite or definitive issue solving, is better than nothing.

from certbot-zimbra.

Ufo28 avatar Ufo28 commented on July 27, 2024

change one string after "# Request our cert"
"$le_bin" certonly --preferred-chain "ISRG Root X1" $le_params

from certbot-zimbra.

jjakob avatar jjakob commented on July 27, 2024

Duplicate of #140

from certbot-zimbra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.