Applicable to:
- Plesk Onyx for Windows
- Plesk for Windows
- Plesk for Linux
Symptoms
-
The Extensions Catalog tab shows one of the following error messages:
PLESK_WARN: error setting certificate verify locations: CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem CApath: none
PLESK_WARN: Internal server error
-
The same error may occur during Plesk update:
PLESK_INFO: STDERR: Error in cURL request: error settings certificate verify locations:
CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem
CApath: none -
A WordPress installation via the Applications menu fails with one of the following errors:
PLESK_ERROR: Error: The following error has occurred during the download of application:
HTTP Error (0) https://cdn.apscatalog.plesk.com/all-app/WordPress.org/WordPress/5.2.1-273.aps?packager=PleskPLESK_ERROR: Sharing Violation
-
Some WordPress packages can be 0 size in
%plesk_dir%var\modules\wp-toolkit\packages
-
Backup scheduler for domains at Domains > example.com > Backup Manager > Schedule may return the following error:
PLESK_INFO: Server Error
500
PleskException
error setting certificate verify locations: CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem CApath: none
Type PleskException
Message error setting certificate verify locations: CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem CApath: none
File Catalog.php
Line 83 -
Domains > example.com > Logs > Manage Log Files shows files with sizes bigger than the limit in Log Rotation. For example a file with 4Gb.
-
Running Daily Maintenance manually shows why the Daily Maintenance was failing, which is in charge of rotating logs:
C:\> C:\Users\Administrator>"%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file="" -ddisplay_errors=on "%plesk_dir%\admin\plib\DailyMaintainance\script.php" daily
error setting certificate verify locations:
CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem
CApath: none
ERROR: Zend_Http_Client_Exception: Error in cURL request: error setting certificate verify locations:
CAfile: C:\Program Files (x86)\Plesk\admin\conf\cacert.pem
CApath: none (Curl.php:455)
Cause
The cacert.pem
file located in %plesk_dir%admin\conf
is corrupted or missing.
Resolution
-
Connect to the Plesk server via RDP
-
Download the
cacert.pem
file from the curl website. -
Put the downloaded
cacert.pem
file to%plesk_dir%admin\conf
. -
Ensure that the following directives in
%plesk_dir%admin\conf\php.ini
contains a valid path to thecacert.pem
CONFIG_TEXT: curl.cainfo="C:\Program Files (x86)\Plesk\admin\conf\cacert.pem"
openssl.cafile="C:\Program Files (x86)\Plesk\admin\conf\cacert.pem"
-
Connect to the server using SSH.
-
Download the CA certificate from the official cURL website
# wget https://curl.haxx.se/ca/cacert.pem
- Replace
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
file# mv cacert.pem
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
Comments
3 comments
when call command:
wget https://curl.haxx.se/ca/cacert.pem
It return this error:
--2022-02-09 21:58:30-- https://curl.haxx.se/ca/cacert.pem
Resolviendo curl.haxx.se (curl.haxx.se)... 2a04:4e42:1d::561, 151.101.122.49
Conectando con curl.haxx.se (curl.haxx.se)[2a04:4e42:1d::561]:443... falló: No existe ninguna ruta hasta el `host'.
Conectando con curl.haxx.se (curl.haxx.se)[151.101.122.49]:443... conectado.
Petición HTTP enviada, esperando respuesta... 301 Moved Permanently
Localización: https://curl.se/ca/cacert.pem [siguiendo]
--2022-02-09 21:58:31-- https://curl.se/ca/cacert.pem
Resolviendo curl.se (curl.se)... 2a04:4e42:600::561, 2a04:4e42::561, 2a04:4e42:200::561, ...
Conectando con curl.se (curl.se)[2a04:4e42:600::561]:443... falló: No existe ninguna ruta hasta el `host'.
Conectando con curl.se (curl.se)[2a04:4e42::561]:443... falló: No existe ninguna ruta hasta el `host'.
Conectando con curl.se (curl.se)[2a04:4e42:200::561]:443... falló: No existe ninguna ruta hasta el `host'.
Conectando con curl.se (curl.se)[2a04:4e42:400::561]:443... falló: No existe ninguna ruta hasta el `host'.
Conectando con curl.se (curl.se)[151.101.194.49]:443... conectado.
ERROR: El certificado de “curl.se” no es confiable.
ERROR: El certificado de “curl.se” ha expirado.
Hello @Jordi Millan
I tried the curl command on my test server and it is working as expected. I can suggest you try to download the certificate from another server and copy it to the affected server.
The referenced file / directory does not exist on my Plesk installation:
/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
Please sign in to leave a comment.