Kibana: [error][reporting] The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports.

Created on 28 Dec 2019  Â·  12Comments  Â·  Source: elastic/kibana

the error happen when i start the kibana and elasticsearch&elasticsearch-head have started。
[Screenshot here]
log [02:25:38.464] [error][reporting] The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports.
log [02:25:38.465] [error][reporting] ErrorEvent {
target:
WebSocket {
_events:
[Object: null prototype] { open: [Function], error: [Function] },
_eventsCount: 2,
_maxListeners: undefined,
readyState: 3,
protocol: '',
_binaryType: 'nodebuffer',
_closeFrameReceived: false,
_closeFrameSent: false,
_closeMessage: '',
_closeTimer: null,
_closeCode: 1006,
_extensions: {},
_receiver: null,
_sender: null,
_socket: null,
_isServer: false,
_redirects: 0,
url:
'ws://127.0.0.1:45871/devtools/browser/7e246271-fac4-4eed-99c0-28ace04c7e45',
_req: null },
type: 'error',
message: 'socket hang up',
error:
{ Error: socket hang up
at createHangUpError (_http_client.js:323:15)
at Socket.socketOnEnd (_http_client.js:426:23)
at Socket.emit (events.js:194:15)
at endReadableNT (_stream_readable.js:1103:12)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' } }
log [02:25:38.469] [warning][reporting] See Chromium's log output at "/kibana/kibana-7.5.1-linux-x86_64/data/headless_shell-linux/chrome_debug.log"
log [02:25:38.469] [warning][reporting] Reporting plugin self-check failed. Please check the Kibana Reporting settings. Error: Could not close browser client handle!

Kibana Version:7.5.1
OS:CentOS Linux release 7.3.1611 (Core)

Thanks

Reporting Reporting Services feedback_needed

All 12 comments

encountered this issue on CentOS7 and Kibana 7.5.1 as well...
turned out to be related to selinux

as a quick test you can try to disable selinux or make it permissive.
If that works you can explore more proper solution (if you care).

#> vim /etc/sysconfig/selinux

and change

SELINUX=disabled

This change requires server reboot.

@nortrom-lh, does that resolve your issue?

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

Same issues and selinux does not solve the problem.

i have the same issue on v7.5.1
Does anyone ahs a fix for this ?

Hi, this message is coming from a self-check at Kibana startup to catch any potential issues early and flag any incompatibilities or missing requirements that Reporting needs to run.

There is a troubleshooting section on Kibana Reporting here: https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html

If system libraries that Chromium depends on are not installed, take a look at the list in the Kibana docs: https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html#reporting-troubleshooting-system-dependencies That list was taken originally from 3rd party documentation here: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix

Another tip: check that Kibana is not mistakenly trying to launch Chromium with processing sandboxing enabled, if sandboxing is not available in your OS. The Kibana logs will say whether sandboxing was defaulted on or off. You can also explicitly turn it off using a xpack.reporting.capture.browser.chromium.disableSandbox in kibana.yml. Details on that are documented here: https://www.elastic.co/guide/en/kibana/current/reporting-chromium-sandbox.html

If system libraries that Chromium depends on are not installed, take a look at the list in the Kibana docs

In addition, here's a piece of debugging device that will show you the actual output of our Chromium build when its run in your OS:

cd data/headless_shell-[arch]/
./headless_shell --disable-translate --disable-extensions --disable-background-networking --safebrowsing-disable-auto-update --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-first-run --disable-gpu --no-sandbox --headless --hide-scrollbars --window-size=400,400 --remote-debugging-port=9221 https://example.com/

If the program crashes, an error message should be logged. Anything mentioning a library not found relates to a system dependency that must be installed in the OS.

If the program continues running, use ^C to quit it. This means that has loaded the system dependencies it needs and runs fine.

I did not get this exact error, but one very similar, I will include mine after my resolution. On CentOS 8, changing SELinux made no difference to this error, so leave it on. I ran sudo dnf install nss.x86_64 because it provides libnss3.so which is required for Headless Chromium (Puppeteer) to be able to make secure requests. After this, I restarted my service with systemctl and no more error.

My error (may be the same for CentOS 7 but obfuscated).

Aug 09 23:15:16 localhost.localdomain kibana[9301]: {"type":"log","@timestamp":"2020-08-10T06:15:16Z","tags":["info","http","server","Kibana"],"pid":9301,"message":"http server running at http://localhost:5601"}
Aug 09 23:15:16 localhost.localdomain kibana[9301]: {"type":"log","@timestamp":"2020-08-10T06:15:16Z","tags":["error","reporting"],"pid":9301,"message":"The Reporting plugin encountered issues launching Chromium in a self-test. You may have trouble generating reports."}
Aug 09 23:15:16 localhost.localdomain kibana[9301]: {"type":"log","@timestamp":"2020-08-10T06:15:16Z","tags":["error","reporting"],"pid":9301,"message":"Error: Failed to launch chrome!\n/var/lib/kibana/headless_shell-linux/headless_shell: **error while loading shared libraries: libnss3.so: cannot open shared object fil
e: No such file or directory**\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md\n\n    at onClose (/usr/share/kibana/node_modules/puppeteer-core/lib/Launcher.js:349:14)\n    at Interface.helper.addEventListener (/usr/share/kibana/node_modules/puppeteer-core/lib/Launche
r.js:338:50)\n    at Interface.emit (events.js:203:15)\n    at Interface.close (readline.js:397:8)\n    at Socket.onend (readline.js:173:10)\n    at Socket.emit (events.js:203:15)\n    at endReadableNT (_stream_readable.js:1145:12)\n    at process._tickCallback (internal/process/next_tick.js:63:19)"}
Aug 09 23:15:16 localhost.localdomain kibana[9301]: {"type":"log","@timestamp":"2020-08-10T06:15:16Z","tags":["warning","reporting"],"pid":9301,"message":"See Chromium's log output at \"/var/lib/kibana/headless_shell-linux/chrome_debug.log\""}
Aug 09 23:15:17 localhost.localdomain kibana[9301]: {"type":"log","@timestamp":"2020-08-10T06:15:16Z","tags":["error","reporting"],"pid":9301,"message":"Error: Could not close browser client handle!\n    at browserFactory.test.then.browser (/usr/share/kibana/x-pack/legacy/plugins/reporting/server/lib/validate/validat
e_browser.js:26:15)\n    at process._tickCallback (internal/process/next_tick.js:68:7)"}
Aug 09 23:15:17 localhost.localdomain kibana[9301]: {"type":"log","@timestamp":"2020-08-10T06:15:17Z","tags":["warning","reporting"],"pid":9301,"message":"Reporting plugin self-check generated a warning: Error: Could not close browser client handle!"}
Aug 09 23:15:27 localhost.localdomain kibana[9301]: {"type":"response","@timestamp":"2020-08-10T06:15:26Z","tags":[],"pid":9301,"method":"post","statusCode":200,"req":{"url":"/api/ui_metric/report","method":"post","headers":{"connection":"upgrade","host":"192.168.5.73","content-length":"337","kbn-version":"7.8.1","us
er-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36","content-type":"application/json","accept":"*/*","origin":"http://192.168.5.73","referer":"http://192.168.5.73/app/kibana","accept-encoding":"gzip, deflate","accept-language":"en-US,en;q=0.9"},"remoteA
ddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"http://192.168.5.73/app/kibana"},"res":{"statusCode":200,"responseTime":668,"contentLength":9},"message":"POST /api/ui_metric/report 200 668ms - 9.0B"}

We use the rpm version of kibana (7.8.0) on CentOS 8 and we faced the similar issue. We also solved it by installing nss.x86_64. I suggest to add nss as a dependency to the rpm.

I just double checked on our old system, running on RHEL 7.8. There it looks like nss has been installed by default. Maybe there has been a change to when nss gets installed between version 7 and 8 or it is a difference between RHEL and CentOS. Regardless of this, the best solution would be, if the kibana rpm would have nss as a dependency, which would resolve the problem in either cases.

I have the same problem, I try install some lib and solve this problem by the link. https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html#reporting-troubleshooting-system-dependencies

I have the same problem, I try install some lib and solve this problem by the link. https://www.elastic.co/guide/en/kibana/current/reporting-troubleshooting.html#reporting-troubleshooting-system-dependencies

solve my problem as well, thanks a lot.

i solved 3 problems about Chromium error totally:
sandbox error, xpack.reporting.capture.browser.chromium.disableSandbox:true
libnss3 error, apt-get install libnss3(debian)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

treussart picture treussart  Â·  3Comments

bradvido picture bradvido  Â·  3Comments

MaartenUreel picture MaartenUreel  Â·  3Comments

timroes picture timroes  Â·  3Comments

stacey-gammon picture stacey-gammon  Â·  3Comments