question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

grafana-image-renderer crashing on Centos 8

See original GitHub issue

What happened: Puppet upgraded my grafana-imagine-renderer plugin to the latest version, 3.2.1. When the grafana-server service starts it attempts to start the plugins and when this plugin fails it results in a failure of grafana as it restarts to try and load plugins.

I deploy grafana with puppet in all of my envs. I do not know exactly what version the problem started occurring on but it doesn’t seem to be just the latest version. I tested versions 3.2.0 and 3.1.0 and all had the same issue. I have this identical setup in many envs and found that my other systems (which are RHEL not Cent) had version 2.0.0 of the plugin on them and were working without issues so that is the version I installed on the problematic node and it resolved my issue and I was able to start my grafana service and load the plugin.

This is what I was seeing in my logs (note the systemd):

Oct  7 15:05:18 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:18-0400 lvl=info msg="migrations completed" logger=migrator performed=0 skipped=346 duration=891.432µs
Oct  7 15:05:18 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:18-0400 lvl=info msg="Starting plugin search" logger=plugins
Oct  7 15:05:18 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:18-0400 lvl=info msg="Registering plugin" logger=plugins id=input
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=info msg="Registering plugin" logger=plugins id=grafana-image-renderer
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=info msg="Registering plugin" logger=plugins id=grafana-polystat-panel
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=info msg="Live Push Gateway initialization" logger=live.push_http
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=info msg="Writing PID file" logger=server path=/var/run/grafana/grafana-server.pid pid=26730
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: Started Grafana instance.
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=info msg="HTTP Server Listen" logger=http.server address=127.0.0.1:3000 protocol=http subUrl= socket=
Oct  7 15:05:21 grafana-server.fqdn.com kernel: traps: plugin_start_li[26740] trap invalid opcode ip:81cedf sp:7fffd0db07d8 error:0 in plugin_start_linux_amd64[80a000+12b8000]
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: Started Process Core Dump (PID 26746/UID 0).
Oct  7 15:05:21 grafana-server.fqdn.com systemd-coredump[26747]: Removed old coredump core.plugin_start_li.989.05f1f509d3414345849eeeb8245c0972.5165.1633631082000000.lz4.
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=eror msg="Stopped background service *rendering.RenderingService" logger=server reason="Failed to start renderer plugin: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol."
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=warn msg="plugin failed to exit gracefully" logger=plugins.backend pluginId=grafana-image-renderer
**Oct  7 15:05:21 grafana-server.fqdn.com systemd-coredump[26747]: Process 26740 (plugin_start_li) of user 989 dumped core.#012#012Stack trace of thread 26740:#012#0  0x000000000081cedf n/a (/var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_amd64)**
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: systemd-coredump@852-26746-0.service: Succeeded.
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: t=2021-10-07T15:05:21-0400 lvl=eror msg="Server shutdown" logger=server error="*rendering.RenderingService run error: Failed to start renderer plugin: Unrecognized remote plugin message: \n\nThis usually means that the plugin is either invalid or simply\nneeds to be recompiled to support the latest protocol."
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: *rendering.RenderingService run error: Failed to start renderer plugin: Unrecognized remote plugin message:
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: This usually means that the plugin is either invalid or simply
Oct  7 15:05:21 grafana-server.fqdn.com grafana-server[26730]: needs to be recompiled to support the latest protocol.
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: grafana-server.service: Main process exited, code=exited, status=1/FAILURE
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: grafana-server.service: Service RestartSec=100ms expired, scheduling restart.
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 11.
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: Stopped Grafana instance.
Oct  7 15:05:21 grafana-server.fqdn.com systemd[1]: Starting Grafana instance...

What you expected to happen: The plugin to update to the latest version and start properly when called by the grafana service.

How to reproduce it (as minimally and precisely as possible): For me, it seems if I install any of the latest versions of this plugin, I immediately run into issues when restarting the grafana service.

Anything else we need to know?: Checking my system logs, the first occurrence of the systemd core dump from this plugin was today, Oct 7th, 2021 @ 13:02 EST. This was shortly after the 3.2.1 release. I was quite surprised to find that I ran into similar issues while working my way backwards through the previous two versions.

Environment:

  • Grafana Image Renderer version: Recognized problem on 3.2.1 but 3.2.0 and 3.1.0 had same issue.
  • Grafana version: Version 8.2.0 (commit: d7f71e9eae, branch: HEAD)
  • Installed plugin or remote renderer service:
installed plugins:
grafana-image-renderer @ 2.0.0
grafana-polystat-panel @ 1.2.6
  • OS Grafana Image Renderer is installed on: Centos 8.4.2105
  • User OS & Browser: Chrome
  • Others:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
AgnesTouletcommented, Oct 8, 2021

This issue is actually related to this one: https://github.com/grafana/grafana/issues/40162

The fix is similar to what is described here: https://github.com/grafana/grafana/issues/40162#issuecomment-938060240. As a temporary workaround, you can run:

systemctl edit grafana-server

And add in this line to the systemd override file that will be open in your editor:

[Service]
SystemCallFilter=
MemoryDenyWriteExecute=false

The fix for that should be included in 8.2.1.

0reactions
gsperry2011commented, Oct 8, 2021

Thanks @AgnesToulet!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image Rendering - Grafana
No information is available for this page.
Read more >
Set up image rendering | Grafana documentation
Set up image rendering. Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels...
Read more >
Troubleshooting | Grafana documentation
This page lists some tools and advice to help troubleshoot common Grafana issues. Troubleshoot with logs. If you encounter an error or problem,...
Read more >
Troubleshoot image rendering - Grafana documentation
Troubleshoot image rendering. In this section, you'll learn how to enable logging for the image renderer and you'll find the most common issues....
Read more >
Grafana failed to start after linux update (error in grafana ...
As we had the grafana-image-renderer plugin in version 2.0, I updated it to 3.3.0, ... Update 4.1-8.el7_9.x86_64 @rhel-7-server-rpms
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found