Created 02-27-2017 03:47 PM
NEW ERROR:
Turns out the /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/ permissions were 400
Now my error is: resource_management.core.exceptions.ExecutionFailed: Execution of 'JAVA_HOME=/usr/jdk64/jdk1.8.0_77 /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh -v -b /usr/hdf/current/nifi/conf/bootstrap.conf -n /usr/hdf/current/nifi/conf/nifi.properties -f /var/lib/nifi/conf/flow.xml.gz -s '[PROTECTED]' -p '[PROTECTED]'' returned 1. Error: Could not find or load main class org.apache.nifi.properties.ConfigEncryptionTool
-------------------------OLD ERROR------------------------
stderr: /var/lib/ambari-agent/data/errors-242.txt
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 360, in <module>
    Master().execute()
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
    method(env)
  File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 720, in restart
    self.start(env, upgrade_type=upgrade_type)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 164, in start
    self.configure(env, is_starting = True)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 145, in configure
    params.nifi_flow_config_dir, params.nifi_sensitive_props_key, is_starting)
  File "/var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/scripts/nifi.py", line 298, in encrypt_sensitive_properties
    Execute(encrypt_config_script_prefix, user=nifi_user,logoutput=False)
  File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
    self.env.run()
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 273, in action_run
    tries=self.resource.tries, try_sleep=self.resource.try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 70, in inner
    result = function(command, **kwargs)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 92, in checked_call
    tries=tries, try_sleep=try_sleep)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 140, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 293, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'JAVA_HOME=/usr/jdk64/jdk1.8.0_77 /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh -v -b /usr/hdf/current/nifi/conf/bootstrap.conf -n /usr/hdf/current/nifi/conf/nifi.properties -f /var/lib/nifi/conf/flow.xml.gz -s '[PROTECTED]' -p '[PROTECTED]'' returned 126. -bash: /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh: Permission denied
					
				
			
			
				
			
			
			
			
			
			
			
		Created 03-20-2017 03:37 PM
Ok here is the solution:
I modified the /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh
Added the line:
echo "The place it is looking is: ${CLASSPATH}"
The place it is looking is: /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/lib/* Now I updated the permissions on the lib folder and contents, everything works now!
Created 02-27-2017 05:07 PM
What's the username for the user starting Nifi? What are the permissions for /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh
Created 03-01-2017 03:06 PM
Turns out the /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/ permissions were 400, now my issue is: resource_management.core.exceptions.ExecutionFailed: Execution of 'JAVA_HOME=/usr/jdk64/jdk1.8.0_77 /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh -v -b /usr/hdf/current/nifi/conf/bootstrap.conf -n /usr/hdf/current/nifi/conf/nifi.properties -f /var/lib/nifi/conf/flow.xml.gz -s '[PROTECTED]' -p '[PROTECTED]'' returned 1. Error: Could not find or load main class org.apache.nifi.properties.ConfigEncryptionTool
Created 02-27-2017 05:19 PM
Looks like a permissions issue with the encrypt-config tool. I'm guessing that you are running the script as a user who doesn't have the appropriate permissions to write/modify the /usr/hdf/current/nifi/conf directory (see here for an overview of the encrypt-config tool).
A few things to try:
1) Take a look at the /usr/hdf/current/nifi/conf directory, and make sure this directory can be written to by the user you're running the tool as (ambari? make sure that user is in the appropriate group to read/write this directory).
2) Try running the encrypt-config.sh tool on its own (see the link above; do this on its own and not thru ambari) and see if you run into the same issue, and see if this gets you further in diagnosing the issue.
Created 03-01-2017 03:13 PM
Turns out the /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/ permissions were 400, now my issue is: resource_management.core.exceptions.ExecutionFailed: Execution of 'JAVA_HOME=/usr/jdk64/jdk1.8.0_77 /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh -v -b /usr/hdf/current/nifi/conf/bootstrap.conf -n /usr/hdf/current/nifi/conf/nifi.properties -f /var/lib/nifi/conf/flow.xml.gz -s '[PROTECTED]' -p '[PROTECTED]'' returned 1. Error: Could not find or load main class org.apache.nifi.properties.ConfigEncryptionTool
Created 02-28-2017 04:09 PM
It should be noted that I can manually start Nifi by running "nifi.sh start"
Created 03-20-2017 03:37 PM
Ok here is the solution:
I modified the /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/bin/encrypt-config.sh
Added the line:
echo "The place it is looking is: ${CLASSPATH}"
The place it is looking is: /var/lib/ambari-agent/cache/common-services/NIFI/1.0.0/package/files/nifi-toolkit-1.1.0.2.1.1.0-2/lib/* Now I updated the permissions on the lib folder and contents, everything works now!