Security is enabled, but JCE policy zip is not specified error when enabling security using ambari

Security is enabled, but JCE policy zip is not specified error when enabling security using ambari


Symptom


When enabling security you may see this error during start/stop of services


2015-04-24 23:06:48,663 - Error while executing command 'any':
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 123, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/hooks/before-ANY/scripts/hook.py", line 29, in hook
    setup_jce()
  File "/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/hooks/before-ANY/scripts/shared_initialization.py", line 49, in setup_jce
    raise Fail("Security is enabled, but JCE policy zip is not specified.")
Fail: Security is enabled, but JCE policy zip is not specified.
Error: Error: Unable to run the custom hook script ['/usr/bin/python2.6', '/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/hooks/before-ANY/scripts/hook.py', 'ANY', '/var/lib/ambari-agent/data/command-728.json', '/var/lib/ambari-agent/cache/stacks/PHD/2.0.6/hooks/before-ANY', '/var/lib/ambari-agent/data/structured-out-728.json', 'INFO', '/var/lib/ambari-agent/data/tmp']
Cause


Even though you may have downloaded and adding JCE policy files for JDK 7 into /var/lib/ambari-server/resources directory ambari will not recognize it unless you have "jce.name" set in ambari.properties file


Fix


cp UnlimitedJCEPolicyJDK7.zip to /var/lib/ambari-server/resources
vi /etc/ambari-server/conf/ambari.properties
Add or update jce.name param in ambari.properties
jce.name=UnlimitedJCEPolicyJDK7.zip


在启动kerberos认证的时候,会重新的安装各个组件的client,在安装过程中,会调用jce,如果你在安装ambari server的时候没有联网,默认jce的包是没有安装上的,jce的包不会导致hadoop集群的安装失败,但是如果进行kerberos的时候,会导致失败

你可能感兴趣的:(Hadoop)