Open koelle25 opened 4 months ago
the same for me, i just updated the plugin from 3.11.0 to 3.11.1, i got the same issue. OS : Centos 8
Hello! I wasn't able to reproduce it on Ubuntu 20.04. Could you enable more logging to help me understand the issue?
You can update the following settings to have more logs on start-up:
[plugin.grafana-image-renderer]
rendering_verbose_logging = true
rendering_dumpio = true
[log]
level=debug
This is with debug logging enabled:
Directly after service start:
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.235455027+02:00 level=debug msg="Setting chromeBin to /home/idial/icinga2/grafana-plugins/grafana-image-renderer_3.11.1/chrome/linux-128.0.6597.0/chrome-linux64/chrome"
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.238606939+02:00 level=debug msg="Browser initialized" config="map[args:[--no-sandbox --disable-gpu] chromeBin:/home/idial/icinga2/grafana-plugins/grafana-image-renderer_3.11.1/chrome/linux-128.0.6597.0/chrome-linux64/chrome clustering:map[maxConcurrency:5 mode:browser monitor:false timeout:30] deviceScaleFactor:1 dumpio:true emulateNetworkConditions:false headed:false height:500 ignoresHttpsErrors:false maxDeviceScaleFactor:4 maxHeight:3000 maxWidth:3000 mode:default pageZoomLevel:1 timingMetrics:false verboseLogging:false width:1000]"
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.280660299+02:00 level=debug msg="chrome_crashpad_handler: --database is required"
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.282079551+02:00 level=debug msg="Try 'chrome_crashpad_handler --help' for more information."
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.282791358+02:00 level=debug msg="[3526327:3526327:0717/133919.282542:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)"
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.432299405+02:00 level=error msg="Failed to get browser version" err=map[]
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.436334729+02:00 level=debug msg="using plugin" version=2
After a render request:
logger=rendering renderer=plugin t=2024-07-17T13:44:32.853553465+02:00 level=info msg=Rendering path="d-solo/Pcey9Axiz/icinga2-default?var-hostname=sems.vms.idial.fh&var-service=apt&var-command=apt&panelId=1&orgId=1&width=640&height=320&theme=light&from=now-6h&to=now" userID=4
logger=rendering renderer=plugin t=2024-07-17T13:44:32.860598068+02:00 level=debug msg="Calling renderer plugin" req="url:\"http://localhost:3000/d-solo/Pcey9Axiz/icinga2-default?var-hostname=sems.vms.idial.fh&var-service=apt&var-command=apt&panelId=1&orgId=1&width=640&height=320&theme=light&from=now-6h&to=now&render=1\" width:640 height:320 deviceScaleFactor:1 filePath:\"/storage/grafana/png/Af4F0hda7mDlKnGuZevy.png\" renderKey:\"OCcOepKfJfkdEmb99AHDFsgecjjydtkz\" domain:\"localhost\" timeout:60 authToken:\"-\" encoding:\"png\""
logger=plugin.grafana-image-renderer t=2024-07-17T13:44:32.866667187+02:00 level=debug msg="Render request received" url="http://localhost:3000/d-solo/Pcey9Axiz/icinga2-default?var-hostname=sems.vms.idial.fh&var-service=apt&var-command=apt&panelId=1&orgId=1&width=640&height=320&theme=light&from=now-6h&to=now&render=1"
logger=plugin.grafana-image-renderer t=2024-07-17T13:44:32.888890849+02:00 level=debug msg="chrome_crashpad_handler: --database is required"
logger=plugin.grafana-image-renderer t=2024-07-17T13:44:32.88937929+02:00 level=debug msg="Try 'chrome_crashpad_handler --help' for more information."
logger=plugin.grafana-image-renderer t=2024-07-17T13:44:32.889971804+02:00 level=debug msg="[3528378:3528378:0717/134432.889675:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)"
logger=plugin.grafana-image-renderer t=2024-07-17T13:44:33.042594291+02:00 level=error msg="Render request failed" url="http://localhost:3000/d-solo/Pcey9Axiz/icinga2-default?var-hostname=sems.vms.idial.fh&var-service=apt&var-command=apt&panelId=1&orgId=1&width=640&height=320&theme=light&from=now-6h&to=now&render=1" error="Error: Failed to launch the browser process!\nchrome_crashpad_handler: --database is required\nTry 'chrome_crashpad_handler --help' for more information.\n[3528378:3528378:0717/134432.889675:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)\n\n\nTROUBLESHOOTING: https://pptr.dev/troubleshooting\n"
logger=context userId=4 orgId=1 uname=sa-1-autogen-1-icinga2 t=2024-07-17T13:44:33.04909176+02:00 level=error msg="Rendering failed." error="rendering failed: Error: Failed to launch the browser process!\nchrome_crashpad_handler: --database is required\nTry 'chrome_crashpad_handler --help' for more information.\n[3528378:3528378:0717/134432.889675:ERROR:socket.cc(120)] recvmsg: Connection reset by peer (104)\n\n\nTROUBLESHOOTING: https://pptr.dev/troubleshooting\n"
logger=context userId=4 orgId=1 uname=sa-1-autogen-1-icinga2 t=2024-07-17T13:44:33.050074942+02:00 level=error msg="Request error" error="Context.HTML - Error rendering template: error. You may need to build frontend assets \n template: error:16:42: executing \"error\" at <.Assets.Dark>: can't evaluate field Assets in type struct { Title string; AppTitle string; AppSubUrl string; ThemeType string; ErrorMsg error }" stack="github.com/grafana/grafana/pkg/web/context.go:112 (0x74e8064)\ngithub.com/grafana/grafana/pkg/services/contexthandler/model/model.go:54 (0x74f3328)\ngithub.com/grafana/grafana/pkg/api/render.go:106 (0xa44612a)\ngithub.com/grafana/grafana/pkg/api/response/web_hack.go:40 (0x74f94af)\nnet/http/server.go:2166 (0x74e90f8)\ngithub.com/grafana/grafana/pkg/web/macaron.go:131 (0x74e90b5)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/services/contexthandler/contexthandler.go:141 (0xa4505f4)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/render.go:44 (0x74e9c0b)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x74e9194)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/middleware/csrf/csrf.go:66 (0x98f45af)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/middleware/recovery.go:180 (0xa428ffd)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/middleware/loggermw/logger.go:72 (0x98f553e)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/middleware/request_metrics.go:75 (0x82b19ed)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/middleware/request_tracing.go:88 (0xa429d75)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/middleware/requestmeta/request_metadata.go:66 (0xa44f6e1)\nnet/http/server.go:2166 (0x623f028)\ngithub.com/grafana/grafana/pkg/web/context.go:52 (0x74e79fa)\ngithub.com/grafana/grafana/pkg/web/router.go:155 (0x74eb3ed)\ngithub.com/grafana/grafana/pkg/web/router.go:221 (0x74ebf14)\ngithub.com/grafana/grafana/pkg/web/macaron.go:163 (0x74e95dc)\nnet/http/server.go:3137 (0x624272d)\nnet/http/server.go:2039 (0x623da07)\nruntime/asm_amd64.s:1695 (0x5ee74c0)\n"
logger=context userId=4 orgId=1 uname=sa-1-autogen-1-icinga2 t=2024-07-17T13:44:33.050285367+02:00 level=error msg="Request Completed" method=GET path=/render/d-solo/Pcey9Axiz/icinga2-default status=500 remote_addr=127.0.0.1 time_ms=211 duration=211.36366ms size=351 referer= handler=/render/* status_source=server
Note that /storage/grafana/plugins/
is actually a symlink to /home/idial/icinga2/grafana-plugins/
. But this shouldn't be a problem, as is worked with any version before.
Looking through the log myself, could it be this?
template: error:16:42: executing \"error\" at <.Assets.Dark>: can't evaluate field Assets in type struct { Title string; AppTitle string; AppSubUrl string; ThemeType string; ErrorMsg error }
These are the debug logs with 3.11.0 plugin:
The same thing is happening for us: OS: debian 12 Grafana Version: 11.0.1
Same issue. Downgraded from 3.11.1 to 3.11.0 then it worked....
also happens to my environment (debian 12, grafana 11.1.0, grafana-image-renderer 3.11.1). the relevant log entries:
logger=plugin.grafana-image-renderer t=2024-07-24T17:25:29.526799745+02:00 level=debug msg="Browser initialized" config="map[args:[--no-sandbox --disable-gpu] chromeBin:/var/lib/grafana/plugins/grafana-image-renderer/chrome/linux-128.0.6597.0/chrome-linux64/chrome clustering:map[maxConcurrency:5 mode:browser monitor:false timeout:30] deviceScaleFactor:1 dumpio:false emulateNetworkConditions:false headed:false height:500 ignoresHttpsErrors:false maxDeviceScaleFactor:4 maxHeight:3000 maxWidth:3000 mode:default pageZoomLevel:1 timingMetrics:false verboseLogging:true width:1000]" logger=plugin.grafana-image-renderer t=2024-07-24T17:25:29.572094052+02:00 level=error msg="Failed to get browser version" err=map[] logger=plugin.grafana-image-renderer t=2024-07-24T17:25:29.574639913+02:00 level=debug msg="using plugin" version=2
dependencies are all installed. Output of ldd shows no missing libraries:
ldd /var/lib/grafana/plugins/grafana-image-renderer/chrome/linux-128.0.6597.0/chrome-linux64/chrome
I can confirm that the issue was introduced in 3.11.1. Downgrading to 3.11.0 resolves it.
Same issue for me, Even if manual install the libX..... My OS is Ubuntu 22.04 Jammy with Grafana v9.5.2. Downgrade to grafana-image-renderer-3.11.0 is work for me. I use manual download zip way to install grafana-image-renderer due to private network.
We had this same issue and reverted and all is working again.
Hi! Sorry for the delay, I wasn't able to reproduce the issue both on Ubuntu 20.04 and Ubuntu 22.04 (through WSL though).
@koelle25 From the following log:
logger=plugin.grafana-image-renderer t=2024-07-17T13:39:19.280660299+02:00 level=debug msg="chrome_crashpad_handler: --database is required"
Have you tried to set this in your Grafana ini file:
[plugin.grafana-image-renderer]
rendering_args = --no-sandbox,--disable-gpu,--database
You could maybe also try this: https://github.com/puppeteer/puppeteer/issues/11023#issuecomment-1776247197
Hi Agnes! Thanks for responding. Unfortunately the following did not change anything:
[plugin.grafana-image-renderer]
rendering_args = --no-sandbox,--disable-gpu,--database
But I wonder if this is a valid setting, as the docs don't mention it.
The trick from https://github.com/puppeteer/puppeteer/issues/11023#issuecomment-1776247197 actually worked. I set the variables in my /etc/default/grafana-server, then restarted grafana. Rendering started worked again.
I then also tried using a different directory, i.e. inside the home directory of the grafana
user (/usr/share/grafana/):
XDG_CONFIG_HOME=/usr/share/grafana/.config/chromium
XDG_CACHE_HOME=/usr/share/grafana/.cache/chromium
But then the rendering stopped working again. Even after pre-creating the directories, doing a chown grafana:grafana
and even chmod 777
on them these did not work.
Dou you have any idead what has changed between 3.11.0 and 3.11.1 that could cause this behaviour?
Glad to hear the env variables are working!
Every time we make a release, the Chrome executable packaged with the image renderer is updated, so it probably comes from this update. Hopefully, the next release with the next Chrome update will fix it.
To test this theory, you can use the old version of Chrome (in the image renderer 3.11.0 package) with this setting:
[plugin.grafana-image-renderer]
rendering_chrome_bin = /custom/path/to/chrome
But the env variables solution is a better one as it's usually best to use the latest versions of software.
Hi Agnes,
thanks for the tip. I commented out the env variables in /etc/default/grafana, then used this setting in /etc/grafana/grafana.ini:
[plugin.grafana-image-renderer]
rendering_chrome_bin = /storage/grafana/grafana-image-renderer_3.11.0/chrome/linux-128.0.6534.0/chrome-linux64/chrome
That also works.
I also tried it with the newest release 3.11.2 - but this one also does not work out of the box, only if using the env variables or old Chrome. So the newly bundled Chrome unfortunately does not fix the problem.
I also found out that the packaged Chrome in 3.11.1 and 3.11.2 had extra files: deb.deps
and rpm.deps
. I checked my installed packages against the list in deb.deps
and installed the missing packages (in my case fonts-liberation
, libvulkan1
and xdg-utils
). Then restarted the grafana-server.service
, but it still didn't work.
Same problem with release 3.11.3, containing Chrome 129.0.6654.0. Still one of the workarounds (using XDG_* env variables or older Chrome 128.0.6534) is needed.
Hi, just using the offical docker.io/grafana/grafana-image-renderer
image and the error occours.
Same problem with release 3.11.3, containing Chrome 129.0.6654.0. Still one of the workarounds (using XDG_* env variables or older Chrome 128.0.6534) is needed.
Still an issue in 3.11.4 (containing Chrome 130.0.6693.0).
- 3.11.0 contains Chrome 128.0.6534.0 -> works
- 3.11.1 contains Chrome 128.0.6597.0 -> does NOT work
- 3.11.2 contains Chrome 129.0.6644.0 -> does NOT work
Confirming that downgrading to 3.11.0 works. Here is a command line method to install a particular version of the plugin:
grafana-cli plugins uninstall grafana-image-renderer
grafana-cli plugins install grafana-image-renderer 3.11.0
service grafana-server restart
Same here, but I'm running Grafana Image Renderer as a standalone Node application.
grafana-image-renderer.service - grafana-image-renderer
Loaded: loaded (/etc/systemd/system/grafana-image-renderer
.service; enabled; preset: enabled)
Active: active (running) since Tue 2024-09-10 15:43:05 CEST; 22s ago
Main PID: 840044 (node)
Tasks: 11 (limit: 9272)
CPU: 2.612s
CGroup: /system.slice/grafana-image-renderer.service
└─840044 node build/app.js server --port=8081
Sep 10 15:43:05 DietPi systemd[1]: Started grafana-image-renderer.service - grafana-image-renderer.
Sep 10 15:43:07 DietPi node[840044]: {"level":"info","message":"HTTP Server started, listening at http://localhost:8081"}
Sep 10 15:43:24 DietPi node[840044]: [2.4K blob data]
Sep 10 15:43:24 DietPi node[840044]: {"level":"error","message":"::ffff:192.168.1.6 - - [10/Sep/2024:13:43:24 +0000] \"GET /render
?deviceScaleFactor=1.000000&domain=192.168.1.6&encoding=png&height=500&renderKey=TNEqvrtxo6xbIvKU9nftmb7WE0w661Fb&timeout=60&timez
one=Europe%2FRome&url=http%3A%2F%2F192.168.1.6%3A3001%2Fd-solo%2FFGioSdO4z31m%2Fcasa-summary%3ForgId%3D1%26refresh%3D1m%26from%3D1
725889405159%26to%3D1725975805159%26panelId%3D87%26width%3D1000%26height%3D500%26scale%3D1%26tz%3DEurope%252FRome%26render%3D1&wid
th=1000 HTTP/1.1\" 500 96 \"-\" \"Grafana/11.2.0\"\n"}
Last working release is 3.11.2 for me.
I rollbacked to 3.11.3 version and it works now without implementing the XDG_CONFIG_HOME and XDG_CACHE_HOME
variables workaround.
The version for grafana I am using is 11.2.0
I'm seeing the same thing with the latest helm chart, just setting imageRenderer.enabled: true.
I'm seeing the same thing with the latest helm chart, just setting imageRenderer.enabled: true.
@alphabet5 I had the same issue yesterday. You can downgrade to 3.11.0
and it resolves the issue; just add the following:
imageRenderer:
enabled: true
image:
registry: docker.io
repository: grafana/grafana-image-renderer
tag: 3.11.0
pullPolicy: Always
Yeah, I can confirm that fixed it for me. Thanks.
I can confirm until now, the 3.11.0
version is still working, I am using 11.2.0
grafana
Seems to still be an issue in 3.11.5
3.11.5 works for me again without using the setting "rendering_chrome_bin"
3.11.5 works for me again without using the setting "rendering_chrome_bin"
I've never used this setting, but 3.11.5 isn't working for me. I just tried again, and the last version that's working is 3.11.3. (I'm compiling it on a Raspberry Pi 5.)
For me it's currently working with 3.11.5 (without the XDG variable workaround). I'm not sure if it was fixed by this version or some other OS package maybe.. So I'm leaving this issue open for now.
I just tested it with 3.11.5
version and without the XDG variables workaround and it does not work
It's ok for me, i updated in version 3.11.5 without the the XDG variables workaround
CentOS Stream release 8
[root@vm-influxdbv2 bin]# rpm -qa | grep chrom
chromium-common-129.0.6668.89-1.el8.x86_64
chromium-129.0.6668.89-1.el8.x86_64
[root@vm-influxdbv2 bin]# rpm -qa | grep grafana
grafana-11.2.2-1.x86_64
I tested with grafana v11.3.0
and image-renderer plugin v3.11.6
and it works smooth.
What happened: I just updated the plugin from 3.11.0 to 3.11.1, now the rendering doesn't work anymore. Browser shows this image instead:
In the grafana.log I have this:
After a downgrade to 3.11.0 everything is working again.
What you expected to happen: Rendering still works as before.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
plugins = /storage/grafana/plugins
)