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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...