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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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