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!

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...

Splunk AppDynamics Agents Webinar Series

Mark your calendars! On June 24th at 12PM PST, we’re going live with the second session of our Splunk ...

SplunkTrust Application Period is Officially OPEN!

It's that time, folks! The application/nomination period for the 2025 SplunkTrust is officially open! If you ...