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!

Splunk Security Content for Threat Detection & Response, Q1 Roundup

Join Principal Threat Researcher, Michael Haag, as he walks through:An introduction to the Splunk Threat ...

Splunk Life | Happy Pride Month!

Happy Pride Month, Splunk Community! 🌈 In the United States, as well as many countries around the ...

SplunkTrust | Where Are They Now - Michael Uschmann

The Background Five years ago, Splunk published several videos showcasing members of the SplunkTrust to share ...