Splunk Search

Using Java to make a REST API call to Splunk, why am I getting "HTTP 401 -- call not properly authenticated"?

chandulal
Engager

I am using Java to make REST API call to Splunk to make a blocking search. We had deployed the app two days ago and the Splunk search ran fine for two days. But now it started showing "HTTP 401 -- call not properly authenticated" error. The username and password didn't change. In fact, after I got this error, I used same code base and credentials (pointed to the same server) and tried to run a search deploying on another server and the Splunk call works fine. I have no control over the Splunk server or access to any of server logs. Please help me fix this.

DreadEclipse
Explorer

I was having the same trouble just two days ago. Have you checked with the people in charge of the server where you work? It might be that the Host name or else the Port have changed or else something has happened to your personal information in the last two days (well, since the 22nd of May).
Are you trying to access Splunk through a different source than you used before? When I switched from accessing purely by the internet to using Java, my system gave me the same error. It turns out, if your password has any control characters, you'll need to HTML hard code them into the String or else they might not work every time.
Hope this helps!

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...