Hi All,
I am trying to connect to Splunk (Search Head) via Java sdk.
But I received connection timeout error: java.lang.RuntimeException: Connection timed out: connect
Code:
HttpService.setSslSecurityProtocol(SSLSecurityProtocol.TLSv1_2);
ServiceArgs serviceArgs = new ServiceArgs();
serviceArgs.setHost("companysplunkSearchHead.net"); // without http
serviceArgs.setPort(8089);
serviceArgs.setUsername("user");
serviceArgs.setPassword("password");
Service service = Service.connect(serviceArgs);
The Splunk instance is on OpenShift ( I tried also to: create a new route for the port 8089 and also set allowRemoteLogin=always)
But the problem of connectivity still persists.
The same code works in local.
Could you please help me?
Thanks 🙂
I hope u resolved the issue,
I am also facing the same issue, could you please help.
This means your request did not get a response within some (default) timeframe. The reasons that no response was received is likely to be one of:
Also, if you're trying to connect insecurely to an endpoint, set the scheme to "http":
serviceArgs.setScheme("http");