<?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: Python SDK ValueError: Invalid IPv6 URL in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-ValueError-Invalid-IPv6-URL/m-p/497272#M8951</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You are using wrong port number while trying to connect to Splunk using Python SDK. You need to use splunk management port (default is 8089) and in host you need to just provide hostname or IP address (Do not pass http:// or &lt;A href="https://)" target="test_blank"&gt;https://)&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Have alook at example here &lt;A href="https://dev.splunk.com/enterprise/docs/python/sdk-python/howtousesplunkpython/howtoconnectpython/"&gt;https://dev.splunk.com/enterprise/docs/python/sdk-python/howtousesplunkpython/howtoconnectpython/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 18:40:44 GMT</pubDate>
    <dc:creator>harsmarvania57</dc:creator>
    <dc:date>2019-12-05T18:40:44Z</dc:date>
    <item>
      <title>Python SDK ValueError: Invalid IPv6 URL</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-ValueError-Invalid-IPv6-URL/m-p/497271#M8950</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to connecting my Splunk server via Python SDK&lt;/P&gt;

&lt;P&gt;Code:&lt;BR /&gt;
 import splunklib.client as client&lt;BR /&gt;
    service = client.connect(host='&lt;A href="https://website.com" target="_blank"&gt;https://website.com&lt;/A&gt;', port=443,&lt;BR /&gt;
                       scheme='https', username='mineuser', password='xxxxxxxxxxx')&lt;BR /&gt;
    assert isinstance(service, client.Service)&lt;/P&gt;

&lt;P&gt;Error:&lt;BR /&gt;
Traceback (most recent call last):&lt;BR /&gt;
  File "search.py", line 116, in &lt;BR /&gt;
    main(sys.argv[1:])&lt;BR /&gt;
  File "search.py", line 73, in main&lt;BR /&gt;
    service = client.connect(**kwargs_splunk)&lt;BR /&gt;
  File "../splunklib/client.py", line 333, in connect&lt;BR /&gt;
    s.login()&lt;BR /&gt;
  File "../splunklib/binding.py", line 873, in login&lt;BR /&gt;
    cookie="1") # In Splunk 6.2+, passing "cookie=1" will return the "set-cookie" header&lt;BR /&gt;
  File "../splunklib/binding.py", line 1225, in post&lt;BR /&gt;
    return self.request(url, message)&lt;BR /&gt;
  File "../splunklib/binding.py", line 1242, in request&lt;BR /&gt;
    response = self.handler(url, message, **kwargs)&lt;BR /&gt;
  File "../splunklib/binding.py", line 1367, in request&lt;BR /&gt;
    scheme, host, port, path = _spliturl(url)&lt;BR /&gt;
  File "../splunklib/binding.py", line 1072, in _spliturl&lt;BR /&gt;
    parsed_url = urllib.parse.urlparse(url)&lt;BR /&gt;
  File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py", line 143, in urlparse&lt;BR /&gt;
    tuple = urlsplit(url, scheme, allow_fragments)&lt;BR /&gt;
  File "/usr/local/Cellar/python@2/2.7.16_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urlparse.py", line 214, in urlsplit&lt;BR /&gt;
    raise ValueError("Invalid IPv6 URL")&lt;BR /&gt;
ValueError: Invalid IPv6 URL&lt;/P&gt;

&lt;P&gt;What i am doing wrong, Help Please. &lt;/P&gt;

&lt;P&gt;Python 2.7.16&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:11:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-ValueError-Invalid-IPv6-URL/m-p/497271#M8950</guid>
      <dc:creator>arvindlavania</dc:creator>
      <dc:date>2020-09-30T03:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Python SDK ValueError: Invalid IPv6 URL</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-ValueError-Invalid-IPv6-URL/m-p/497272#M8951</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;You are using wrong port number while trying to connect to Splunk using Python SDK. You need to use splunk management port (default is 8089) and in host you need to just provide hostname or IP address (Do not pass http:// or &lt;A href="https://)" target="test_blank"&gt;https://)&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Have alook at example here &lt;A href="https://dev.splunk.com/enterprise/docs/python/sdk-python/howtousesplunkpython/howtoconnectpython/"&gt;https://dev.splunk.com/enterprise/docs/python/sdk-python/howtousesplunkpython/howtoconnectpython/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 18:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Python-SDK-ValueError-Invalid-IPv6-URL/m-p/497272#M8951</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2019-12-05T18:40:44Z</dc:date>
    </item>
  </channel>
</rss>

