Details
-
Bug
-
Status: Done
-
Medium
-
Resolution: Won't Fix
-
2.4.0
-
None
-
None
-
1
-
Platform Sprint 24
-
Yes
-
Yes
Description
User Impact: User can't generate an image of the graph so it's impossible to reshare it or use in some other tools (for example in alerts )
STR:
- Go to any dashboard
- press share button
- select Image
Given result: Error message
Expected result: Working link to the image
Additional information: see https://grafana.com/blog/2020/05/07/grafana-7.0-preview-new-image-renderer-plugin-to-replace-phantomjs/ + VadimY investigation in the comments
Original report:
Getting this error when trying to view direct link rendered image.
Timeout error. You can set timeout in seconds with &timeout url parameter
You can easily reproduce this from the PMM demo link:
Sample logs:
t=2020-04-11T23:12:57+0000 lvl=info msg=Rendering logger=rendering path="d-solo/node-memory/memory-details?orgId=1&from=1586603571351&to=1586646771351&var-node_name=pmm-server&refresh=1m&var-interval=$__auto_interval_interval&var-service_name=All&var-environment=All&var-cluster=All&var-replication_set=All&var-database=&var-node_type=&var-service_type=&var-schema=&panelId=240&width=1000&height=500&tz=Asia%2FManila" t=2020-04-11T23:13:59+0000 lvl=info msg="Rendering timed out" logger=rendering t=2020-04-11T23:13:59+0000 lvl=eror msg="Timeout error. You can set timeout in seconds with &timeout url parameter" logger=context userId=1 orgId=1 uname=admin error="Timeout error. You can set timeout in seconds with &timeout url parameter" t=2020-04-11T23:13:59+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/node-memory/memory-details status=500 remote_addr=127.0.0.1 time_ms=62009 size=764 referer="http://192.168.0.7/graph/d/node-memory/memory-details?orgId=1&from=now-12h&to=now&var-node_name=pmm-server&refresh=1m" t=2020-04-11T23:20:05+0000 lvl=info msg=Rendering logger=rendering path="d-solo/node-memory/memory-details?orgId=1&from=1586603571351&to=1586646771351&var-node_name=pmm-server&refresh=1m&var-interval=$__auto_interval_interval&var-service_name=All&var-environment=All&var-cluster=All&var-replication_set=All&var-database=&var-node_type=&var-service_type=&var-schema=&panelId=240&width=1000&height=500&tz=Asia%2FManila" t=2020-04-11T23:21:07+0000 lvl=info msg="Rendering timed out" logger=rendering t=2020-04-11T23:21:07+0000 lvl=eror msg="Timeout error. You can set timeout in seconds with &timeout url parameter" logger=context userId=1 orgId=1 uname=admin error="Timeout error. You can set timeout in seconds with &timeout url parameter" t=2020-04-11T23:21:07+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/node-memory/memory-details status=500 remote_addr=127.0.0.1 time_ms=62018 size=764 referer="http://192.168.0.7/graph/d/node-memory/memory-details?orgId=1&from=now-12h&to=now&var-node_name=pmm-server&refresh=1m" t=2020-04-11T23:21:24+0000 lvl=info msg=Rendering logger=rendering path="d-solo/node-memory/memory-details?orgId=1&from=1586603571351&to=1586646771351&var-node_name=pmm-server&refresh=1m&var-interval=$__auto_interval_interval&var-service_name=All&var-environment=All&var-cluster=All&var-replication_set=All&var-database=&var-node_type=&var-service_type=&var-schema=&panelId=240&width=1000&height=500&tz=Asia%2FManila"
It never seems to complete even when increasing timeout.
The current solution for rendering this image is PhantomJS but it's deprecated already. The workaround is to use Grafana image renderer instead: https://grafana.com/docs/grafana/latest/administration/image_rendering
$ docker exec -it pmm-server bash
# grafana-cli plugins install grafana-image-renderer
# yum install libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config alsa-lib
# exit
$ docker restart pmm-server
Perhaps we can adopt this new solution or provide documentation or fix to get direct rendering via PhantomJS working on-the-fly.
Tech details:
PhantomJS will be removed in Grafana 7, so there is no option to fix it. it needs to be replaced