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

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

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 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/ 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/ 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/ version `GLIBC_2.16' not found (required by /var/lib/kibana/headless_shell-linux/headless_shell) TROUBLESHOOTING:

So now I am trying to follow steps mentioned in the below page:

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.