[
https://issues.apache.org/jira/browse/AMBARI-15426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Onischuk updated AMBARI-15426:
-------------------------------------
Status: Patch Available (was: Open)
> changing jdk version being used by HDP does not work
> ----------------------------------------------------
>
> Key: AMBARI-15426
> URL: https://issues.apache.org/jira/browse/AMBARI-15426
> Project: Ambari
> Issue Type: Bug
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 2.2.2
>
> Attachments: AMBARI-15426.patch
>
>
> i followed the instructions here: <http://docs.hortonworks.com/HDPDocuments/Am
> bari-2.2.1.0/bk_ambari_reference_guide/content/ch_changing_the_jdk_version_on_
> an_existing_cluster.html>
> one issue was the above doc did not say i need to restart ambari server for
> the new java home to be picked up when i restart.
> I went from JDK 7 and to JDK 8 and restarted oozie server and it failed with
> error like:
>
>
>
> Traceback (most recent call last):
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
> line 35, in <module>
> BeforeAnyHook().execute()
> File
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
> line 219, in execute
> method(env)
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py",
> line 32, in hook
> setup_java()
> File
> "/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py",
> line 209, in setup_java
> Execute(install_cmd,
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line
> 154, in __init__
> self.env.run()
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
> line 158, in run
> self.run_action(resource, action)
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py",
> line 121, in run_action
> provider_action()
> File
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
> line 238, 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
> 291, in _call
> raise Fail(err_msg)
> resource_management.core.exceptions.Fail: Execution of 'mkdir -p
> /var/lib/ambari-agent/tmp/jdk && cd /var/lib/ambari-agent/tmp/jdk && tar -xf
> /var/lib/ambari-agent/tmp/jdk-8u60-linux-x64.tar.gz && ambari-sudo.sh cp -rp
> /var/lib/ambari-agent/tmp/jdk/* /usr/jdk64' returned 1. cp: cannot create
> regular file `/usr/jdk64/jdk1.7.0_67/bin/java': Text file busy
> Error: Error: Unable to run the custom hook script ['/usr/bin/python2',
> '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY/scripts/hook.py',
> 'ANY', '/var/lib/ambari-agent/data/command-4203.json',
> '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-ANY',
> '/var/lib/ambari-agent/data/structured-out-4203.json', 'INFO',
> '/var/lib/ambari-agent/tmp']Error: Error: Unable to run the custom hook
> script ['/usr/bin/python2',
> '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START/scripts/hook.py',
> 'START', '/var/lib/ambari-agent/data/command-4203.json',
> '/var/lib/ambari-agent/cache/stacks/HDP/2.0.6/hooks/before-START',
> '/var/lib/ambari-agent/data/structured-out-4203.json', 'INFO',
> '/var/lib/ambari-agent/tmp']
>
> Issue is that
>
>
>
> [root@hcube1-1n03 ~]# ls /var/lib/ambari-agent/tmp/jdk
> jdk1.7.0_67 jdk1.8.0_60
>
> already has jdk 1.7 unpcaked.
> We should change the cp command to only copy the specific directory
>
>
>
> ambari-sudo.sh cp -rp /var/lib/ambari-agent/tmp/jdk/*
>
> We are also missing the JCE setup from the upgraded JDK.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)