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!

Build Scalable Security While Moving to Cloud - Guide From Clayton Homes

 Clayton Homes faced the increased challenge of strengthening their security posture as they went through ...

Mission Control | Explore the latest release of Splunk Mission Control (2.3)

We’re happy to announce the release of Mission Control 2.3 which includes several new and exciting features ...

Cloud Platform | Migrating your Splunk Cloud deployment to Python 3.7

Python 2.7, the last release of Python 2, reached End of Life back on January 1, 2020. As part of our larger ...