<?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: splunklib.client as client IPv6 Error in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/splunklib-client-as-client-IPv6-Error/m-p/428234#M5509</link>
    <description>&lt;P&gt;"I have pinged the url and also nslookup it and I cannot retrieve an IPv6 address."&lt;/P&gt;

&lt;P&gt;That could well be your issue if you are unable to resolve the URL.&lt;/P&gt;

&lt;P&gt;Is the Splunk Server running on IPv4 or IPv6?&lt;BR /&gt;
How is it configured in server.conf, and web.conf?&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/ConfigureSplunkforIPv6"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/ConfigureSplunkforIPv6&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Splunk and the rest API is supported on both 4&amp;amp;6.&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2019 15:45:39 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2019-03-15T15:45:39Z</dc:date>
    <item>
      <title>splunklib.client as client IPv6 Error</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/splunklib-client-as-client-IPv6-Error/m-p/428233#M5508</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am attempting to access the REST api of a splunk instance through Python and am receiving an IPv6 error in parsing the URL I provided. I have pinged the url and also nslookup it and I cannot retrieve an IPv6 address. The code I am using is straight from the docs:&lt;/P&gt;

&lt;P&gt;import splunklib.client as client&lt;BR /&gt;
service = client.connect(host=url, port=port,&lt;BR /&gt;
                   username=username, password=password)&lt;BR /&gt;
assert isinstance(service, client.Service)&lt;/P&gt;

&lt;P&gt;The final error message is:&lt;BR /&gt;
~\Anaconda3\lib\site-packages\splunklib\binding.py in _spliturl(url)&lt;BR /&gt;
   1069 # Crack the given url into (scheme, host, port, path)&lt;BR /&gt;
   1070 def _spliturl(url):&lt;BR /&gt;
-&amp;gt; 1071     parsed_url = urllib.parse.urlparse(url)&lt;BR /&gt;
   1072     host = parsed_url.hostname&lt;BR /&gt;
   1073     port = parsed_url.port&lt;/P&gt;

&lt;P&gt;~\Anaconda3\lib\urllib\parse.py in urlparse(url, scheme, allow_fragments)&lt;BR /&gt;
    366     (e.g. netloc is a single string) and we don't expand % escapes."""&lt;BR /&gt;
    367     url, scheme, _coerce_result = _coerce_args(url, scheme)&lt;BR /&gt;
--&amp;gt; 368     splitresult = urlsplit(url, scheme, allow_fragments)&lt;BR /&gt;
    369     scheme, netloc, url, query, fragment = splitresult&lt;BR /&gt;
    370     if scheme in uses_params and ';' in url:&lt;/P&gt;

&lt;P&gt;~\Anaconda3\lib\urllib\parse.py in urlsplit(url, scheme, allow_fragments)&lt;BR /&gt;
    438         if (('[' in netloc and ']' not in netloc) or&lt;BR /&gt;
    439                 (']' in netloc and '[' not in netloc)):&lt;BR /&gt;
--&amp;gt; 440             raise ValueError("Invalid IPv6 URL")&lt;BR /&gt;
    441     if allow_fragments and '#' in url:&lt;BR /&gt;
    442         url, fragment = url.split('#', 1)&lt;/P&gt;

&lt;P&gt;Please assist, or let me know if IPv4 is not supported with the splunk api for Python.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:36:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/splunklib-client-as-client-IPv6-Error/m-p/428233#M5508</guid>
      <dc:creator>jlittiebrant</dc:creator>
      <dc:date>2020-09-29T23:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: splunklib.client as client IPv6 Error</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/splunklib-client-as-client-IPv6-Error/m-p/428234#M5509</link>
      <description>&lt;P&gt;"I have pinged the url and also nslookup it and I cannot retrieve an IPv6 address."&lt;/P&gt;

&lt;P&gt;That could well be your issue if you are unable to resolve the URL.&lt;/P&gt;

&lt;P&gt;Is the Splunk Server running on IPv4 or IPv6?&lt;BR /&gt;
How is it configured in server.conf, and web.conf?&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/ConfigureSplunkforIPv6"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.4/Admin/ConfigureSplunkforIPv6&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Splunk and the rest API is supported on both 4&amp;amp;6.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 15:45:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/splunklib-client-as-client-IPv6-Error/m-p/428234#M5509</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-15T15:45:39Z</dc:date>
    </item>
  </channel>
</rss>

