<?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 Splunk Db connect app running on Windows with python3 is not working in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/470320#M57796</link>
    <description>&lt;P&gt;Hi Splunkers,&lt;BR /&gt;
We have the following environment:&lt;BR /&gt;
• Splunk - 8.0.0&lt;BR /&gt;
• OS – Windows server 2016&lt;BR /&gt;
• Splunk db_connect_app – 3.2.0/3.3.1&lt;BR /&gt;
• Python – python3&lt;BR /&gt;
• Jre – 1.8&lt;BR /&gt;
NOTE: Machine has timezone variable set (TZ)&lt;BR /&gt;
With the above configurations splunk db_connect_app throws exception on the UI as &lt;STRONG&gt;“Not able to communicate with task server”&lt;/STRONG&gt; and this is due to the fact that &lt;STRONG&gt;dbx_logging _formatter.py&lt;/STRONG&gt;  throws an exception while calling this line “&lt;EM&gt;os.unsetenv(‘TZ’)&lt;/EM&gt;” and the exception is as follows:&lt;BR /&gt;
&lt;STRONG&gt;“module ‘os’ has no attribute ‘unsetenv’”&lt;/STRONG&gt; &lt;BR /&gt;
After looking at python3 sdk, we found &lt;EM&gt;unsetenv&lt;/EM&gt; method is not present in the &lt;EM&gt;os module&lt;/EM&gt;. This particular piece of code has to be replaced by &lt;EM&gt;os.putenv(‘TZ’, None)&lt;/EM&gt;, when running with python3&lt;BR /&gt;
Please let us know, if this is an issue or there is some work around. But we can not &lt;STRONG&gt;unset ‘TZ’&lt;/STRONG&gt; as a work around and we can not degrade python3 to python2&lt;/P&gt;

&lt;P&gt;TIA&lt;BR /&gt;
Hanika&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 05:36:40 GMT</pubDate>
    <dc:creator>hanika001</dc:creator>
    <dc:date>2020-09-30T05:36:40Z</dc:date>
    <item>
      <title>Splunk Db connect app running on Windows with python3 is not working</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/470320#M57796</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;BR /&gt;
We have the following environment:&lt;BR /&gt;
• Splunk - 8.0.0&lt;BR /&gt;
• OS – Windows server 2016&lt;BR /&gt;
• Splunk db_connect_app – 3.2.0/3.3.1&lt;BR /&gt;
• Python – python3&lt;BR /&gt;
• Jre – 1.8&lt;BR /&gt;
NOTE: Machine has timezone variable set (TZ)&lt;BR /&gt;
With the above configurations splunk db_connect_app throws exception on the UI as &lt;STRONG&gt;“Not able to communicate with task server”&lt;/STRONG&gt; and this is due to the fact that &lt;STRONG&gt;dbx_logging _formatter.py&lt;/STRONG&gt;  throws an exception while calling this line “&lt;EM&gt;os.unsetenv(‘TZ’)&lt;/EM&gt;” and the exception is as follows:&lt;BR /&gt;
&lt;STRONG&gt;“module ‘os’ has no attribute ‘unsetenv’”&lt;/STRONG&gt; &lt;BR /&gt;
After looking at python3 sdk, we found &lt;EM&gt;unsetenv&lt;/EM&gt; method is not present in the &lt;EM&gt;os module&lt;/EM&gt;. This particular piece of code has to be replaced by &lt;EM&gt;os.putenv(‘TZ’, None)&lt;/EM&gt;, when running with python3&lt;BR /&gt;
Please let us know, if this is an issue or there is some work around. But we can not &lt;STRONG&gt;unset ‘TZ’&lt;/STRONG&gt; as a work around and we can not degrade python3 to python2&lt;/P&gt;

&lt;P&gt;TIA&lt;BR /&gt;
Hanika&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:36:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/470320#M57796</guid>
      <dc:creator>hanika001</dc:creator>
      <dc:date>2020-09-30T05:36:40Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Db connect app running on Windows with python3 is not working</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/507253#M62308</link>
      <description>&lt;P&gt;We are also struggling with this issue. Did you already found a solution?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 13:33:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/507253#M62308</guid>
      <dc:creator>MaverickT</dc:creator>
      <dc:date>2020-07-03T13:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Db connect app running on Windows with python3 is not working</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/507255#M62309</link>
      <description>&lt;P&gt;I've managed to fix it, by changing TZ to our local timezone in&amp;nbsp;&lt;STRONG&gt;dbx_logging _formatter.py.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;From this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if os.getenv('TZ'):
    os.unsetenv('TZ')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;if os.getenv('TZ'):
    os.putenv('TZ', 'Europe/Ljubljana')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work until app is upgraded... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks for this question, it directed me towards solution.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 14:02:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Splunk-Db-connect-app-running-on-Windows-with-python3-is-not/m-p/507255#M62309</guid>
      <dc:creator>MaverickT</dc:creator>
      <dc:date>2020-07-03T14:02:04Z</dc:date>
    </item>
  </channel>
</rss>

