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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...