Issue Let's Encrypt silently fails (SQL error in log)

Discussion in 'Plesk Extensions' started by Graham, Apr 19, 2017 at 8:14 AM.

  1. Graham

    Graham New Pleskian

    0
    20%
    Joined:
    Wednesday
    Messages:
    4
    Likes Received:
    0
    Location:
    London
    Hi there,

    I'm running an ageing server with RHEL 5.11, and we've recently upgraded Plesk to 12.5. I've installed Let's Encrypt, and have version 2.0.3.

    When trying to install a certificate on any domain, Plesk simply returns to the domain list without displaying a success message.

    Upon each attempt, Plesk logs the following to /usr/local/psa/admin/logs/panel.log:

    [2017-04-18 22:20:43] ERR [1] DB query failed:

    SELECT `c`.* FROM `certificates` AS `c`

    INNER JOIN `Repository` AS `r` ON r.component_id = c.id WHERE (r.rep_id = ?)


    Error: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound

    Therefore I believe this problem to be related to some inconsistency in Plesk's database, rather than a disk permissions issue as per a similar recent thread.

    Does anyone have advice for resolving it? I can't see anything relating to these tables in Google searches.

    Thanks,
    Graham
     
  2. IgorG

    IgorG Forums Analyst Plesk Team

    43
    84%
    Joined:
    Oct 27, 2009
    Messages:
    22,948
    Likes Received:
    754
    Location:
    Novosibirsk, Russia
    Have you tried repair database with

    # plesk repair db

    at least?
     
  3. Graham

    Graham New Pleskian

    0
    20%
    Joined:
    Wednesday
    Messages:
    4
    Likes Received:
    0
    Location:
    London
    Thanks, I hadn't realised there was a suite of repair tools. I've run that and it has cleared up some issues, and Let's Encrypt is now producing its own error messages. Progress!

    For the benefit of anyone else, Let's Encrypt is now giving me this error:

    Error: Let's Encrypt SSL certificate installation failed: Invalid response from https://acme-v01.api.letsencrypt.org/acme/new-cert: Error creating new cert :: too many certificates already issued for exact set of domains: [domain list]
    Type: urn:acme:error:rateLimited.

    Essentially, a result of trying too many times in too short a period. I think I'll need to wait a week before trying this again. I'll follow-up after that.

    Thanks @IgorG.

    Graham
     
  4. Graham

    Graham New Pleskian

    0
    20%
    Joined:
    Wednesday
    Messages:
    4
    Likes Received:
    0
    Location:
    London
    Unfortunately, I think the rateLimited error I'm getting from Let's Encrypt is occurring BEFORE the Plesk one, so it's merely preventing me from getting to the Plesk SQL error. I think it was co-incidental that this new error happened after I ran the db repair. I'm still getting the original SQL error if I try to install a certificate on another domain.

    What else should I look at?
     
  5. UFHH01

    UFHH01 Platinum Pleskian Plesk Guru

    40
    64%
    Joined:
    Jun 11, 2013
    Messages:
    4,905
    Likes Received:
    1,014
    Location:
    Hamburg / Germany
  6. Graham

    Graham New Pleskian

    0
    20%
    Joined:
    Wednesday
    Messages:
    4
    Likes Received:
    0
    Location:
    London
    Cheers. I'm not so worried about the rate limit, or the certificates. The primary problem is this SQL error:

    [2017-04-18 22:20:43] ERR [1] DB query failed:

    SELECT `c`.* FROM `certificates` AS `c`

    INNER JOIN `Repository` AS `r` ON r.component_id = c.id WHERE (r.rep_id = ?)


    Error: SQLSTATE[HY093]: Invalid parameter number: no parameters were bound
     
Loading...