<?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 Re: Unhandled Exception in Splunk App for Salesforce: &amp;quot;urllib2.URLError: urlopen error [Errno -2] Name or service not known&amp;quot; in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255507#M29397</link>
    <description>&lt;P&gt;@msaltzman_ondeck - Glad you were able to find the solution to your question. Please don't forget to click "Accept" to resolve your post. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2017 20:08:33 GMT</pubDate>
    <dc:creator>aaraneta_splunk</dc:creator>
    <dc:date>2017-04-11T20:08:33Z</dc:date>
    <item>
      <title>Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255501#M29391</link>
      <description>&lt;P&gt;We are attempting to bring the Splunk App for Salesforce into our on-premise Splunk enterprise. When we configured it, it throws the following error:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-26-2017 18:05:15.808 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py" Traceback (most recent call last):
01-26-2017 18:05:15.808 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py", line 395, in &amp;lt;module&amp;gt;
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     run()
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py", line 373, in run
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     session, endpoint = get_salesforce_token(settings, config)
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py", line 227, in get_salesforce_token
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     handle = urllib2.urlopen(req)
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/lib/python2.7/urllib2.py", line 154, in urlopen
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     return opener.open(url, data, timeout)
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/lib/python2.7/urllib2.py", line 431, in open
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     response = self._open(req, data)
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/lib/python2.7/urllib2.py", line 449, in _open
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     '_open', req)
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/lib/python2.7/urllib2.py", line 409, in _call_chain
01-26-2017 18:05:15.809 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     result = func(*args)
01-26-2017 18:05:15.810 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/lib/python2.7/urllib2.py", line 1240, in https_open
01-26-2017 18:05:15.810 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     context=self._context)
01-26-2017 18:05:15.810 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"   File "/opt/splunk/lib/python2.7/urllib2.py", line 1197, in do_open
01-26-2017 18:05:15.810 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py"     raise URLError(err)
01-26-2017 18:05:15.811 -0500 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/splunk-app-sfdc/bin/sfdc_object.py" urllib2.URLError: &amp;lt;urlopen error [Errno -2] Name or service not known&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Unfortunately, this exception is not handled properly, so we don't have insight into what is causing the problem. I tested the username, password, security token, and URL (test.salesforce.com), as well as the request it creates by using those properties, and it is successful. I've even tested using cURL on the server itself without issue. Anyone have some suggestions of what else to look at?&lt;/P&gt;

&lt;P&gt;For reference, here's the library that's failing (/opt/splunk/lib/python2.7/urllib2.py):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1180         headers = dict(
1181             (name.title(), val) for name, val in headers.items())
1182
1183         if req._tunnel_host:
1184             tunnel_headers = {}
1185             proxy_auth_hdr = "Proxy-Authorization"
1186             if proxy_auth_hdr in headers:
1187                 tunnel_headers[proxy_auth_hdr] = headers[proxy_auth_hdr]
1188                 # Proxy-Authorization should not be sent to origin
1189                 # server.
1190                 del headers[proxy_auth_hdr]
1191             h.set_tunnel(req._tunnel_host, headers=tunnel_headers)
1192
1193         try:
1194             h.request(req.get_method(), req.get_selector(), req.data, headers)
1195         except socket.error, err: # XXX what error?
1196             h.close()
1197             raise URLError(err)
1198         else:
1199             try:
1200                 r = h.getresponse(buffering=True)
1201             except TypeError: # buffering kw not supported
1202                 r = h.getresponse()
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Jan 2017 23:16:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255501#M29391</guid>
      <dc:creator>msaltzman_ondec</dc:creator>
      <dc:date>2017-01-26T23:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255502#M29392</link>
      <description>&lt;P&gt;are you using 2.6.2 version of the app? &lt;BR /&gt;
when you type index=sfdc is there anything returned? &lt;/P&gt;</description>
      <pubDate>Thu, 26 Jan 2017 23:55:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255502#M29392</guid>
      <dc:creator>ehaddad_splunk</dc:creator>
      <dc:date>2017-01-26T23:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255503#M29393</link>
      <description>&lt;P&gt;Version 2.6.2 is correct. Unfortunately since this exception isn't handled, it kills the script when it's hit. This occurs for all objects and events. Nothing is in the index.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 13:10:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255503#M29393</guid>
      <dc:creator>msaltzman_ondec</dc:creator>
      <dc:date>2017-01-27T13:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255504#M29394</link>
      <description>&lt;P&gt;Looks like it could be a proxy issue. Did you check if you can get to the internet without proxy? Try to telnet from cmd or check browser setting on HWF.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 18:36:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255504#M29394</guid>
      <dc:creator>ehaddad_splunk</dc:creator>
      <dc:date>2017-01-27T18:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255505#M29395</link>
      <description>&lt;P&gt;telnet output:&lt;BR /&gt;
    $ telnet test.salesforce.com 443&lt;BR /&gt;
    Trying 96.43.149.120...&lt;BR /&gt;
    Connected to test.gslb2.salesforce.com.&lt;BR /&gt;
    Escape character is '^]'.&lt;/P&gt;

&lt;P&gt;There shouldn't be any proxy in the way afiak, but I don't have a browser installed, since this is a linux system to test. If you recommend it still, I will though.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 18:48:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255505#M29395</guid>
      <dc:creator>msaltzman_ondec</dc:creator>
      <dc:date>2017-01-27T18:48:30Z</dc:date>
    </item>
    <item>
      <title>Re: Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255506#M29396</link>
      <description>&lt;P&gt;Took me a bit, but I solved my own problem. Was a typo in the sfdc.conf file. What it was:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sfdc_account]
password = ******
server = test.salesforce.com
token = *****
username = ******
proxy_url = None
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What it should be:&lt;BR /&gt;
    [sfdc_account]&lt;BR /&gt;
    password = ******&lt;BR /&gt;
    server = test.salesforce.com&lt;BR /&gt;
    token = *****&lt;BR /&gt;
    username = ******&lt;BR /&gt;
    proxy_url =&lt;/P&gt;

&lt;P&gt;Thanks to @ehaddad for the clues! It was caused by my automation software adding the text None instead of using it as the null value it represents. Oops &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:38:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255506#M29396</guid>
      <dc:creator>msaltzman_ondec</dc:creator>
      <dc:date>2020-09-29T13:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Unhandled Exception in Splunk App for Salesforce: "urllib2.URLError: urlopen error [Errno -2] Name or service not known"</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255507#M29397</link>
      <description>&lt;P&gt;@msaltzman_ondeck - Glad you were able to find the solution to your question. Please don't forget to click "Accept" to resolve your post. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 20:08:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Unhandled-Exception-in-Splunk-App-for-Salesforce-quot-urllib2/m-p/255507#M29397</guid>
      <dc:creator>aaraneta_splunk</dc:creator>
      <dc:date>2017-04-11T20:08:33Z</dc:date>
    </item>
  </channel>
</rss>

