ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Levas <rle...@hortonworks.com>
Subject Re: Hit NPE in Test Kerberos Client When enable kerberos for HDFS
Date Wed, 29 Jun 2016 16:17:10 GMT
I believe that this tends to happen if the host names do not always resolve the same way. 
For example, does `hostname -f` yield the host name on each host that was registered with
Ambari?  The same goes for the Ambari server host. 

Rob


On 6/29/16, 10:57 AM, "陶征霖" <ztao1987@apache.org> wrote:

Hi,

I used ambari 2.1.2 to deploy security HDFS, but failed in step of Test
Kerberos Client. I checked ambari server log, and found the following error
info:
```
29 Jun 2016 17:15:20,038  INFO [qtp-client-63]
AmbariManagementControllerImpl:3312 - Received action execution request,
clusterName=bigdata, request=isCommand :true, action :null, command
:KERBEROS_SERVICE_CHECK, inputs :{}, resourceFilters:
[RequestResourceFilter{serviceName='KERBEROS', componentName='null',
hostNames=[]}], exclusive: false, clusterName :bigdata
29 Jun 2016 17:15:20,207 ERROR [qtp-client-63] BaseManagementHandler:66 -
Caught a runtime exception while attempting to create a resource
java.lang.NullPointerException
        at
org.apache.ambari.server.actionmanager.ActionDBAccessorImpl.persistActions(ActionDBAccessorImpl.java:280)
        at
org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:68)
        at
org.apache.ambari.server.actionmanager.ActionManager.sendActions(ActionManager.java:99)
        at
org.apache.ambari.server.controller.internal.RequestStageContainer.persist(RequestStageContainer.java:216)
        at
org.apache.ambari.server.controller.AmbariManagementControllerImpl.createAction(AmbariManagementControllerImpl.java:3400)
        at
org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:165)
        at
org.apache.ambari.server.controller.internal.RequestResourceProvider$1.invoke(RequestResourceProvider.java:162)
        at
org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:272)
        at
org.apache.ambari.server.controller.internal.RequestResourceProvider.createResources(RequestResourceProvider.java:162)
        at
org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:289)
        at
org.apache.ambari.server.api.services.persistence.PersistenceManagerImpl.create(PersistenceManagerImpl.java:76)
        at
org.apache.ambari.server.api.handlers.CreateHandler.persist(CreateHandler.java:36)
        at
org.apache.ambari.server.api.handlers.BaseManagementHandler.handleRequest(BaseManagementHandler.java:72)
        at
org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:135)
        at
org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:105)
        at
org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:74)
        at
org.apache.ambari.server.api.services.RequestService.createRequests(RequestService.java:145)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at
com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
        at
com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
```
I followed this guide
http://www.teckstory.com/hadoop-ecosystem/hadoop-kerberos-cluster-setup/ to
do setup. Test KDC Connection works fine. In the page of Provide
information of KDC Admin, I used the principal root/admin@bigdata. I also
manually executed the command "/usr/bin/kadmin -s hd17.bigdata -p
root/admin@BIGDATA -w admin -r BIGDATA -q "get_principal root/admin@BIGDATA"
successfully.

My krb5.conf is as below:
```
[libdefaults]
  renew_lifetime = 7d
  forwardable = true
  default_realm = BIGDATA
  ticket_lifetime = 24h
  dns_lookup_realm = false
  dns_lookup_kdc = false
  #default_tgs_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
  #default_tkt_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5



[logging]
  default = FILE:/var/log/krb5kdc.log
  admin_server = FILE:/var/log/kadmind.log
  kdc = FILE:/var/log/krb5kdc.log

[realms]
  BIGDATA = {
    admin_server = hd17.bigdata
    kdc = hd17.bigdata
  }
```

Could you please help point it out why it fails? Thanks in advance.

Thanks,
Zhenglin


Mime
View raw message