Skip to content

[AMBARI-25088] Enable Kerberos fails when Ambari server is not on a registered host#2753

Merged
rlevas merged 1 commit intoapache:trunkfrom
rlevas:AMBARI-25088
Jan 4, 2019
Merged

[AMBARI-25088] Enable Kerberos fails when Ambari server is not on a registered host#2753
rlevas merged 1 commit intoapache:trunkfrom
rlevas:AMBARI-25088

Conversation

@rlevas
Copy link
Contributor

@rlevas rlevas commented Jan 3, 2019

What changes were proposed in this pull request?

Enable Kerberos fails when Ambari server is not on a registered host.

The following error is seen in /var/log/ambari-server.log

2019-01-03 15:28:34,238  WARN [Server Action Executor Worker 39] ServerActionExecutor:471 - Task #39 failed to complete execution due to thrown exception: org.apache.ambari.server.HostNotFoundException:Host not found, hostname=c7401.ambari.apache.org
org.apache.ambari.server.HostNotFoundException: Host not found, hostname=c7401.ambari.apache.org
        at org.apache.ambari.server.state.cluster.ClustersImpl.getHost(ClustersImpl.java:456)
        at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:190)
        at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:174)
        at org.apache.ambari.server.controller.AmbariManagementControllerImpl.findConfigurationTagsWithOverrides(AmbariManagementControllerImpl.java:2431)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:50)
        at com.sun.proxy.$Proxy134.findConfigurationTagsWithOverrides(Unknown Source)
        at org.apache.ambari.server.state.ConfigHelper.calculateExistingConfigurations(ConfigHelper.java:2158)
        at org.apache.ambari.server.controller.KerberosHelperImpl.calculateConfigurations(KerberosHelperImpl.java:1722)
        at org.apache.ambari.server.controller.KerberosHelperImpl.getActiveIdentities(KerberosHelperImpl.java:1797)
        at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.calculateServiceIdentities(KerberosServerAction.java:512)
        at org.apache.ambari.server.serveraction.kerberos.KerberosServerAction.processIdentities(KerberosServerAction.java:456)
        at org.apache.ambari.server.serveraction.kerberos.CreatePrincipalsServerAction.execute(CreatePrincipalsServerAction.java:92)
        at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:550)
        at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:466)
        at java.lang.Thread.run(Thread.java:745)

This is caused when Ambari tried to find the host-specific configuration values when processing the Kerberos identities and the host is not registered for the relevant cluster. This can happen when the Ambari server Kerberos identity is being processed when the Ambari server host is not registered with the cluster.

To solve this, host specific configuration values should not be obtained for the non-registered Ambari server host.

How was this patch tested?

Manually tested.

All unit tests passed.

Please review Ambari Contributing Guide before opening a pull request.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants