Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grafana-image-render not working in Ubuntu 20.04 and Grafana v7.1.1 (3039f9c3bd) #165

Closed
efficks opened this issue Jul 28, 2020 · 13 comments

Comments

@efficks
Copy link

efficks commented Jul 28, 2020

What happened:
I've install Grafana v7.1.1 (3039f9c3bd) on Ubuntu 20.04 LTS.
I installed grafana-image-renderer with the grafana-cli command
grafana-cli plugins install grafana-image-renderer

Restart grafana

t=2020-07-27T16:35:32-0400 lvl=info msg="Registering plugin" logger=plugins name="Grafana Image Renderer"
t=2020-07-27T16:35:32-0400 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=
t=2020-07-27T16:35:33-0400 lvl=eror msg="Failed to get browser version" logger=plugins.backend pluginId=grafana-image-renderer err=map[]

In the Grafana plugin list, the plugin is registered but marked as unsigned.
In the share panel, this message still appear
To render a panel image, you must install the Grafana Image Renderer plugin. Please contact your Grafana administrator to install the plugin.
What you expected to happen:
Be able to render a graph to png through the share panel.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Grafana Image Renderer version: 2.0.0
  • Grafana version: 7.1.1 (3039f9c3bd)
  • Installed plugin or remote renderer service: None
  • OS Grafana Image Renderer is installed on: Ubuntu 20.04 LTS
  • User OS & Browser: Windows 10 & Google Chrome
  • Others:
@mgergye
Copy link

mgergye commented Aug 28, 2020

I had the same error, but (in my case) this was not a bug, but a missing dependency (as mentioned in https://grafana.com/docs/grafana/latest/administration/image_rendering/#troubleshoot-image-rendering).
Could you please check, if all the required libs are in place?
ldd /var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome

@jagaboom
Copy link

I've also been battling with the same issue.
I managed a work-around for my particular requirement which was a Dynamic-Text_Renderer, but it was a fudge so I'm still trying to get to the bottom of this error:

Failed to get browser version" logger=plugins.backend pluginId=grafana-image-renderer err=map 

Seems like it's quite a common fault, and a possible solution for you may be found here (although it didn't fix things for me):

#149

@yuklia
Copy link

yuklia commented Sep 24, 2020

+1

@andreas-noethen
Copy link

ldd /var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome

libX11-xcb.so.1 => not found
libXss.so.1 => not found
libasound.so.2 => not found

please check if those dependencies are really needed... screensaver? sound architecture?

@mgergye
Copy link

mgergye commented Oct 1, 2020

@andreas-noethen you're issuing the ldd command literally against the chrome binary - those shared libraries are required by google chrome, not by grafana and/or grafana-image-renderer...

@SincerelyUnique
Copy link

SincerelyUnique commented Oct 5, 2020

+1 same issue
I have installed the plugin by grafana-cli and execute ldd /var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome, and restart, but when I open the grafana page and try to add a notification channel(choose Include image), it still display:

No image renderer available/installed
Grafana cannot find an image renderer to capture an image for the notification. Please make sure the Grafana Image Renderer plugin is installed.

Please contact your Grafana administrator to install the plugin.

@lazycoder-ru
Copy link

Same. The plugin was installed through cli tool, but Grafana logs that plugin is not installed.
The command "grafana-cli plugins ls" says that plugin is installed. No error messages in Grafana logs.

@dave-z34
Copy link

dave-z34 commented Dec 13, 2020

I was able to fix this issue by looking at the grafana.log and installing the following packages as follows:

sudo apt-get install libxcomposite1 libnss3 libatk-bridge2.0-0 libgtk-3-0

@marefr
Copy link
Member

marefr commented Jan 18, 2021

Running Ubuntu 20.04.1 LTS and have no problem. I had Chrome installed though.

❯ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

❯ ldd data/plugins/grafana-image-renderer/chrome-linux/chrome 
        linux-vdso.so.1 (0x00007ffe82db3000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fad47bca000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fad47ba7000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fad47b9c000)
        libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fad47a5f000)
        libX11-xcb.so.1 => /lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fad47a5a000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fad47a2e000)
        libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fad47a29000)
        libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fad47a1c000)
        libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fad47a17000)
        libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fad47a02000)
        libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fad479fa000)
        libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007fad479e6000)
        libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fad477dc000)
        libXtst.so.6 => /lib/x86_64-linux-gnu/libXtst.so.6 (0x00007fad475d6000)
        libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fad47576000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fad4744d000)
        libnss3.so => /lib/x86_64-linux-gnu/libnss3.so (0x00007fad472fe000)
        libnssutil3.so => /lib/x86_64-linux-gnu/libnssutil3.so (0x00007fad472c9000)
        libsmime3.so => /lib/x86_64-linux-gnu/libsmime3.so (0x00007fad47299000)
        libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007fad47259000)
        libcups.so.2 => /lib/x86_64-linux-gnu/libcups.so.2 (0x00007fad471be000)
        libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fad4716d000)
        libXss.so.1 => /lib/x86_64-linux-gnu/libXss.so.1 (0x00007fad47168000)
        libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fad46f85000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fad46f57000)
        libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fad46f4a000)
        libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007fad46e4f000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fad46d00000)
        libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fad46cd6000)
        libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fad46c9d000)
        libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fad46c8b000)
        libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fad46c3c000)
        libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fad46b19000)
        libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fad46ae2000)
        libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fad46331000)
        libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fad4622a000)
        libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fad46202000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fad461e7000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fad45ff5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fad51c28000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fad45fef000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fad45fe7000)
        libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007fad45fd9000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fad45f66000)
        libplc4.so => /lib/x86_64-linux-gnu/libplc4.so (0x00007fad45f5f000)
        libplds4.so => /lib/x86_64-linux-gnu/libplds4.so (0x00007fad45f5a000)
        libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fad45f0d000)
        libavahi-common.so.3 => /lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007fad45efd000)
        libavahi-client.so.3 => /lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007fad45eea000)
        libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fad45d14000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fad45cf8000)
        libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fad45c49000)
        libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fad45c43000)
        libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fad45be1000)
        libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fad45bb6000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fad45b9a000)
        libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fad45b81000)
        libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fad45b3a000)
        libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007fad45b1b000)
        libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007fad45b10000)
        libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fad45a0b000)
        libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fad45964000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fad458a5000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fad4586d000)
        libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fad45866000)
        libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fad45857000)
        libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fad4584b000)
        libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fad45718000)
        libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fad45713000)
        libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fad456cf000)
        libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fad456c4000)
        libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fad456bf000)
        libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fad456ae000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fad45694000)
        libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fad455b5000)
        libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fad45584000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fad4557d000)
        libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fad4556e000)
        libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fad45438000)
        libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fad45417000)
        libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fad45293000)
        libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fad4527d000)
        libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007fad45243000)
        libhogweed.so.5 => /lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007fad4520b000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fad45187000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fad4515e000)
        liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fad4513b000)
        libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fad4501d000)
        libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fad44fc6000)
        libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fad44f36000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fad44f2d000)
        libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fad44f21000)
        libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fad44ef4000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fad44eed000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fad44eca000)

Troubleshooting already linked, but without proof/details that you've used the troubleshooting guide and still can't get it to work we cannot help you. Will close this for now, but will consider reopen if you provide mentioned proof/details.

@marefr marefr closed this as completed Jan 18, 2021
@DennisFaucher
Copy link

DennisFaucher commented Feb 1, 2021

[EDIT: It is broken again. Ugh.]
OK. Thanks for the ideas. This is what worked for me:

@k4r1mun
Copy link

k4r1mun commented Dec 8, 2021

I still cannot make the renderer to run even though i installed all the libraries. The plugin seems to be registered but the service is not running from port 8081. Is there any way to start the service? I tried restart grafana but no change.

t=2021-12-08T13:02:41+0000 lvl=info msg="Initialising plugins" logger=plugin.manager
t=2021-12-08T13:02:41+0000 lvl=info msg="Plugin registered" logger=plugin.manager pluginId=input
t=2021-12-08T13:02:41+0000 lvl=warn msg="Permitting unsigned plugin. This is not recommended" logger=plugin.signature.validator pluginID=grafana-image-rendere
r pluginDir=/var/lib/grafana/plugins/grafana-image-renderer
t=2021-12-08T13:02:41+0000 lvl=info msg="Plugin registered" logger=plugin.manager pluginId=grafana-image-renderer
t=2021-12-08T13:02:41+0000 lvl=info msg="Live Push Gateway initialization" logger=live.push_http
t=2021-12-08T13:02:41+0000 lvl=info msg="Writing PID file" logger=server path=/run/grafana/grafana-server.pid pid=15611
t=2021-12-08T13:02:41+0000 lvl=warn msg="Scheduling and sending of reports disabled, SMTP is not configured and enabled. Configure SMTP to enable." logger=rep
ort
t=2021-12-08T13:02:41+0000 lvl=info msg="HTTP Server Listen" logger=http.server address=[::]:3000 protocol=http subUrl= socket=
t=2021-12-08T13:02:41+0000 lvl=eror msg="Failed to send request to remote rendering service" logger=rendering renderer=http error="Get "http://localhost:8081
/render/version": dial tcp 127.0.0.1:8081: connect: connection refused"

@AgnesToulet
Copy link
Contributor

@k4r1mun Hi! There are two ways of running the image renderer: plugin mode (run as a plugin by the Grafana process itself) and remote mode (run as a web server that you need to manage).

To run it in plugin mode, you need to have the plugin installed (that seems to be the case) and the rendering section in your configuration file empty:

[rendering]
# Options to configure a remote HTTP image rendering service, e.g. using https://github.com/grafana/grafana-image-renderer.
# URL to a remote HTTP image renderer service, e.g. http://localhost:8081/render, will enable Grafana to render panels and dashboards to PNG-images using HTTP requests to an external service.
server_url = 
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
callback_url = 

@k4r1mun
Copy link

k4r1mun commented Dec 8, 2021

Hi @AgnesToulet , it works! Previously I uncommented the server url but not the callback url. Thank you for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests