Getting Data In

Http Service Exception

KAjnadkar
Explorer

My Code:

        config.put("host", "https://xxxx.yyyyyyyy.com");
        config.put("port", 8089);
        Service service = new Service(config);
        ServiceInfo serviceInfo = service.getInfo();
        System.out.println(serviceInfo.getVersion());

Exception:

java.lang.RuntimeException: https
at com.splunk.HttpService.send(Unknown Source)
at com.splunk.Service.send(Unknown Source)
at com.splunk.HttpService.get(Unknown Source)
at com.splunk.Entity.refresh(Unknown Source)
at com.splunk.Entity.refresh(Unknown Source)
at com.splunk.Resource.validate(Unknown Source)
at com.splunk.Entity.validate(Unknown Source)
at com.splunk.Entity.getContent(Unknown Source)
at com.splunk.Entity.getString(Unknown Source)
at com.splunk.ServiceInfo.getVersion(Unknown Source)
at cache.Cache.run(Cache.java:57)
at cache.Cache.main(Cache.java:35)
========================================================================================
#noobAlert
Can someone tell me what mistake I am making?
I am new to Splunk and my mistake will most likely be something ridiculously simple.
Thanks
Tags (1)
0 Karma
1 Solution

KAjnadkar
Explorer

If anyone wants to know, it was because of the wrong port number.

View solution in original post

0 Karma

KAjnadkar
Explorer

If anyone wants to know, it was because of the wrong port number.

0 Karma
Get Updates on the Splunk Community!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...