Hi experts, We are getting this error consistently while querying data from Splunk Enterprise hosted in the company's internal network. Exception in receiving splunk data 145java.lang.RuntimeException: HTTPS hostname wrong: should be <splunk_enterprise_url - splunk.org.company.com> The line of code that causes this is String query = "<splunk valid query>"; Job job = service.getJobs().create(query); Splunk SDK Version used: 1.9.5 Connection to Splunk is established as follows: String token = System.getenv("SPLUNK_TOKEN");
ServiceArgs loginArgs = new ServiceArgs();
loginArgs.setPort(8089);
loginArgs.setHost("splunk.org.company.com");
loginArgs.setScheme("https");
loginArgs.setToken(String.format("Bearer %s", token));
service = new Service(loginArgs);
log.info("service val is {}", service.toString());
Service.setValidateCertificates(false);
This was working few days ago and suddenly it has stopped. We checked the server certificate and it valid till March 2024. The program querying the splunk is called from a runner hosted on AWS and it has no network restrictions. Not sure what is the issue. But this issue is getting reproduced consistently. Note: Surprisingly, the same program runs fine on local machine. Cannot find out what would be the issue? Any help will be appreciated.
... View more