mahendrapaipuri / grafana-dashboard-reporter-app

A Grafana plugin app to create PDF reports of dashboards
Apache License 2.0
29 stars 4 forks source link

Problem with generating a report #45

Open m4t1kmatik opened 4 days ago

m4t1kmatik commented 4 days ago

Hello, I have a problem with generating a report, when I enter the URL as in the screenshot, it displays the message error generating report, here are the logs: logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T14:48:37.065238234+03:00 level=info msg="provisioned config" config="Grafana App URL: http://localhost:3000; Skip TLS Check: false; Grafana Data Path: /var/lib/grafana; Orientation: portrait; Layout: simple; Dashboard Mode: full; Time Zone: ; Encoded Logo: ; Max Renderer Workers: 2; Persist Data: false; Included Panel IDs: all; Excluded Panel IDs: none" endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T14:48:37.067408065+03:00 level=info msg="chrome executable provided by grafana-image-renderer will be used" chrome=/var/lib/grafana/plugins/grafana-image-renderer/chrome/linux-128.0.6534.0/chrome-linux64/chrome endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T14:48:37.069214785+03:00 level=warn msg="failed to get plugin app secret" endpoint=callResource err="PluginAppClientSecret not set in config" pluginID=mahendrapaipuri-dashboardreporter-app logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T14:48:37.06970453+03:00 level=info msg="updated config" config="Grafana App URL: http://localhost:3000; Skip TLS Check: false; Grafana Data Path: /var/lib/grafana; Orientation: portrait; Layout: simple; Dashboard Mode: full; Time Zone: ; Encoded Logo: ; Max Renderer Workers: 2; Persist Data: false; Included Panel IDs: all; Excluded Panel IDs: none" dash_uid=a3eae39a-573f-4f8f-8e81-dabd6968a300 endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app user=admin logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T14:48:37.082534554+03:00 level=warn msg="error(s) fetching dashboard model and data" dashtitle= endpoint=callResource err="no dashboard data found in browser data\nerror fetching dashboard URL from browser http://localhost:3000/d/a3eae39a-573f-4f8f-8e81-dabd6968a300/?: chrome failed to start:\n/var/lib/grafana/plugins/grafana-image-renderer/chrome/linux-128.0.6534.0/chrome-linux64/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory\n" pluginID=mahendrapaipuri-dashboardreporter-app logger=rendering renderer=http t=2024-07-01T14:48:37.084065688+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/?from=now-1h&height=500&panelId=1&theme=light&to=now&width=1000" logger=rendering renderer=http t=2024-07-01T14:48:37.289385896+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://localhost:8081/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=jD5FFNRrRblFT4ar3obSJY8mK9BUTn7K&timeout=60&timezone=&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2Fa3eae39a-573f-4f8f-8e81-dabd6968a300%2F%3Ffrom%3Dnow-1h%26height%3D500%26panelId%3D1%26theme%3Dlight%26to%3Dnow%26width%3D1000%26render%3D1&width=1000\": dial tcp [::1]:8081: connect: connection refused" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:48:37.611439381+03:00 level=error msg="Rendering failed." error="failed to send request to remote rendering service: Get \"http://localhost:8081/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=jD5FFNRrRblFT4ar3obSJY8mK9BUTn7K&timeout=60&timezone=&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2Fa3eae39a-573f-4f8f-8e81-dabd6968a300%2F_%3Ffrom%3Dnow-1h%26height%3D500%26panelId%3D1%26theme%3Dlight%26to%3Dnow%26width%3D1000%26render%3D1&width=1000\": dial tcp [::1]:8081: connect: connection refused" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:48:37.612938348+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: error. You may need to build frontend assets \n template: error:16:35: executing \"error\" at <.ContentDeliveryURL>: can't evaluate field ContentDeliveryURL in type struct { Title string; AppTitle string; AppSubUrl string; Theme string; ErrorMsg error }" stack="github.com/grafana/grafana/pkg/web/context.go:112 (0x6147bc7)\ngithub.com/grafana/grafana/pkg/services/contexthandler/model/model.go:54 (0x614fe44)\ngithub.com/grafana/grafana/pkg/api/render.go:87 (0x87c5944)\ngithub.com/grafana/grafana/pkg/api/response/web_hack.go:40 (0x615608f)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:131 (0x6148b2e)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/services/contexthandler/contexthandler.go:145 (0x87cf79b)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/render.go:44 (0x61496bd)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/csrf/csrf.go:66 (0x7e1eb7a)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/recovery.go:179 (0x87a9f75)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/loggermw/logger.go:72 (0x7e1fb96)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/request_metrics.go:83 (0x672d735)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/request_tracing.go:88 (0x87aabd5)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/requestmeta/request_metadata.go:66 (0x87ce835)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/context.go:52 (0x6147616)\ngithub.com/grafana/grafana/pkg/web/router.go:155 (0x614ad6d)\ngithub.com/grafana/grafana/pkg/web/router.go:221 (0x614b8b4)\ngithub.com/grafana/grafana/pkg/web/macaron.go:163 (0x6148ffc)\nnet/http/server.go:2938 (0x5391b0d)\nnet/http/server.go:2009 (0x538d9f3)\nruntime/asmamd64.s:1650 (0x50553e0)\n" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:48:37.613060235+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/ status=500 remote_addr=[::1] timems=530 duration=530.091915ms size=343 referer= handler=/render/* logger=rendering renderer=http t=2024-07-01T14:48:39.950556436+03:00 level=info msg="Backend rendering via external http server" version= logger=rendering renderer=http t=2024-07-01T14:48:47.617138337+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/?from=now-1h&height=500&panelId=1&theme=light&to=now&width=1000" logger=rendering renderer=http t=2024-07-01T14:48:47.928351933+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://localhost:8081/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=YF9qUOV4sGIcTV5D5L3TcZ4DXrleg094&timeout=60&timezone=&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2Fa3eae39a-573f-4f8f-8e81-dabd6968a300%2F_%3Ffrom%3Dnow-1h%26height%3D500%26panelId%3D1%26theme%3Dlight%26to%3Dnow%26width%3D1000%26render%3D1&width=1000\": dial tcp [::1]:8081: connect: connection refused" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:48:48.031449417+03:00 level=error msg="Rendering failed." error="failed to send request to remote rendering service: Get \"http://localhost:8081/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=YF9qUOV4sGIcTV5D5L3TcZ4DXrleg094&timeout=60&timezone=&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2Fa3eae39a-573f-4f8f-8e81-dabd6968a300%2F_%3Ffrom%3Dnow-1h%26height%3D500%26panelId%3D1%26theme%3Dlight%26to%3Dnow%26width%3D1000%26render%3D1&width=1000\": dial tcp [::1]:8081: connect: connection refused" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:48:48.033638945+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: error. You may need to build frontend assets \n template: error:16:35: executing \"error\" at <.ContentDeliveryURL>: can't evaluate field ContentDeliveryURL in type struct { Title string; AppTitle string; AppSubUrl string; Theme string; ErrorMsg error }" stack="github.com/grafana/grafana/pkg/web/context.go:112 (0x6147bc7)\ngithub.com/grafana/grafana/pkg/services/contexthandler/model/model.go:54 (0x614fe44)\ngithub.com/grafana/grafana/pkg/api/render.go:87 (0x87c5944)\ngithub.com/grafana/grafana/pkg/api/response/web_hack.go:40 (0x615608f)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:131 (0x6148b2e)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/services/contexthandler/contexthandler.go:145 (0x87cf79b)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/render.go:44 (0x61496bd)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/csrf/csrf.go:66 (0x7e1eb7a)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/recovery.go:179 (0x87a9f75)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/loggermw/logger.go:72 (0x7e1fb96)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/request_metrics.go:83 (0x672d735)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/request_tracing.go:88 (0x87aabd5)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/requestmeta/request_metadata.go:66 (0x87ce835)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/context.go:52 (0x6147616)\ngithub.com/grafana/grafana/pkg/web/router.go:155 (0x614ad6d)\ngithub.com/grafana/grafana/pkg/web/router.go:221 (0x614b8b4)\ngithub.com/grafana/grafana/pkg/web/macaron.go:163 (0x6148ffc)\nnet/http/server.go:2938 (0x5391b0d)\nnet/http/server.go:2009 (0x538d9f3)\nruntime/asmamd64.s:1650 (0x50553e0)\n" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:48:48.034099911+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/ status=500 remote_addr=[::1] time_ms=418 duration=418.726346ms size=343 referer= handler=/render/ logger=context userId=0 orgId=0 uname= t=2024-07-01T14:48:49.454458024+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=1 duration=1.164949ms size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:48:51.421200889+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=0 duration=941.283µs size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:49:06.453288048+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 timems=0 duration=917.695µs size=105 referer= handler=/api/live/ws logger=rendering renderer=http t=2024-07-01T14:49:08.038366141+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/?from=now-1h&height=500&panelId=1&theme=light&to=now&width=1000" logger=rendering renderer=http t=2024-07-01T14:49:08.160397207+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://localhost:8081/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=Sz9j8SIjQqapSDybmkgU8yK0u8HBCeB6&timeout=60&timezone=&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2Fa3eae39a-573f-4f8f-8e81-dabd6968a300%2F_%3Ffrom%3Dnow-1h%26height%3D500%26panelId%3D1%26theme%3Dlight%26to%3Dnow%26width%3D1000%26render%3D1&width=1000\": dial tcp [::1]:8081: connect: connection refused" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:49:08.270893286+03:00 level=error msg="Rendering failed." error="failed to send request to remote rendering service: Get \"http://localhost:8081/render?deviceScaleFactor=1.000000&domain=localhost&encoding=&height=500&renderKey=Sz9j8SIjQqapSDybmkgU8yK0u8HBCeB6&timeout=60&timezone=&url=http%3A%2F%2Flocalhost%3A3000%2Fd-solo%2Fa3eae39a-573f-4f8f-8e81-dabd6968a300%2F_%3Ffrom%3Dnow-1h%26height%3D500%26panelId%3D1%26theme%3Dlight%26to%3Dnow%26width%3D1000%26render%3D1&width=1000\": dial tcp [::1]:8081: connect: connection refused" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:49:08.273587591+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: error. You may need to build frontend assets \n template: error:16:35: executing \"error\" at <.ContentDeliveryURL>: can't evaluate field ContentDeliveryURL in type struct { Title string; AppTitle string; AppSubUrl string; Theme string; ErrorMsg error }" stack="github.com/grafana/grafana/pkg/web/context.go:112 (0x6147bc7)\ngithub.com/grafana/grafana/pkg/services/contexthandler/model/model.go:54 (0x614fe44)\ngithub.com/grafana/grafana/pkg/api/render.go:87 (0x87c5944)\ngithub.com/grafana/grafana/pkg/api/response/web_hack.go:40 (0x615608f)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:131 (0x6148b2e)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/services/contexthandler/contexthandler.go:145 (0x87cf79b)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/render.go:44 (0x61496bd)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/macaron.go:137 (0x6148bd2)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/csrf/csrf.go:66 (0x7e1eb7a)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/recovery.go:179 (0x87a9f75)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/loggermw/logger.go:72 (0x7e1fb96)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/request_metrics.go:83 (0x672d735)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/request_tracing.go:88 (0x87aabd5)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/middleware/requestmeta/request_metadata.go:66 (0x87ce835)\nnet/http/server.go:2136 (0x538ee28)\ngithub.com/grafana/grafana/pkg/web/context.go:52 (0x6147616)\ngithub.com/grafana/grafana/pkg/web/router.go:155 (0x614ad6d)\ngithub.com/grafana/grafana/pkg/web/router.go:221 (0x614b8b4)\ngithub.com/grafana/grafana/pkg/web/macaron.go:163 (0x6148ffc)\nnet/http/server.go:2938 (0x5391b0d)\nnet/http/server.go:2009 (0x538d9f3)\nruntime/asmamd64.s:1650 (0x50553e0)\n" logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:49:08.273944829+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/ status=500 remote_addr=[::1] time_ms=237 duration=237.356843ms size=343 referer= handler=/render/ logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T14:49:08.274772528+03:00 level=error msg="error generating report" err="error rendering PNGs in parallel for dashboard new test: error getting panel Panel Title: error rendering panel: 500 Internal Server Error" pluginID=mahendrapaipuri-dashboardreporter-app endpoint=callResource logger=context userId=1 orgId=1 uname=admin t=2024-07-01T14:49:08.275620995+03:00 level=error msg="Request Completed" method=GET path=/api/plugins/mahendrapaipuri-dashboardreporter-app/resources/report status=500 remote_addr=51.159.149.198 time_ms=31230 duration=31.230539683s size=24 referer= handler=/api/plugins/:pluginId/resources/* logger=infra.usagestats t=2024-07-01T14:49:18.941574283+03:00 level=info msg="Usage stats are ready to report" logger=context userId=0 orgId=0 uname= t=2024-07-01T14:49:23.448829465+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=1 duration=1.075237ms size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:49:41.465433468+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=1 duration=1.495802ms size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:49:53.466867175+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=1 duration=1.306018ms size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:49:57.435371715+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=1 duration=1.226469ms size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:50:03.466593242+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=0 duration=972.145µs size=105 referer= handler=/api/live/ws logger=context userId=0 orgId=0 uname= t=2024-07-01T14:50:10.466260365+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=401 remote_addr=80.254.49.219 time_ms=1 duration=1.289484ms size=105 referer= handler=/api/live/ws image

mahendrapaipuri commented 4 days ago

chrome failed to start:\n/var/lib/grafana/plugins/grafana-image-renderer/chrome/linux-128.0.6534.0/chrome-linux64/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory\n" pluginID=mahendrapaipuri-dashboardreporter-app

This is the error. I assume you havent installed Chrome on the host where you deployed Grafana server. The current plugin and its dependency grafana-image-renderer plugin uses Chromium to generate reports and PNGs. Although grafana-image-renderer ships a "pre-compiled" Chromium, we will still need all the dependent shared libs of Chromium installed on the host. So, please install Chromium on the Grafana server host and retry.

m4t1kmatik commented 4 days ago

Still the same error, now the logs are like this: logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T15:05:25.259403808+03:00 level=info msg="provisioned config" config="Grafana App URL: http://localhost:3000; Skip TLS Check: false; Grafana Data Path: /var/lib/grafana; Orientation: portrait; Layout: simple; Dashboard Mode: full; Time Zone: ; Encoded Logo: ; Max Renderer Workers: 2; Persist Data: false; Included Panel IDs: all; Excluded Panel IDs: none" endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T15:05:25.262918894+03:00 level=info msg="chrome executable provided by grafana-image-renderer will be used" chrome=/var/lib/grafana/plugins/grafana-image-renderer/chrome/linux-128.0.6534.0/chrome-linux64/chrome endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T15:05:25.263222452+03:00 level=warn msg="failed to get plugin app secret" pluginID=mahendrapaipuri-dashboardreporter-app endpoint=callResource err="PluginAppClientSecret not set in config" logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T15:05:25.263973957+03:00 level=info msg="updated config" config="Grafana App URL: http://localhost:3000; Skip TLS Check: false; Grafana Data Path: /var/lib/grafana; Orientation: portrait; Layout: simple; Dashboard Mode: full; Time Zone: ; Encoded Logo: ; Max Renderer Workers: 2; Persist Data: false; Included Panel IDs: all; Excluded Panel IDs: none" dash_uid=a3eae39a-573f-4f8f-8e81-dabd6968a300 endpoint=callResource pluginID=mahendrapaipuri-dashboardreporter-app user=admin logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-01T15:05:58.958096692+03:00 level=error msg="error generating report" endpoint=callResource err="error rendering PNGs in parallel for dashboard new test: error getting panel : error rendering panel: 500 Internal Server Error" pluginID=mahendrapaipuri-dashboardreporter-app

mahendrapaipuri commented 4 days ago

Can you enable debug logging on Grafana server and retry? Error says that it is grafana-image-renderer plugin does not render a dashboard panel's PNG. So, the error is not from current plugin but from grafana-image-renderer.

Also, there can be transient errors with chrome. So, please retry 2-3 times after restarting Grafana server.

m4t1kmatik commented 4 days ago

The browser now displays a message: {"extra":null,"message":"Unauthorized","messageId":"session.token.rotate","statusCode":401,"traceID":""} Maybe I didn't enter some parameter in the config file err="PluginAppClientSecret not set in config" pluginID=mahendrapaipuri-dashboardreporter-app Like this

mahendrapaipuri commented 4 days ago

I think Grafana rotated the cookie after you made the API request. Could you just retry?

m4t1kmatik commented 3 days ago

I rebooted but it didn't help(

mahendrapaipuri commented 3 days ago

Could you please post the logs in debug mode? Without logs I cant help you much.

m4t1kmatik commented 3 days ago
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:25.856811656+03:00 level=error msg="Rendering failed." error="failed to send request to remote rende>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:25.858351242+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: e>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:25.858587246+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f->
logger=rendering renderer=http t=2024-07-02T14:06:38.785455239+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local>
logger=rendering renderer=http t=2024-07-02T14:06:38.786426631+03:00 level=info msg="Couldn't get remote renderer version, retrying" err="failed to send request to>
logger=rendering renderer=http t=2024-07-02T14:06:45.862117865+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/_?from=now-1h&heigh>
logger=rendering renderer=http t=2024-07-02T14:06:45.889605362+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:45.919658243+03:00 level=error msg="Rendering failed." error="failed to send request to remote rende>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:45.921440534+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: e>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:45.921827191+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f->
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-02T14:06:45.923171258+03:00 level=error msg="error generating report" endpoint=callResource err="erro>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:06:45.923982358+03:00 level=error msg="Request Completed" method=GET path=/api/plugins/mahendrapaipuri->
logger=context userId=0 orgId=0 uname= t=2024-07-02T14:06:46.97088969+03:00 level=info msg="Request Completed" method=GET path=/favicon.ico status=302 remote_addr=>
logger=http.server t=2024-07-02T14:06:47.619394844+03:00 level=error msg="Failed to parse user ID" error="identifier is not initialized"
logger=infra.usagestats t=2024-07-02T14:06:48.792033055+03:00 level=info msg="Usage stats are ready to report"
logger=rendering renderer=http t=2024-07-02T14:06:53.788129313+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local>
logger=rendering renderer=http t=2024-07-02T14:06:53.788270901+03:00 level=info msg="Couldn't get remote renderer version, retrying" err="failed to send request to>
logger=rendering renderer=http t=2024-07-02T14:07:08.789017046+03:00 level=info msg="Backend rendering via external http server" version=
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-02T14:10:12.479640636+03:00 level=warn msg="failed to get plugin app secret" pluginID=mahendrapaipuri>
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-02T14:10:12.480938796+03:00 level=info msg="updated config" user=admin config="Grafana App URL: http:>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:14.427592595+03:00 level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_>
logger=rendering renderer=http t=2024-07-02T14:10:15.915305857+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/_?from=now-1h&heigh>
logger=rendering renderer=http t=2024-07-02T14:10:15.952187256+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:15.978153611+03:00 level=error msg="Rendering failed." error="failed to send request to remote rende>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:15.979685643+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: e>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:15.98005296+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f-4>
logger=rendering renderer=http t=2024-07-02T14:10:25.98967563+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/_?from=now-1h&height>
logger=rendering renderer=http t=2024-07-02T14:10:26.028155595+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:26.068495246+03:00 level=error msg="Rendering failed." error="failed to send request to remote rende>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:26.070721671+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: e>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:26.070893803+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f->
logger=rendering renderer=http t=2024-07-02T14:10:46.074918996+03:00 level=info msg=Rendering path="d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/_?from=now-1h&heigh>
logger=rendering renderer=http t=2024-07-02T14:10:46.111317714+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:46.136715+03:00 level=error msg="Rendering failed." error="failed to send request to remote renderin>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:46.138870211+03:00 level=error msg="Request error" error="Context.HTML - Error rendering template: e>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:46.139226745+03:00 level=error msg="Request Completed" method=GET path=/render/d-solo/a3eae39a-573f->
logger=plugin.mahendrapaipuri-dashboardreporter-app t=2024-07-02T14:10:46.140137637+03:00 level=error msg="error generating report" endpoint=callResource err="erro>
logger=context userId=1 orgId=1 uname=admin t=2024-07-02T14:10:46.140637066+03:00 level=error msg="Request Completed" method=GET path=/api/plugins/mahendrapaipuri->
logger=context userId=0 orgId=0 uname= t=2024-07-02T14:10:46.523621491+03:00 level=info msg="Request Completed" method=GET path=/favicon.ico status=302 remote_addr>
logger=http.server t=2024-07-02T14:10:46.807368776+03:00 level=error msg="Failed to parse user ID" error="identifier is not initialized"
mahendrapaipuri commented 3 days ago

From the logs, it seems the problem is from grafana-image-renderer. Did you install grafana-image-renderer on the same server as Grafana or you installed it as separate web service? From your logs, it seems that you configured to use it as remote service. Could you share the config of grafana-image-renderer? Or if you could share your entire Grafana config, that is fine too.

m4t1kmatik commented 3 days ago

grafana.txt grafana-image-renderer is installed on the same server as grafana

mahendrapaipuri commented 3 days ago

Well, I dont see anything strange in your config. I am not sure why the grafana-image-renderer is assuming that the renderer is running as remote service. Here is the log line that says that Grafana server is attempting to reach renderer that is running as remote service.

logger=rendering renderer=http t=2024-07-02T14:06:38.785455239+03:00 level=error msg="Failed to send request to remote rendering service" error="Get \"http://local

You can test it yourself. Attempt to go to URL https://<grafana_server>/d-solo/a3eae39a-573f-4f8f-8e81-dabd6968a300/_?from=now-1h and you will see that you will get error instead of getting panel PNG render.

Are you setting any env vars on the Grafana server?

m4t1kmatik commented 3 days ago

No, I haven't installed anything like that

mahendrapaipuri commented 3 days ago

I am sorry, I cant think of anything. Maybe it is a regression in the latest grafana-image-renderer. I will try to test it myself on the latest grafana-image-renderer when I have some time.

Anyways, it is an issue with grafana-image-renderer and not the current plugin.

m4t1kmatik commented 3 days ago

ok, thank you very much, I will try to do something with grafana-image-renderer, and I can fix that I write to you