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!

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...