Symptoms
-
Plesk is installed on Ubuntu server
-
Advanced Monitoring extension displaying the following error:
PLESK_ERROR: Could not check if Advanced Monitoring was installed correctly: Execution extension has failed with exit code 127, stdout: , stderr: /opt/psa/admin/sbin/modules//grafana/grafana-cli: line 2: /usr/sbin/grafana-cli: No such file or directory
-
“Advanced Monitoring” extension and and Grafana are installed:
# plesk bin extension –list | grep -E “grafana|monitoring”
grafana – Grafana
monitoring – Advanced Monitoring -
The file
/usr/sbin/grafana-cli
is missing:# ls -lha /usr/sbin/grafana-cli
ls: cannot access ‘/usr/sbin/grafana-cli’: No such file or directory -
Grafana package is not installed:
# dpkg –list | grep grafana
(Empty Output) -
The following error can be found:
# python2 -c 'import urllib2 ; print urllib2.urlopen("https://packages.grafana.com/gpg.key").read()'
. . .
urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Cause
Broken CA certificates configuration on OS level caused by Ubuntu bug with ID 396818
Resolution
-
Connect to the server via SSH
-
Move
/usr/lib/ssl
directory:# mv /usr/lib/ssl /usr/lib/ssl_old
-
Reinstall CA certificates:
# apt-get install --reinstall openssl ca-certificates
-
Ensure that the certificate can be obtained without any errors:
# python2 -c 'import urllib2 ; print urllib2.urlopen("https://packages.grafana.com/gpg.key").read()'
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFiHXVIBCADr3VDEAGpq9Sg/xrPVu1GGqWGXdbnTbbNKeveCtFHZz7/GSATW
... -
Reinstall Grafana extension:
# plesk bin extension –uninstall grafana
# plesk bin extension –install grafana -
Verify Grafana package was installed successfully:
# dpkg –list | grep grafana
ii grafana 6.3.6 amd64 Grafana -
Log in to Plesk GUI
-
Go to Advanced Monitoring
In case the following error message is shown, click on Fix installation:
PLESK_ERROR: The grafana-simple-json-datasource plugin is not installed.