Pivotal Knowledge Base

Follow

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

Environment

  • PHD 3.0
  • Ambari 1.7.1

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

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

Comments

Powered by Zendesk