Comments (9)
@ekapratama93 just published 1.0.7 of the plugin which had a bug regarding ignore of https errors. We've verified it works if Grafana runs with https/self signed certificates.
from grafana-image-renderer.
Anyone interested in testing if adding ignoreHTTPSErrors: true
resolves this problem, rebuild and test? Code in question:
grafana-image-renderer/src/browser.ts
Lines 35 to 60 in 4571247
Suggested changes:
diff --git a/src/browser.ts b/src/browser.ts
index 187d832..90e5c66 100644
--- a/src/browser.ts
+++ b/src/browser.ts
@@ -42,6 +42,7 @@ export class Browser {
browser = await puppeteer.launch({
executablePath,
env: env,
+ ignoreHTTPSErrors: true,
args: ['--no-sandbox'],
});
} else {
@@ -49,11 +50,13 @@ export class Browser {
browser = await puppeteer.launch({
executablePath: env['CHROME_BIN'],
env: env,
+ ignoreHTTPSErrors: true,
args: ['--no-sandbox'],
});
} else {
browser = await puppeteer.launch({
env: env,
+ ignoreHTTPSErrors: true,
args: ['--no-sandbox'],
});
}
from grafana-image-renderer.
Ok, figured it out literally minutes after posting the comment. For anyone having the same problem, set the IGNORE_HTTPS_ERRORS=true
environment variable in the renderer and not in grafana.
from grafana-image-renderer.
Guess this is related to puppeteer/puppeteer#540
from grafana-image-renderer.
I got the same issue.
grafana use https, renderer use http.
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59292: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59293: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | t=2019-11-02T09:47:28+0000 lvl=eror msg="Failed to look up user based on cookie" logger=context error="user token not found"
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59295: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59296: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59297: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59299: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:47:28 http: TLS handshake error from 10.255.0.2:59298: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | t=2019-11-02T09:47:46+0000 lvl=info msg="Successful Login" logger=http.server User=sandbox@localhost
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | 2019/11/02 09:49:01 http: TLS handshake error from 172.12.0.3:54474: remote error: tls: unknown certificate
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | t=2019-11-02T09:49:01+0000 lvl=eror msg="Remote rendering request failed" logger=rendering error="500 Internal Server Error"
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | t=2019-11-02T09:49:01+0000 lvl=eror msg="Rendering failed." logger=context userId=1 orgId=1 uname=sandbox error="Remote rendering request failed. 500: 500 Internal Server Error"
monitor_grafana-service.1.l9og2p9i456e@ubuntu1 | t=2019-11-02T09:49:01+0000 lvl=eror msg="Request Completed" logger=context userId=1 orgId=1 uname=sandbox method=GET path=/render/d-solo/e5Ef8jkmz/system status=500 remote_addr=10.255.0.2 time_ms=1990 size=1722 referer="https://10.103.238.31:3000/d/e5Ef8jkmz/system?orgId=1"
Did you fix it?
from grafana-image-renderer.
My fix was to not use https and have http with a proxy in front to terminate ssl.
from grafana-image-renderer.
Merged my suggested fix above. When version 1.0.6 is released please try it out using the new environment variable, see readme. Please report here if it still doesn't work.
from grafana-image-renderer.
@marefr I add GF_RENDERER_PLUGIN_IGNORE_HTTPS_ERRORS=true
to /etc/default/grafana-server
and restart the grafana-server and get t=2019-11-29T22:55:39+0700 lvl=info msg="Renderer plugin started" logger=rendering chromeBin=/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome ignoreHttpsErrors=true timestamp=0001-01-01T00:00:00.000Z
in the log file.
But I still get error :
t=2019-11-29T23:07:12+0700 lvl=dbug msg="Render request received" logger=rendering url="https://localhost:3000/d-solo/000000011/alert?orgId=1&panelId=42&render=1" timestamp=0001-01-01T00:00:00.000Z
t=2019-11-29T23:07:12+0700 lvl=eror msg="Render request failed" logger=rendering url="https://localhost:3000/d-solo/000000011/alert?orgId=1&panelId=42&render=1" error=map[] timestamp=0001-01-01T00:00:00.000Z
t=2019-11-29T23:07:12+0700 lvl=eror msg="Failed to upload alert panel image." logger=alerting.notifier error="Rendering failed: Error: net::ERR_CERT_COMMON_NAME_INVALID at https://localhost:3000/d-solo/000000011/alert?orgId=1&panelId=42&render=1"
Here is the output of grafana-cli plugins ls
installed plugins:
grafana-image-renderer @ 1.0.6
grafana-worldmap-panel @ 0.2.1
from grafana-image-renderer.
Hey, this still doesn't work. We have a grafana server with https and our certificates installed. The renderer is in the same network and uses http. We get errors like this from grafana:
server.go:3230: http: TLS handshake error from 10.42.0.177:40194: remote error: tls: unknown certificate
and these errors in the image-renderer:
{"level":"info","message":"HTTP Server started, listening at http://localhost:8081"}
{"failure":"net::ERR_CERT_COMMON_NAME_INVALID","level":"error","message":"Browser request failed","method":"GET","url":"https://10.43.10.35:3000/d-solo/HVlpjkBWz/dashboard?orgId=1&refresh=5m&from=1637242577549&to=1668778577549&panelId=5&width=1000&height=500&tz=Europe%2FRome&render=1"}
{"err":"Error: net::ERR_CERT_COMMON_NAME_INVALID at https://10.43.10.35:3000/d-solo/HVlpjkBWz/dashboard?orgId=1&refresh=5m&from=1637242577549&to=1668778577549&panelId=5&width=1000&height=500&tz=Europe%2FRome&render=1\n at navigate (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:156:23)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async FrameManager.navigateFrame (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:131:21)\n at async Frame.goto (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:512:16)\n at async Page.goto (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1167:16)\n at async Browser.takeScreenshot (/usr/src/app/build/browser/browser.js:256:13)\n at async Browser.render (/usr/src/app/build/browser/browser.js:230:20)\n at async HttpServer.render (/usr/src/app/build/service/http-server.js:53:28)","level":"error","message":"Error while trying to prepare page for screenshot","url":"https://10.43.10.35:3000/d-solo/HVlpjkBWz/dashboard?orgId=1&refresh=5m&from=1637242577549&to=1668778577549&panelId=5&width=1000&height=500&tz=Europe%2FRome&render=1"}
{"err":"TimeoutError: waiting for function failed: timeout 60000ms exceeded\n at new WaitTask (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:528:34)\n at DOMWorld.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/DOMWorld.js:479:26)\n at Frame.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/FrameManager.js:1010:32)\n at Page.waitForFunction (/usr/src/app/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2490:33)\n at /usr/src/app/build/browser/browser.js:284:29\n at Browser.withTimingMetrics (/usr/src/app/build/browser/browser.js:411:20)\n at Browser.takeScreenshot (/usr/src/app/build/browser/browser.js:280:24)\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Browser.render (/usr/src/app/build/browser/browser.js:230:20)\n at async HttpServer.render (/usr/src/app/build/service/http-server.js:53:28)","level":"error","message":"Error while waiting for the panels to load","url":"https://10.43.10.35:3000/d-solo/HVlpjkBWz/dashboard?orgId=1&refresh=5m&from=1637242577549&to=1668778577549&panelId=5&width=1000&height=500&tz=Europe%2FRome&render=1"}
from grafana-image-renderer.
Related Issues (20)
- Can I get help with request errors? HOT 1
- Port settings is not respected HOT 1
- version 3.9.1 shows artifacts in icingaweb2 preview HOT 2
- Spike: Filter out some network error logs
- Error Loading plugin in Gafana 10.4.0 HOT 15
- Plugin links to static images do not include configured subpaths
- ARM64 for Linux Plugin support HOT 2
- Build: replace vercel/pkg HOT 1
- Fails to find chromium binary HOT 1
- Error "Error: Failed to launch the browser process" on the Raspberry PI 5, architecture issue? HOT 1
- Pixel comparing to dynamically reduce screenshot resolution HOT 4
- No env overrides for https config
- Cannot GET /d-solo/.... HOT 1
- full page rendering fails, using the latest Grafana and grafana image renderer HOT 4
- Grafana-Image-Renderer and DashboardScene : Panel with id Nan not found HOT 1
- Grafana image renderer use the same image attachment when alert are Resolved HOT 1
- TimeoutError: Waiting failed: 60000ms exceeded HOT 1
- [3.11.1+] rendering failed: Error: Failed to launch the browser process HOT 24
- [3.11.1] Error rendering template: error. You may need to build frontend assets HOT 2
- Update to Node v18.19.1 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-image-renderer.