Splunk Search

Getting authentication error when session login fails in Azure Databricks.

Observer

Hi All,

I am trying to access Splunk from inside the Azure Databricks instances. I have requirements to run queries for the period of 6 hours. I break it down into 30 minute windows and submit the jobs. For each window, I send the query using Python splunklib, execute it, and then persist the result and finally delete my job. Then I try the next window, and so on. However, what happens it works for the first 2 or 3 windows without any issues but it fails on the next one with authentication issues. This was running without any issue before 2 weeks. 

Code Used to authenticate: 

client.connect(host=splunk_auth_params["host"], username=splunk_auth_params["uname"], password=splunk_auth_params["password"])

Error:

AuthenticationError: Request failed: Session is not logged in.
HTTPError: HTTP 401 Unauthorized -- call not properly authenticated During handling of the above exception, another exception occurred:

I am using Python splunklib. Any help would be greatly appreciated.

Labels (1)
0 Karma