YARN-6534. ResourceManager failed due to TimelineClient try to init SSLFactory even https is not enabled. Contributed by Rohith Sharma K S.
(cherry picked from commit 09e36ff59c05b8bd54d346d1103de0a7300875c6)
This commit is contained in:
parent
bbf8cac14d
commit
94607214ce
@ -103,8 +103,13 @@ protected void serviceInit(Configuration conf) throws Exception {
|
|||||||
ClientConfig cc = new DefaultClientConfig();
|
ClientConfig cc = new DefaultClientConfig();
|
||||||
cc.getClasses().add(YarnJacksonJaxbJsonProvider.class);
|
cc.getClasses().add(YarnJacksonJaxbJsonProvider.class);
|
||||||
|
|
||||||
|
if (YarnConfiguration.useHttps(conf)) {
|
||||||
|
// If https is chosen, configures SSL client.
|
||||||
sslFactory = getSSLFactory(conf);
|
sslFactory = getSSLFactory(conf);
|
||||||
connConfigurator = getConnConfigurator(sslFactory);
|
connConfigurator = getConnConfigurator(sslFactory);
|
||||||
|
} else {
|
||||||
|
connConfigurator = DEFAULT_TIMEOUT_CONN_CONFIGURATOR;
|
||||||
|
}
|
||||||
|
|
||||||
if (UserGroupInformation.isSecurityEnabled()) {
|
if (UserGroupInformation.isSecurityEnabled()) {
|
||||||
authenticator = new KerberosDelegationTokenAuthenticator();
|
authenticator = new KerberosDelegationTokenAuthenticator();
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
|
||||||
|
import org.apache.hadoop.http.HttpConfig.Policy;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.security.UserGroupInformation;
|
import org.apache.hadoop.security.UserGroupInformation;
|
||||||
import org.apache.hadoop.security.ssl.KeyStoreTestUtil;
|
import org.apache.hadoop.security.ssl.KeyStoreTestUtil;
|
||||||
@ -451,6 +452,7 @@ public void testTimelineClientCleanup() throws Exception {
|
|||||||
YarnConfiguration conf = new YarnConfiguration();
|
YarnConfiguration conf = new YarnConfiguration();
|
||||||
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
conf.setBoolean(YarnConfiguration.TIMELINE_SERVICE_ENABLED, true);
|
||||||
conf.setInt(YarnConfiguration.TIMELINE_SERVICE_CLIENT_MAX_RETRIES, 0);
|
conf.setInt(YarnConfiguration.TIMELINE_SERVICE_CLIENT_MAX_RETRIES, 0);
|
||||||
|
conf.set(YarnConfiguration.YARN_HTTP_POLICY_KEY, Policy.HTTPS_ONLY.name());
|
||||||
|
|
||||||
File testDir = TestGenericTestUtils.getTestDir();
|
File testDir = TestGenericTestUtils.getTestDir();
|
||||||
String sslConfDir =
|
String sslConfDir =
|
||||||
|
Loading…
Reference in New Issue
Block a user