Applicable to:
- Plesk for Linux
Symptoms
-
Advanced Monitoring shows the following error in Plesk on Ubuntu 18/Debian 9:
PLESK_ERROR: The tab content cannot be loaded because the Grafana service is stopped
-
The error appears on restart the service in the Plesk UI:
PLESK_ERROR: An error occured while starting the Grafana service: Execution extension has failed with exit code 1, stdout: , stderr: [2021-10-08 12:00:00.345] 20651:615feb31a720a ERR [extension/grafana] Synchronous restart of the Grafana service failed: Grafana service failed to start Grafana service failed to start
-
In attempts to start a service via CLI, an error is shown under
/var/log/syslog
andjournalctl -u grafana-server
:CONFIG_TEXT: systemd[1]: /usr/lib/systemd/system/grafana-server.service:34: Unknown lvalue 'ProtectHostname' in section 'Service'
systemd[1]: /usr/lib/systemd/system/grafana-server.service:35: Unknown lvalue 'ProtectKernelLogs' in section 'Service'
systemd[1]: /usr/lib/systemd/system/grafana-server.service:38: Unknown lvalue 'ProtectProc' in section 'Service'
Cause
The issue is caused by the Grafana bug in the new package version 8.2.0: https://github.com/grafana/grafana/issues/40162.
It has been fixed in the version 8.2.1.
Resolution
Update Grafana packages to fix the issue:
-
Go to Tools & Settings > Server Management section > System Updates and click Recheck Now.
-
Once updates are detected, click Update all.
Note: if no available updates are detected, check the grafana version package in Tools & Settings > Server Management section > System Updates > All Packages. If Grafana version is 8.2.1 - no additional actions are required.
-
Connect to the server via SSH.
-
Execute the command below to update grafana to the latest version:
# apt-get update && apt-get install grafana
Workaround that was used before the fix was released:
-
Connect to the server via SSH
-
Replace the parameters in the configuration:
# sed -i '/^ProtectHostname/d;/^ProtectKernelLogs/d;/^ProtectProc/d;/^ProcSubset/d;/^ProtectClock/d;/@system-service$/d' /usr/lib/systemd/system/grafana-server.service
-
Apply the configuration:
# systemctl daemon-reload
-
Reinstall the extension:
# plesk bin extension -u grafana
# plesk bin extension -i grafana -
Restart the service:
# systemctl restart grafana-server
Comments
2 comments
Your solution does not work as my grafana is updated and the error still shows up:
Hello Jeff,
I re-checked it in a test environment and the issue is not reproduced on Ubuntu 18.04 as the version of the Grafana package is 8.5.24 there.
Debian 9 reached its End-of-life and is not supported. If you face this issue on a server with Debian 9, consider migrating to a new server with one of the supported OSes or performing a dist-upgrade.
Please sign in to leave a comment.