Getting Data In

Java SDK Program Connection Reset

Guangjie
Observer

I created a first Java program with Splunk SDK and set scheme to "http". But I haven't this "Exception in thread "main" java.lang.RuntimeException: Connection reset".

 

 

 

ServiceArgs serviceArgs = new ServiceArgs();
serviceArgs.setUsername("admin");
serviceArgs.setPassword("password");
serviceArgs.setHost("192.168.1.88");
serviceArgs.setPort(8089);
serviceArgs.setScheme("http");
Service service = Service.connect(serviceArgs);
Args oneshotSearchArgs = new Args();
InputStream resultsStream = service.oneshotSearch("search index=_internal | head 5",oneshotSearchArgs);

 

 

 

Labels (1)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Unlock New Opportunities with Splunk Education: Explore Our Latest Courses!

At Splunk Education, we’re dedicated to providing top-tier learning experiences that cater to every skill ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...