Reporting

Schedule PDF Delivery -> Preview not working

czarny
Engager

I got yesterday problem with PDF Server. Scheduling is working correclty and I get PDFs on my email with dashboards but when I click Schedule PDF Delivery and then Preview, I got new tab and information "Connecting..." and "Waiting for ...." all the time.

2013-03-19 23:43:25,239 +0100 INFO      pdfhandler:646 - Starting PDF App Renderer Version 1.3
2013-03-19 23:43:25,239 INFO Starting PDF App Renderer Version 1.3
2013-03-19 23:43:25,246 +0100 INFO      xvfb:45 - Started new X server. Now 1 active
2013-03-19 23:43:25,246 INFO Started new X server. Now 1 active
2013-03-19 23:43:25,247 +0100 INFO      pdfhandler:558 - Executing /opt/splunk/etc/apps/pdfserver/bin/firefox-x86_64/firefox -print http://splunk/en-US/app/search/nick_test -printmode pdf -printfile /tmp/tmpfFBIP3 -title Splunk Report -orientation portrait -paperwidth 297 -paperheight 219 -mode splunk -timeout 1600 -windowsize 1075x768 -footer_right Generated by Splunk at &D -cookie session_id_None=3335d0989e4a608ee71f290965b3ff7f06fdbfa3
2013-03-19 23:43:25,247 INFO Executing /opt/splunk/etc/apps/pdfserver/bin/firefox-x86_64/firefox -print http://splunk/en-US/app/search/nick_test -printmode pdf -printfile /tmp/tmpfFBIP3 -title Splunk Report -orientation portrait -paperwidth 297 -paperheight 219 -mode splunk -timeout 1600 -windowsize 1075x768 -footer_right Generated by Splunk at &D -cookie session_id_None=3335d0989e4a608ee71f290965b3ff7f06fdbfa3
2013-03-19 23:43:25,252 +0100 INFO      xvfb:205 - Assigned DISPLAY :11
2013-03-19 23:43:25,252 INFO Assigned DISPLAY :11
2013-03-19 23:43:25,252 +0100 INFO      xvfb:115 - Starting X Server: ['/usr/bin/Xvfb', ':11', '-screen', '0', '3000x768x24', '-nolisten', 'tcp']
2013-03-19 23:43:25,252 INFO Starting X Server: ['/usr/bin/Xvfb', ':11', '-screen', '0', '3000x768x24', '-nolisten', 'tcp']
2013-03-19 23:43:25,252 +0100 INFO      xvfb:116 - Starting X Server env: {'XAUTHORITY': '/opt/splunk/var/run/splunk/xvfb/xauth-11/Xauthority'}
2013-03-19 23:43:25,252 INFO Starting X Server env: {'XAUTHORITY': '/opt/splunk/var/run/splunk/xvfb/xauth-11/Xauthority'}
2013-03-19 23:43:27,256 +0100 INFO      xvfb:122 - X Started
2013-03-19 23:43:27,256 INFO X Started

Mostly logs ends with that line, but sometimes it is also added:

   2013-03-19 23:45:25,931 +0100 INFO      pdfhandler:628 - Generated pdf file.  bytes=63010 time=1603.79

But new tab where PDF should appear is still "Loading....".

0 Karma

michael_bates_1
Path Finder

Hello,

The following is the details of a bug that I raised last September.
This was supposedly to fixed under SOLN-2157 but I have just checked the newest download and it has not been incoroporated.

Can you please check and test/apply to see if this resolves your issue.

Michael



*** NEW SUPPORT CASE ***
Case #: 98857
Thread ID: ref:_00D409oyL._50040MvSEm:ref
Priority: P3

Subject: Coding issue with PDF Server App

Description: Had minor issues getting this app to work fully. Whilst basic configuration was as per the docs, the app was unable to actaully display the PDF as a preview (from dashboard, action=schedule for delivery, then select preview), yet the preview worked from the manager -> system -> email alert, pdf server status page.

After much digging it was found that when running the status page under system settings, the web port (443) was passed to the pdf app correctly, yet when runnging the preview of a scheduled job, the port was not passed.

Digging into the code, a default value of "None" is applied if the port is not present, but further down the code checks for a value of -1.

This behaviour was fixed by modifying the following in bin/pdfhandler.py (part of the pdfserver app)

line 303, from

if port == -1:

to

if port == -1 or port is None:

line 660, from

if target_port == -1:

to

if target_port == -1 or target_port is None:

This ensures that the cert_overrides and cookie values are correctly created by the app.


dglinder
Path Finder

Thanks Michael.Bates! This was the fix for me. My underlying problem was the use of self-signed certs that created a PDF of the Firefox "connection is untrusted" error page. Fixing these two lines allows the PDF to generate correctly.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...