AMBARI-25114. Log Search: SSL props needs to be set if only ambari-server uses SSL.
[ambari-logsearch.git] / ambari-logsearch-server / src / main / java / org / apache / ambari / logsearch / common / ExternalServerClient.java
index 31ab03e85ed111837c056048e0ff7739dc164c6a..38bedf568bf4f8d092697acfe416361ccc0bb7ad 100644 (file)
@@ -59,6 +59,9 @@ public class ExternalServerClient {
    */
   public Object sendGETRequest(String loginUrl, Class<?> classObject, String username, String password) throws Exception {
     if (localJerseyClient == null) {
+      if (sslConfigurer.isKeyStoreSpecified()) {
+        sslConfigurer.ensureStorePasswords();
+      }
       localJerseyClient = ThreadLocal.withInitial(() -> sslConfigurer.isKeyStoreSpecified() ?
         new JerseyClientBuilder().sslContext(sslConfigurer.getSSLContext()).build() :
         JerseyClientBuilder.createClient());