LetsEncrypt Certificate is not renewed -> revokation seems to fail

  • Hello there,



    i had a certificate for my services (FTP, Mail etc). This certificate endet on 21.05.2017.
    I tried to manually renew it. There weren't any errors, but the end-Date of the certificate showed up "21.05.".
    The LetsEncrypt Log itself said "the renew configuration ist invalid" so i tried to remove the certificate (revoke) to create a new one.


    The creation failed and the frontend shows "there are technical problems, we will try it later" but now im waiting about 30 minutes and there are no pending actions in the debugger interface (also no erros, yes debug = 1)


    The LetsEncrypt Plugin Log:

    Code
    1. [Thu May 25 08:21:56 2017] [debug] Modules::Plugin::_call: Executing run() action on Plugin::LetsEncrypt[Thu May 25 08:21:56 2017] [debug] iMSCP::Service::__ANON__: Systemd init system has been detected[Thu May 25 08:21:56 2017] [debug] iMSCP::Execute::execute: /bin/systemctl --system is-active apache2.service[Thu May 25 08:21:56 2017] [debug] iMSCP::Provider::Service::Sysvinit::_exec: active[Thu May 25 08:21:56 2017] [debug] Plugin::LetsEncrypt::run: Executing `todelete' tasks for the `web01.srv.fluxter.net' SSL certificate[Thu May 25 08:21:56 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto revoke --quiet --agree-tos --email [email protected] --reason unspecified --cert-path /etc/letsencrypt/live/web01.srv.fluxter.net/cert.pem[Thu May 25 08:21:59 2017] [debug] Plugin::LetsEncrypt::_deleteLineages: Deleting any SSL certificate lineage matching the web01.srv.fluxter.net domain name[Thu May 25 08:21:59 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0005[Thu May 25 08:22:00 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0003[Thu May 25 08:22:02 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0002[Thu May 25 08:22:03 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0006[Thu May 25 08:22:05 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net[Thu May 25 08:22:06 2017] [debug] iMSCP::Execute::getExitCode: Command exited with value: 1[Thu May 25 08:22:06 2017] [error] Plugin::LetsEncrypt::run: pending


    The LetsEncrypt Log

    Is there any way to solve this issue, are there more information available?


    i-MSCP: v1.4.3
    LetsEncrypt: 3.1.0

  • @Levitas


    There is a bug in current version. Cron tasks are not registered on i-MSCP reconfiguration/upgrade. Please could you provide the content of your current /etc/cron.d/imscp configuration file?

    I tried to manually renew it. There weren't any errors, but the end-Date of the certificate showed up "21.05.".
    The LetsEncrypt Log itself said "the renew configuration ist invalid" so i tried to remove the certificate (revoke) to create a new one.

    And now this is a mess because you acted before asking us... You shouldn't renew SSL certificates manually. Executing certbot outside of the plugin context can lead to such problems. The error from your letsencrypt.log file means that one file is missing, hence the failure.


    Worse:

    • [Thu May 25 08:21:59 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0005
    • [Thu May 25 08:22:00 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0003
    • [Thu May 25 08:22:02 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0002
    • [Thu May 25 08:22:03 2017] [debug] iMSCP::Execute::execute: /usr/local/sbin/certbot-auto delete --cert-name web01.srv.fluxter.net-0006

    Those lines mean that there was different lineages for the same SSL certificate. This shouldn't occurs normally with our plugin because we are acting always on the same lineage. You should really avoid to run certbot manually...


    Thank you.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • I meant the manual renew in the panel. There is a button for that :)


    // Edit
    For this domain I created the certificate before the imscp provided service ssl in the letsencrypt plugin etc.
    Probably this could be a problem?


    The cron.d imscp file

  • @Levitas


    Ok. So the cron task are missing. I'll release a new LetsEncrypt plugin version in next hour.


    For your current problem please try the folllowing:


    Shell-Script
    1. # rm -Rf /etc/letsencrypt/{archive,live}/web01.srv.fluxter.net# rm -f /etc/letsencrypt/renewal/web01.srv.fluxter.net.conf


    Then, once done:


    Shell-Script
    1. # mysql
    2. > use imscp;
    3. > DELETE FROM letsencrypt WHERE domain_name = 'web01.srv.fluxter.net';
    4. > \q


    Once done, try to re-enable Let's Encrypt.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Now i've reached the limit. In the last 2 hours there were only 2 certificates.
    Probably a loop...?

    No, there is no loop but the limit is based on the root domain name which here is fluxter.net. This means that if in the last week you have made ssl issuances for that domain or subdomains of that domain, the limit can have been reached.


    Now, there is many limits. You don't say us what is the limit that has been reached.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • # Traffic accounting
    0,30 * * * * root perl nice -n 10 ionice -c2 -n5 /var/www/imscp/engine/traffic/imscp-srv-traff > /var/log/imscp/imscp-srv-traff.log 2>&1
    0,30 * * * * root perl nice -n 10 ionice -c2 -n5 /var/www/imscp/engine/traffic/imscp-vrl-traff > /var/log/imscp/imscp-vrl-traff.log 2>&1

    You should also fix the bugs there, awaiting for next i-MSCP version.


    Should be:

    Code
    1. # Traffic accounting
    2. 0,30 * * * * root nice -n 10 ionice -c2 -n5 perl /var/www/imscp/engine/traffic/imscp-srv-traff > /var/log/imscp/imscp-srv-traff.log 2>&1
    3. 0,30 * * * * root nice -n 10 ionice -c2 -n5 perl /var/www/imscp/engine/traffic/imscp-vrl-traff > /var/log/imscp/imscp-vrl-traff.log 2>&1

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206