[ 
https://issues.apache.org/jira/browse/AMBARI-12203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Onischuk resolved AMBARI-12203.
--------------------------------------
    Resolution: Fixed

Committed to trunk and branch-2.1

> Zookeeper server restart failed after 1.7 to 2.1
> ------------------------------------------------
>
>                 Key: AMBARI-12203
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12203
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Andrew Onischuk
>            Assignee: Andrew Onischuk
>             Fix For: 2.1.0
>
>
> After upgrading Ambari 1.7 to Ambari 2.1, Zookeeper failed to restart with the
> following error:  
> `/usr/hdp/current/zookeeper-server/bin/zkServer.sh: No such file or directory`
>     
>     
>     Traceback (most recent call last):
>       File 
> "/var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py",
>  line 176, in <module>
>         ZookeeperServer().execute()
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 216, in execute
>         method(env)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 438, in restart
>         self.stop(env)
>       File 
> "/var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py",
>  line 60, in stop
>         zookeeper_service(action = 'stop')
>       File 
> "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, 
> in thunk
>         return fn(*args, **kwargs)
>       File 
> "/var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_service.py",
>  line 51, in zookeeper_service
>         user=params.zk_user
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 
> 157, in __init__
>         self.env.run()
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 152, in run
>         self.run_action(resource, action)
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", 
> line 118, in run_action
>         provider_action()
>       File 
> "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py",
>  line 254, 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 'source 
> /usr/hdp/current/zookeeper-server/conf/zookeeper-env.sh ; env 
> ZOOCFGDIR=/usr/hdp/current/zookeeper-server/conf ZOOCFG=zoo.cfg 
> /usr/hdp/current/zookeeper-server/bin/zkServer.sh stop' returned 127. -bash: 
> /usr/hdp/current/zookeeper-server/conf/zookeeper-env.sh: No such file or 
> directory
>     env: /usr/hdp/current/zookeeper-server/bin/zkServer.sh: No such file or 
> directory
>     
> Looking for zkServer.sh, I find the following:
>     
>     
>     # find  / -name zkServer.sh
>     /usr/hdp/2.2.6.0-2800/zookeeper/bin/zkServer.sh
>     
> /var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkServer.sh
>     
> /var/lib/ambari-agent/cache/stacks_23_06_15_15_23.old/HDP/1.3.2/services/ZOOKEEPER/package/files/zkServer.sh
>     
> /var/lib/ambari-agent/cache/stacks_23_06_15_15_23.old/HDP/2.0.6/services/ZOOKEEPER/package/files/zkServer.sh
>     
> /var/lib/ambari-server/resources/stacks_23_06_15_15_17.old/HDP/1.3.2/services/ZOOKEEPER/package/files/zkServer.sh
>     
> /var/lib/ambari-server/resources/stacks_23_06_15_15_17.old/HDP/2.0.6/services/ZOOKEEPER/package/files/zkServer.sh
>     
> /var/lib/ambari-server/resources/common-services/ZOOKEEPER/3.4.5.2.0/package/files/zkServer.sh
>     
> Creating the missing soft link appears to fix the issue:
>     
>     
>     ln -s /usr/hdp/2.2.6.0-2800/zookeeper  /usr/hdp/current/zookeeper-server
>     



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to