-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to resolve connecting to splunk via phython? #489
Comments
Was having the same issue - was using an incorrect URL (one that could handle REST calls), once I updated the host it started to work. |
thanks so much !!
…On Wed, 5 Oct 2022 at 06:00, Jose Riha ***@***.***> wrote:
Was having the same issue - was using an incorrect URL (one that could
handle REST calls), once I updated the host it started to work.
—
Reply to this email directly, view it on GitHub
<#489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKTREPTSL3C6IQ56OZMK753WBV3WRANCNFSM6AAAAAAQ3ABJKQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@fishert123 Can you confirm if this issue is resolved for you and it can be closed? |
Yes, it is working. You can close it.
Thanks so much .
…On Wed, 5 Oct 2022 at 14:00, ncanumalla-splunk ***@***.***> wrote:
@fishert123 <https://github.com/fishert123> Can you confirm if this issue
is resolved for you and it can be closed?
—
Reply to this email directly, view it on GitHub
<#489 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKTREPRBBADBOSUABNG32PLWBXT65ANCNFSM6AAAAAAQ3ABJKQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the same error
Traceback (most recent call last):
File "./HelloWorld.py", line 19, in
service = client.connect(host='splunk.xxxx.edu', port=443, username='user1', password=pswd)
File "/usr/lib/python2.7/site-packages/splunklib/client.py", line 331, in connect
s.login()
File "/usr/lib/python2.7/site-packages/splunklib/binding.py", line 886, in login
session = XML(body).findtext("./sessionKey")
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1300, in XML
parser.feed(text)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1642, in feed
self._raiseerror(v)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror
raise err
xml.etree.ElementTree.ParseError: syntax error: line 1, column 0
I came across a reply here #311
The response body isn't xml, it's html:
b'<!doctype html><title>303 See Other</title>
See Other
The resource has moved temporarily here.
\r\n'How to resolve this ? Can I force python script to accept html instead of xml ?
thanks !!
The text was updated successfully, but these errors were encountered: