Splunk Dev

Getting com.splunk.HttpException: HTTP 404 exception While connect the Splunk using Service.connect method

npbala_22
Explorer

Am getting com.splunk.HttpException: HTTP 404 error while connect the Splunk Can you help to resolve this issue.

Exception in thread "main" com.splunk.HttpException: HTTP 404 -- !DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 StrictEN" "http:www.w3.orgTRxhtml1DTDxhtml1-strict.dtd"
!--
This is a static HTML string template to render errors. To edit this

template, see appservermrsparkleliberror.py.

html xmlns="http:www.w3.org1999xhtml" xmlns:splunk="http:www.splunk.comxhtml-extensions1.0" xml:lang="en"
head
meta http-equiv="content-type" content="texthtml; charset=utf-8"
meta name="referrer" content="never"
meta name="referrer" content="no-referrer"
link rel="shortcut icon" href="en-USstatic@1AE253554F5B04D49CF314151F223EDE8A04EA9914ED78C796E132ED991C9486imgfavicon.ico"
titlePage not found! - Splunktitle
style
* { margin: 0; padding: 0; }
body { font-family: helvetica, arial, sans-serif; color: #333; padding: 20px; }
p,pre { margin-bottom: 1em; font-size: .8em; }
.status { font-size: .7em; color: #999; margin-bottom: 1em; }
.msg { margin-bottom: 1em; font-size: 1.4em;}
pre { font-family: Monaco,Courier Bold,Courier New,monospace; font-size: .7em;background-color: #eee; padding: 5px;}
#toggle { font-size: .8em; margin-bottom: 1em; }
.byline { color: #555; }
.byline span { font-weight: bold; line-height: 1.4em; }
hr { height: 1px; background-color: #ccc; border: 0; margin: 20px 0 10px; }
h2 { font-size: 1em; margin-bottom: 1em; }
table { border-collapse: collapse; }
td { padding: 2px; }
td.k { font-family: helvetica, arial, sans-serif; font-weight: bold; }
#debug { display: none; }
#crashes { margin: 20px 0; padding: 10px; border: 1px solid #800; }
#crashes dt { font-size: 12px; margin-bottom: 5px; }
#crashes dd { white-space: pre; background: #f2f2f2; padding: 10px; margin-left: 20px; display: none; font: 10px Monaco,Courier Bold,Courier New,monospace; }
style
script
function toggle(what) {
what = document.getElementById(what);
if (what.style.display == 'block') {
what.style.display = 'none';
} else {
what.style.display = 'block';
}
}
script
head
body
p class="status"404 Not Foundp
p class="homelink"a href=""Return to Splunk home pageap
h1 class="msg"Page not found!h1
a href="en-USappsearchsearch?q=index%3D_internal%20host%3D%22fcvas2751%22%20source%3D%2Aweb_service.log%20log_level%3DERROR%20requestid%3D5aa778a39e7f776a13cf10" target="_blank"View more information about your request (request ID = 5aa778a39e7f776a13cf10) in Searcha
br
br

br 
br 

hr 
p class="byline"You are using spanxx.xxx.x.xxx:8000span, which is connected to splunkd span@aeae3fe0c5afspan at spanhttps:127.0.0.1:8089span on spanTue Mar 13 03:07:15 2018span.p

body
html --

at com.splunk.HttpException.create(HttpException.java:84)
at com.splunk.HttpService.send(HttpService.java:500)
at com.splunk.Service.send(Service.java:1295)
at com.splunk.HttpService.get(HttpService.java:169)
at com.splunk.ResourceCollection.list(ResourceCollection.java:288)
at com.splunk.ResourceCollection.refresh(ResourceCollection.java:331)
at com.splunk.ResourceCollection.refresh(ResourceCollection.java:29)
at com.splunk.Resource.validate(Resource.java:186)
at com.splunk.ResourceCollection.validate(ResourceCollection.java:356)
at com.splunk.ResourceCollection.values(ResourceCollection.java:363)
at com.sdn.core.SplunkWrappers.connectSplunk(SplunkWrappers.java:31)
at com.sdn.core.SplunkWrappers.main(SplunkWrappers.java:37)
Tags (1)
0 Karma

p_gurav
Champion

Can you put question in 101010 editor?

0 Karma

npbala_22
Explorer

Hi

Exception in thread "main" com.splunk.HttpException: HTTP 404 --
<!--
This is a static HTML string template to render errors. To edit this
template, see appserver/mrsparkle/lib/error.py.
-->






Page not found! - Splunk




404 Not Found



Page not found!


View more information about your request (request ID = 5aa8e41e1a7f776ad99910) in Search
<br/>
<br/>

    &lt;br/&gt;
    &lt;br/&gt;

    <hr />
    <p class="byline">You are using <span>12.233.43.3:8000</span>, which is connected to splunkd <span>@aeae3fe0c5af</span> at <span>https://127.0.0.1:8089</span> on <span>Wed Mar 14 04:58:06 2018</span>.</p>
</body>
</html>

    at com.splunk.HttpException.create(HttpException.java:84)
    at com.splunk.HttpService.send(HttpService.java:500)
    at com.splunk.Service.send(Service.java:1295)
    at com.splunk.HttpService.post(HttpService.java:348)
    at com.splunk.Service.login(Service.java:1124)
    at com.splunk.Service.login(Service.java:1103)
    at com.splunk.Service.connect(Service.java:189)
    at com.sdn.core.sample.connectSplunk(sample.java:23)
    at com.sdn.core.sample.main(sample.java:13)
0 Karma

p_gurav
Champion
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

Step into “Hunt the Insider: An Splunk ES Premier Mystery” to catch a cybercriminal ...

After a whole week of being on call, you fell asleep on your keyboard, and you hit a sequence of buttons that ...

SplunkTrust Application Period is Officially OPEN!

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