<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Where should I check for python.log error messages about generating pdf of scheduled reports? in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220083#M4586</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I get the following error while receiving some scheduled reports in Splunk 6.2.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;An error occurred while generating the PDF. Please see python.log for details.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, NOT all reports generate the pdf, only some of them do.&lt;BR /&gt;
And the following are the lines of the python.log under opt/splunk//var/log/splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-01-01 09:01:41,038 +0100 ERROR     pdfgen_endpoint:230 - No views prepared without exceptions. Bailing out of Integrated PDF Generation.
2016-01-01 09:01:41,172 +0100 ERROR     sendemail:971 - An error occurred while generating a PDF: Failed to fetch PDF (status = 400): Unable to render PDF.&amp;amp;lt;br/&amp;amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Exception raised while trying to prepare "MY OTHER REPORT" for rendering to PDF. Splunkd daemon is not responding: ('Error connecting to /servicesNS/admin/MY_APP/search/parser: The read operation timed out',)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;
2016-01-01 09:01:57,389 +0100 ERROR     __init__:477 - Socket error communicating with splunkd (error=The read operation timed out), path = /servicesNS/admin/servicedesk_plus/search/parser
2016-01-01 09:01:57,390 +0100 ERROR     pdfgen_endpoint:224 - Exception raised while trying to prepare "MY REPORT" for rendering to PDF. Splunkd daemon is not responding: ('Error connecting to /servicesNS/admin/MY APP/search/parser: The read operation timed out',)
2016-01-01 09:01:57,390 +0100 ERROR     pdfgen_endpoint:230 - No views prepared without exceptions. Bailing out of Integrated PDF Generation.
2016-01-01 09:01:57,514 +0100 ERROR     sendemail:971 - An error occurred while generating a PDF: Failed to fetch PDF (status = 400): Unable to render PDF.&amp;amp;lt;br/&amp;amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Exception raised while trying to prepare "MY REPORT" for rendering to PDF. Splunkd daemon is not responding: ('Error connecting to /servicesNS/admin/MY APP/search/parser: The read operation timed out',)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is exactly the issue?&lt;/P&gt;

&lt;P&gt;Thanks for any help,&lt;BR /&gt;
Skender&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2016 14:20:07 GMT</pubDate>
    <dc:creator>skender27</dc:creator>
    <dc:date>2016-01-07T14:20:07Z</dc:date>
    <item>
      <title>Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220083#M4586</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I get the following error while receiving some scheduled reports in Splunk 6.2.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;An error occurred while generating the PDF. Please see python.log for details.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But, NOT all reports generate the pdf, only some of them do.&lt;BR /&gt;
And the following are the lines of the python.log under opt/splunk//var/log/splunk:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-01-01 09:01:41,038 +0100 ERROR     pdfgen_endpoint:230 - No views prepared without exceptions. Bailing out of Integrated PDF Generation.
2016-01-01 09:01:41,172 +0100 ERROR     sendemail:971 - An error occurred while generating a PDF: Failed to fetch PDF (status = 400): Unable to render PDF.&amp;amp;lt;br/&amp;amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Exception raised while trying to prepare "MY OTHER REPORT" for rendering to PDF. Splunkd daemon is not responding: ('Error connecting to /servicesNS/admin/MY_APP/search/parser: The read operation timed out',)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;
2016-01-01 09:01:57,389 +0100 ERROR     __init__:477 - Socket error communicating with splunkd (error=The read operation timed out), path = /servicesNS/admin/servicedesk_plus/search/parser
2016-01-01 09:01:57,390 +0100 ERROR     pdfgen_endpoint:224 - Exception raised while trying to prepare "MY REPORT" for rendering to PDF. Splunkd daemon is not responding: ('Error connecting to /servicesNS/admin/MY APP/search/parser: The read operation timed out',)
2016-01-01 09:01:57,390 +0100 ERROR     pdfgen_endpoint:230 - No views prepared without exceptions. Bailing out of Integrated PDF Generation.
2016-01-01 09:01:57,514 +0100 ERROR     sendemail:971 - An error occurred while generating a PDF: Failed to fetch PDF (status = 400): Unable to render PDF.&amp;amp;lt;br/&amp;amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Exception raised while trying to prepare "MY REPORT" for rendering to PDF. Splunkd daemon is not responding: ('Error connecting to /servicesNS/admin/MY APP/search/parser: The read operation timed out',)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What is exactly the issue?&lt;/P&gt;

&lt;P&gt;Thanks for any help,&lt;BR /&gt;
Skender&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 14:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220083#M4586</guid>
      <dc:creator>skender27</dc:creator>
      <dc:date>2016-01-07T14:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220084#M4587</link>
      <description>&lt;P&gt;Could it be because of some restart of splunk daemon?&lt;/P&gt;

&lt;P&gt;Skender&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 14:38:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220084#M4587</guid>
      <dc:creator>skender27</dc:creator>
      <dc:date>2016-01-07T14:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220085#M4588</link>
      <description>&lt;P&gt;I had the same issue.  I finally figured it out.  To find out if you're having the same issue look splunkd_access.log in $SPLUNK_HOME/var/log/splunk.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user@server:/opt/splunk/var/log/splunk# grep Cisco splunkd_access.log
127.0.0.1 - splunk-system-user [17/May/2016:15:26:34.142 -0400] "POST /servicesNS/nobody/search/saved/searches/Audit%20Cisco%20Changes/notify?trigger.condition_state=1 HTTP/1.0" 200 1928 - - - 10ms
127.0.0.1 - splunk-system-user [17/May/2016:15:26:34.339 -0400] "GET /servicesNS/user/search/saved/searches/Audit%20Cisco%20Changes?output_mode=json HTTP/1.0" 200 34334 - - - 15ms
127.0.0.1 - splunk-system-user [17/May/2016:15:26:34.730 -0400] "GET /servicesNS/user/search/saved/searches/Audit%20Cisco%20Changes HTTP/1.0" 200 57101 - - - 11ms
127.0.0.1 - splunk-system-user [17/May/2016:15:26:34.498 -0400] "GET /services/pdfgen/render?paper-size=legal-landscape&amp;amp;sid=scheduler_cm9uLm9nbGU__search__RMD5ec6c9fa239e4c78b_at_1463513100_76&amp;amp;input-report=Audit%20Cisco%20Changes&amp;amp;now=1463513100&amp;amp;owner=user&amp;amp;namespace=search HTTP/1.0" **400** 272 - - - **60452ms**
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In the log above, you can see the last line has a "400" status code and a time value of "60452ms".  The status code will show up in the python.log.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user@server:/opt/splunk/var/log/splunk# grep Cisco python.log
2016-05-17 15:26:34.498 -0400 ERROR sendemail:996 - An error occurred while generating a PDF: Failed to fetch PDF (**status = 400**): Unable to render PDF.&amp;lt;br/&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Exception raised while trying to prepare "Audit Cisco Changes" for rendering to PDF. Splunkd daemon is not responding: ("Error connecting to /servicesNS/user/search/search/parser: ('The read operation timed out',)",)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;
2016-05-17 15:26:34,979 -0400 INFO  sendemail:112 - Sending email. subject="Splunk Report: Audit Cisco Changes", results_link="https://server.admin.local:8000/app/search/@go?sid=scheduler_cm9uLm9nbGU__search__RMD5ec6c9fa239e4c78b_at_1463462400_63889", recipients="[u'hosted@service-now.com']", server="smtp.admin.local"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The error will also show up in the pdfgen.log:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;user@server:/opt/splunk/var/log/splunk# grep -i cisco pdfgen.log
2016-05-17 15:26:34,885 -**0400** ERROR pdfgen_utils:481 - Exception raised while trying to prepare "Audit PCI Cisco Changes New" for rendering to PDF. Splunkd daemon is not responding: ("Error connecting to /servicesNS/user/search/search/parser: ('The read operation timed out',)",)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So that is how to verify that you have the same problem that I had.  To fix this problem, you have to change the splunkdConnectionTimeout value in web.conf to something bigger than the time found in the splunkd_access.log file.  In my case, I changed the value to 90 (seconds).  The default value is 30 seconds.&lt;/P&gt;

&lt;P&gt;To make the change, copy or create the web.conf file from etc/system/default/web.conf to etc/system/local/web.conf.  Change the splunkdConnectionTimeout= where  is greater than the number is seconds from the splunkd_access.log.  Note that the splunkd_access.log value is in milliseconds.&lt;/P&gt;

&lt;P&gt;Restart the Splunkd service.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 09:43:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220085#M4588</guid>
      <dc:creator>ronogle</dc:creator>
      <dc:date>2020-09-29T09:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220086#M4589</link>
      <description>&lt;P&gt;great write up; thx&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2016 15:18:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220086#M4589</guid>
      <dc:creator>kwanx</dc:creator>
      <dc:date>2016-07-29T15:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220087#M4590</link>
      <description>&lt;P&gt;Hi @skender27&lt;/P&gt;

&lt;P&gt;Just wanted to follow up to see if this answer by @ronogle worked for you? If yes, please be sure to resolve the post by clicking "Accept" directly below the answer. This is a pretty useful topic that would benefit the community. Thanks!&lt;/P&gt;

&lt;P&gt;Patrick&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 20:00:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220087#M4590</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2016-08-04T20:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220088#M4591</link>
      <description>&lt;P&gt;Well explained.  Thank you..&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 14:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220088#M4591</guid>
      <dc:creator>Navanitha</dc:creator>
      <dc:date>2017-04-10T14:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Where should I check for python.log error messages about generating pdf of scheduled reports?</title>
      <link>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220089#M4592</link>
      <description>&lt;P&gt;Very informative writeup.  Thank you for taking the time.  I'm awarding you points for your effort!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 19:10:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Where-should-I-check-for-python-log-error-messages-about/m-p/220089#M4592</guid>
      <dc:creator>the_wolverine</dc:creator>
      <dc:date>2019-11-05T19:10:29Z</dc:date>
    </item>
  </channel>
</rss>

