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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...