Getting HeadlessError: ECONNREFUSED when trying to generate PDF report from Kibana

Hi Team,

I am trying to generate PDF reports on Kibana and while doing so I am getting the below error:

HeadlessError: Request() error evaluating createPage() call: Error: connect ECONNREFUSED 127.0.0.1:33395

We are running all 3 components of ELK stack(v6.8) on the same LPAR (hence firewall issues out of question?)

I followed various remedies mentioned in forums. I have added correct values for below parameters in kibana.yml :

xpack.reporting.kibanaServer.port :
xpack.reporting.kibanaServer.hostname :
server.ssl.enabled: true
server.ssl.certificate:
server.ssl.key:
elasticsearch.ssl.certificateAuthorities:
xpack.reporting.encryptionKey:
xpack.security.encryptionKey:

After triggering PDF generation, I checked for the phantomjs process which is spawned:

/var/lib/kibana/phantomjs-2.1.1-linux-x86_64/bin/phantomjs --load-images=true --ssl-protocol=any --ignore-ssl-errors=true /usr/share/kibana/node_modules/@elastic/node-phantom-simple/bridge.js 127.0.0.1 33761

I cannot understand why the phantomjs process is still picking up localhost. I looked for all settings, but could not understand what decides the host (A random port is used for every attempt I believe)

Can you please suggest, what I am missing here.

Can you try setting the xpack.reporting.capture.browser.type key in kibana.yml to Chromium? Phantom.js isn't supported any longer and it was deprecated in 6.8.

Hi @Marius_Dragomir

I added xpack.reporting.capture.browser.type key in kibana.yml and now I am getting the below error:

Error: Error spawning Chromium browser: Error: Failed to launch chrome! /var/lib/kibana/headless_shell-linux/headless_shell: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /var/lib/kibana/headless_shell-linux/headless_shell) /var/lib/kibana/headless_shell-linux/headless_shell: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by /var/lib/kibana/headless_shell-linux/headless_shell) /var/lib/kibana/headless_shell-linux/headless_shell: /lib64/libc.so.6: version `GLIBC_2.16' not found (required by /var/lib/kibana/headless_shell-linux/headless_shell) TROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md

So now I am trying to follow steps mentioned in the below page:
https://www.elastic.co/guide/en/kibana/master/reporting-troubleshooting.html

However ports 80 and 443 are blocked on the LPAR, hence I have to manually download rpm packages and the list of dependencies keep on growing :roll_eyes: (already downloaded 20+ rpms).

Will install all the packages and re-try.

Thanks

Hi @Marius_Dragomir,

I installed all the dependencies listed on the troubleshooting page. Then I ran the below command to check dependencies of chromium browser.
ldd headless_shell |grep not

which returned the below missing dependencies:

./headless_shell: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./headless_shell)

./headless_shell: /lib64/libc.so.6: version `GLIBC_2.15' not found (required by ./headless_shell)

./headless_shell: /lib64/libc.so.6: version `GLIBC_2.16' not found (required by ./headless_shell)

However, I am using RHEL6.5 and could not find a straightforward method to update libraries (without risking the environment's integrity).
Do you recommend to go down this path? or is this functionality only supposed to work with RHEL7+ ?

Thanks

Sadly starting with Kibana 7.0.0 we dropped support for CentOS/RHEL 6, so you'll have to update the libraries manually. I know it might be risky, so I'd suggest just using a kibana docker container in your OS, as it would be simpler and safer.

Hi @Marius_Dragomir,

I am using Kibana v6.8

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.