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

"Rendering failed: Error: Failed to launch chrome" #159

Closed
halacs opened this issue Jun 18, 2020 · 7 comments
Closed

"Rendering failed: Error: Failed to launch chrome" #159

halacs opened this issue Jun 18, 2020 · 7 comments
Labels
type/duplicate This issue or pull request already exists

Comments

@halacs
Copy link

halacs commented Jun 18, 2020

What happened:
Alert telegram messages don't have picture. Test message have at the telegram notification channel settings page (there is a button to send test alert message).
I set log level to debug and when alert telegram message has been sent I see below messages in the log. I have installed renderer plugin with this command then restarted grafana server: grafana-cli plugins install grafana-image-renderer

te to=alerting
t=2020-06-18T22:11:40+0200 lvl=info msg=Rendering logger=rendering renderer=plugin path="d-solo/edqnwtliz/network?orgId=1&panelId=7"
t=2020-06-18T22:11:40+0200 lvl=dbug msg="Calling renderer plugin" logger=rendering renderer=plugin req="url:\"http://127.0.0.1:3000/d-solo/edqnwtliz/network?orgId=1&panelId=7&render=1\" width:1000 height:500 deviceScaleFactor:1 filePath:\"/var/lib/grafana/png/MNIkNy6hl1U74VVVJsga.png\" renderKey:\"pechLdekIdmeJQQR9SA9HHRSadEICDY7\" domain:\"127.0.0.1\" timeout:15 "
t=2020-06-18T22:11:40+0200 lvl=eror msg="Render request failed" logger=plugins.backend pluginId=grafana-image-renderer url="http://127.0.0.1:3000/d-solo/edqnwtliz/network?orgId=1&panelId=7&render=1" error="Error: Failed to launch chrome!\n/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md\n"
t=2020-06-18T22:11:41+0200 lvl=eror msg="Failed to render and upload alert panel image." logger=alerting.notifier ruleId=17 error="Rendering failed: Error: Failed to launch chrome!\n/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome: error while loading shared libraries: libX11-xcb.so.1: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md\n"
t=2020-06-18T22:11:41+0200 lvl=eror msg="Could not generate Telegram message with inline image." logger=alerting.notifier.telegram err="open : no such file or directory"

What you expected to happen:
I expected to have a graph in my telegram message grafana sent to me via telegram.

How to reproduce it (as minimally and precisely as possible):
apt install -y software-properties-common
add-apt-repository "deb https://packages.grafana.com/oss/deb stable main"
wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
apt update
apt install grafana -y
grafana-cli plugins install grafana-image-renderer
/etc/init.d/grafana-server restart
Now set telegram plugin (bot ID), a graph and an alert for it.

Anything else we need to know?:
nothing

Environment:

  • Grafana Image Renderer version: 2.0.0
  • Grafana version: v7.0.3 (00ee734baf)
  • Installed plugin or remote renderer service: local renderer
  • OS Grafana Image Renderer is installed on: Ubuntu 18.04.4 LTS
  • User OS & Browser: Firefox 77.0.1 64bit
  • Others:
@aknuds1
Copy link
Contributor

aknuds1 commented Jun 18, 2020

Duplicate of #155.

@aknuds1 aknuds1 closed this as completed Jun 18, 2020
@aknuds1 aknuds1 added the type/duplicate This issue or pull request already exists label Jun 18, 2020
@halacs
Copy link
Author

halacs commented Jun 19, 2020

@aknuds1, so you say image renderer has external dependencies, right? As far as I remember I read something in the documentation hat there is one single binary which contains everything needed.
In my sever, I don't want to install X11 but X11 related libraries are missing it seems.

Thanks for your help in advance!

/var/lib/grafana/plugins/grafana-image-renderer# ldd chrome-linux/chrome | grep 'not found'
        libX11-xcb.so.1 => not found
        libXcomposite.so.1 => not found
        libXcursor.so.1 => not found
        libXdamage.so.1 => not found
        libXfixes.so.3 => not found
        libXi.so.6 => not found
        libXrender.so.1 => not found
        libXtst.so.6 => not found
        libnss3.so => not found
        libnssutil3.so => not found
        libsmime3.so => not found
        libnspr4.so => not found
        libcups.so.2 => not found
        libXss.so.1 => not found
        libXrandr.so.2 => not found
        libasound.so.2 => not found
        libatk-1.0.so.0 => not found
        libatk-bridge-2.0.so.0 => not found
        libpangocairo-1.0.so.0 => not found
        libpango-1.0.so.0 => not found
        libcairo.so.2 => not found
        libatspi.so.0 => not found
        libgtk-3.so.0 => not found
        libgdk-3.so.0 => not found
        libgdk_pixbuf-2.0.so.0 => not found

@aknuds1
Copy link
Contributor

aknuds1 commented Jun 19, 2020

You have to install Puppeteer's dependencies, as described here.

@adiii717
Copy link

adiii717 commented May 3, 2021

Thanks Arve

Below worked for me.

grafana-cli plugins install grafana-image-renderer
yum install -y  alsa-lib.x86_64 atk.x86_64 cups-libs.x86_64 gtk3.x86_64 ipa-gothic-fonts libXcomposite.x86_64 libXcursor.x86_64 libXdamage.x86_64 libXext.x86_64 libXi.x86_64 libXrandr.x86_64 libXScrnSaver.x86_64 libXtst.x86_64 pango.x86_64 xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-cyrillic xorg-x11-fonts-misc xorg-x11-fonts-Type1 xorg-x11-utils
yum update nss -y
service grafana-server restart

@halacs
Copy link
Author

halacs commented May 3, 2021

For me this helped on Ubuntu:

apt install libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0

@shezhangzhang
Copy link

Tips: If you are using dokerfile, you need add -y to apt command:
apt install -y libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxi6 libxtst6 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0

@shezhangzhang
Copy link

shezhangzhang commented Mar 2, 2023

@aknuds1 I think we should mention this dependencies issue here: https://grafana.com/grafana/plugins/grafana-image-renderer/
This issue is still exists in March, 2023.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants