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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...