[
https://issues.apache.org/jira/browse/YARN-1463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13837258#comment-13837258
]
Binglin Chang commented on YARN-1463:
-------------------------------------
We can see from the code, HttpServer does not cover null check for keys
{code}
private void initSpnego(Configuration conf, String hostName,
String usernameConfKey, String keytabConfKey) throws IOException {
Map<String, String> params = new HashMap<String, String>();
String principalInConf = conf.get(usernameConfKey);
if (principalInConf != null && !principalInConf.isEmpty()) {
params.put("kerberos.principal", SecurityUtil.getServerPrincipal(
principalInConf, hostName));
}
String httpKeytab = conf.get(keytabConfKey);
if (httpKeytab != null && !httpKeytab.isEmpty()) {
params.put("kerberos.keytab", httpKeytab);
}
params.put(AuthenticationFilter.AUTH_TYPE, "kerberos");
defineFilter(webAppContext, SPNEGO_FILTER,
AuthenticationFilter.class.getName(), params, null);
}
{code}
> TestContainerManagerSecurity#testContainerManager fails
> -------------------------------------------------------
>
> Key: YARN-1463
> URL: https://issues.apache.org/jira/browse/YARN-1463
> Project: Hadoop YARN
> Issue Type: Test
> Reporter: Ted Yu
> Assignee: Binglin Chang
> Attachments: YARN-1463.000.patch, YARN-1463.v1.patch
>
>
> Here is stack trace:
> {code}
> testContainerManager[1](org.apache.hadoop.yarn.server.TestContainerManagerSecurity)
> Time elapsed: 1.756 sec <<< ERROR!
> org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.io.IOException:
> ResourceManager failed to start. Final state is STOPPED
> at
> org.apache.hadoop.yarn.server.MiniYARNCluster$ResourceManagerWrapper.serviceStart(MiniYARNCluster.java:253)
> at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
> at
> org.apache.hadoop.service.CompositeService.serviceStart(CompositeService.java:121)
> at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
> at
> org.apache.hadoop.yarn.server.TestContainerManagerSecurity.testContainerManager(TestContainerManagerSecurity.java:110)
> {code}
--
This message was sent by Atlassian JIRA
(v6.1#6144)