Support Questions

Find answers, ask questions, and share your expertise

ambari 2.7.0.0 and zookeeper server and zookeeper client install failed

avatar
New Contributor
stderr: 
2018-08-14 05:26:17,103 - Could not determine stack version for component zookeeper-client by calling '/usr/bin/hdp-select status zookeeper-client > /tmp/tmpp7ILP6'. Return Code: 1, Output: .
2018-08-14 05:26:17,144 - The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging. However, the stack-select tool was able to report a single version installed (3.0.0.0-1634). This is the version that will be reported.
2018-08-14 05:26:23,490 - Could not determine stack version for component zookeeper-client by calling '/usr/bin/hdp-select status zookeeper-client > /tmp/tmpBCMZ1n'. Return Code: 1, Output: .
2018-08-14 05:26:23,520 - The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging. However, the stack-select tool was able to report a single version installed (3.0.0.0-1634). This is the version that will be reported.
2018-08-14 05:26:23,989 - Could not determine stack version for component zookeeper-client by calling '/usr/bin/hdp-select status zookeeper-client > /tmp/tmpiDxYsM'. Return Code: 1, Output: .
2018-08-14 05:26:24,028 - The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging. However, the stack-select tool was able to report a single version installed (3.0.0.0-1634). This is the version that will be reported.
Traceback (most recent call last):
  File "/var/lib/ambari-agent/cache/stack-hooks/after-INSTALL/scripts/hook.py", line 37, in 
    AfterInstallHook().execute()
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 353, in execute
    method(env)
  File "/var/lib/ambari-agent/cache/stack-hooks/after-INSTALL/scripts/hook.py", line 31, in hook
    setup_stack_symlinks(self.stroutfile)
  File "/var/lib/ambari-agent/cache/stack-hooks/after-INSTALL/scripts/shared_initialization.py", line 66, in setup_stack_symlinks
    stack_select.select(package, json_version)
  File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/stack_select.py", line 312, in select
    Execute(command, sudo=True)
  File "/usr/lib/ambari-agent/lib/resource_management/core/base.py", line 166, in __init__
    self.env.run()
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 160, in run
    self.run_action(resource, action)
  File "/usr/lib/ambari-agent/lib/resource_management/core/environment.py", line 124, in run_action
    provider_action()
  File "/usr/lib/ambari-agent/lib/resource_management/core/providers/system.py", line 263, in action_run
    returns=self.resource.returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 72, in inner
    result = function(command, **kwargs)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy, returns=returns)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 314, in _call
    raise ExecutionFailed(err_msg, code, out, err)
resource_management.core.exceptions.ExecutionFailed: Execution of 'ambari-python-wrap /usr/bin/hdp-select set zookeeper-client 3.0.0.0-1634' returned 1. symlink target /usr/hdp/current/zookeeper-client for zookeeper already exists and it is not a symlink.
 stdout:
2018-08-14 05:26:11,920 - Stack Feature Version Info: Cluster Stack=3.0, Command Stack=None, Command Version=None -> 3.0
2018-08-14 05:26:11,926 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2018-08-14 05:26:11,927 - Group['hdfs'] {}
2018-08-14 05:26:11,928 - Group['hadoop'] {}
2018-08-14 05:26:11,928 - Group['users'] {}
2018-08-14 05:26:11,929 - User['zookeeper'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-14 05:26:11,930 - User['ams'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop'], 'uid': None}
2018-08-14 05:26:11,930 - User['ambari-qa'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hadoop', 'users'], 'uid': None}
2018-08-14 05:26:11,931 - User['hdfs'] {'gid': 'hadoop', 'fetch_nonlocal_groups': True, 'groups': ['hdfs', 'hadoop'], 'uid': None}
2018-08-14 05:26:11,931 - File['/var/lib/ambari-agent/tmp/changeUid.sh'] {'content': StaticFile('changeToSecureUid.sh'), 'mode': 0555}
2018-08-14 05:26:11,932 - Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 0'] {'not_if': '(test $(id -u ambari-qa) -gt 1000) || (false)'}
2018-08-14 05:26:11,939 - Skipping Execute['/var/lib/ambari-agent/tmp/changeUid.sh ambari-qa /tmp/hadoop-ambari-qa,/tmp/hsperfdata_ambari-qa,/home/ambari-qa,/tmp/ambari-qa,/tmp/sqoop-ambari-qa 0'] due to not_if
2018-08-14 05:26:11,939 - Group['hdfs'] {}
2018-08-14 05:26:11,939 - User['hdfs'] {'fetch_nonlocal_groups': True, 'groups': ['hdfs', 'hadoop', u'hdfs']}
2018-08-14 05:26:11,940 - FS Type: HDFS
2018-08-14 05:26:11,940 - Directory['/etc/hadoop'] {'mode': 0755}
2018-08-14 05:26:11,955 - File['/usr/hdp/current/hadoop-client/conf/hadoop-env.sh'] {'content': InlineTemplate(...), 'owner': 'hdfs', 'group': 'hadoop'}
2018-08-14 05:26:11,956 - Directory['/var/lib/ambari-agent/tmp/hadoop_java_io_tmpdir'] {'owner': 'hdfs', 'group': 'hadoop', 'mode': 01777}
2018-08-14 05:26:11,970 - Repository['HDP-3.0-repo-2'] {'append_to_file': False, 'base_url': 'http://192.168.0.170/ambari-2.7.0.0/HDP/ubuntu16/3.0.0.0-1634/', 'action': ['create'], 'components': [u'HDP', 'main'], 'repo_template': '{{package_type}} {{base_url}} {{components}}', 'repo_file_name': 'ambari-hdp-2', 'mirror_list': None}
2018-08-14 05:26:11,983 - File['/tmp/tmpCKi2Bw'] {'content': 'deb http://192.168.0.170/ambari-2.7.0.0/HDP/ubuntu16/3.0.0.0-1634/ HDP main'}
2018-08-14 05:26:11,984 - Writing File['/tmp/tmpCKi2Bw'] because contents don't match
2018-08-14 05:26:11,985 - File['/tmp/tmpmTLeqv'] {'content': StaticFile('/etc/apt/sources.list.d/ambari-hdp-2.list')}
2018-08-14 05:26:11,986 - Writing File['/tmp/tmpmTLeqv'] because contents don't match
2018-08-14 05:26:11,986 - File['/etc/apt/sources.list.d/ambari-hdp-2.list'] {'content': StaticFile('/tmp/tmpCKi2Bw')}
2018-08-14 05:26:11,987 - Writing File['/etc/apt/sources.list.d/ambari-hdp-2.list'] because contents don't match
2018-08-14 05:26:11,988 - checked_call[['apt-get', 'update', '-qq', '-o', u'Dir::Etc::sourcelist=sources.list.d/ambari-hdp-2.list', '-o', 'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0']] {'sudo': True, 'quiet': False}
2018-08-14 05:26:13,305 - checked_call returned (0, '')
2018-08-14 05:26:13,307 - Repository['HDP-3.0-GPL-repo-2'] {'append_to_file': True, 'base_url': 'http://192.168.0.170/ambari-2.7.0.0/HDP-GPL/ubuntu16/3.0.0.0-1634/', 'action': ['create'], 'components': [u'HDP-GPL', 'main'], 'repo_template': '{{package_type}} {{base_url}} {{components}}', 'repo_file_name': 'ambari-hdp-2', 'mirror_list': None}
2018-08-14 05:26:13,311 - File['/tmp/tmpeOxV6w'] {'content': 'deb http://192.168.0.170/ambari-2.7.0.0/HDP/ubuntu16/3.0.0.0-1634/ HDP main\ndeb http://192.168.0.170/ambari-2.7.0.0/HDP-GPL/ubuntu16/3.0.0.0-1634/ HDP-GPL main'}
2018-08-14 05:26:13,312 - Writing File['/tmp/tmpeOxV6w'] because contents don't match
2018-08-14 05:26:13,312 - File['/tmp/tmp0NymJi'] {'content': StaticFile('/etc/apt/sources.list.d/ambari-hdp-2.list')}
2018-08-14 05:26:13,313 - Writing File['/tmp/tmp0NymJi'] because contents don't match
2018-08-14 05:26:13,314 - File['/etc/apt/sources.list.d/ambari-hdp-2.list'] {'content': StaticFile('/tmp/tmpeOxV6w')}
2018-08-14 05:26:13,314 - Writing File['/etc/apt/sources.list.d/ambari-hdp-2.list'] because contents don't match
2018-08-14 05:26:13,315 - checked_call[['apt-get', 'update', '-qq', '-o', u'Dir::Etc::sourcelist=sources.list.d/ambari-hdp-2.list', '-o', 'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0']] {'sudo': True, 'quiet': False}
2018-08-14 05:26:16,068 - checked_call returned (0, '')
2018-08-14 05:26:16,069 - Repository['HDP-UTILS-1.1.0.22-repo-2'] {'append_to_file': True, 'base_url': 'http://192.168.0.170/ambari-2.7.0.0/HDP-UTILS/ubuntu16/1.1.0.22/', 'action': ['create'], 'components': [u'HDP-UTILS', 'main'], 'repo_template': '{{package_type}} {{base_url}} {{components}}', 'repo_file_name': 'ambari-hdp-2', 'mirror_list': None}
2018-08-14 05:26:16,074 - File['/tmp/tmpphrtO4'] {'content': 'deb http://192.168.0.170/ambari-2.7.0.0/HDP/ubuntu16/3.0.0.0-1634/ HDP main\ndeb http://192.168.0.170/ambari-2.7.0.0/HDP-GPL/ubuntu16/3.0.0.0-1634/ HDP-GPL main\ndeb http://192.168.0.170/ambari-2.7.0.0/HDP-UTILS/ubuntu16/1.1.0.22/ HDP-UTILS main'}
2018-08-14 05:26:16,074 - Writing File['/tmp/tmpphrtO4'] because contents don't match
2018-08-14 05:26:16,075 - File['/tmp/tmpm6_lby'] {'content': StaticFile('/etc/apt/sources.list.d/ambari-hdp-2.list')}
2018-08-14 05:26:16,075 - Writing File['/tmp/tmpm6_lby'] because contents don't match
2018-08-14 05:26:16,076 - File['/etc/apt/sources.list.d/ambari-hdp-2.list'] {'content': StaticFile('/tmp/tmpphrtO4')}
2018-08-14 05:26:16,077 - Writing File['/etc/apt/sources.list.d/ambari-hdp-2.list'] because contents don't match
2018-08-14 05:26:16,078 - checked_call[['apt-get', 'update', '-qq', '-o', u'Dir::Etc::sourcelist=sources.list.d/ambari-hdp-2.list', '-o', 'Dir::Etc::sourceparts=-', '-o', 'APT::Get::List-Cleanup=0']] {'sudo': True, 'quiet': False}
2018-08-14 05:26:16,872 - checked_call returned (0, '')
2018-08-14 05:26:16,874 - Package['unzip'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-08-14 05:26:16,923 - Skipping installation of existing package unzip
2018-08-14 05:26:16,923 - Package['curl'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-08-14 05:26:16,963 - Skipping installation of existing package curl
2018-08-14 05:26:16,963 - Package['hdp-select'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-08-14 05:26:17,003 - Skipping installation of existing package hdp-select
2018-08-14 05:26:17,103 - Could not determine stack version for component zookeeper-client by calling '/usr/bin/hdp-select status zookeeper-client > /tmp/tmpp7ILP6'. Return Code: 1, Output: .
2018-08-14 05:26:17,104 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}
2018-08-14 05:26:17,143 - call returned (0, '3.0.0.0-1634')
2018-08-14 05:26:17,144 - The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging. However, the stack-select tool was able to report a single version installed (3.0.0.0-1634). This is the version that will be reported.
2018-08-14 05:26:17,430 - Command repositories: HDP-3.0-repo-2, HDP-3.0-GPL-repo-2, HDP-UTILS-1.1.0.22-repo-2
2018-08-14 05:26:17,430 - Applicable repositories: HDP-3.0-repo-2, HDP-3.0-GPL-repo-2, HDP-UTILS-1.1.0.22-repo-2
2018-08-14 05:26:23,221 - Looking for matching packages in the following repositories: 192.168.0.170_ambari-2.7.0.0_HDP_ubuntu16_3.0.0.0-1634_, 192.168.0.170_ambari-2.7.0.0_HDP-GPL_ubuntu16_3.0.0.0-1634_, 192.168.0.170_ambari-2.7.0.0_HDP-UTILS_ubuntu16_1.1.0.22_
2018-08-14 05:26:23,331 - Package['zookeeper-3-0-0-0-1634'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-08-14 05:26:23,351 - Skipping installation of existing package zookeeper-3-0-0-0-1634
2018-08-14 05:26:23,352 - Package['zookeeper-3-0-0-0-1634-server'] {'retry_on_repo_unavailability': False, 'retry_count': 5}
2018-08-14 05:26:23,387 - Skipping installation of existing package zookeeper-3-0-0-0-1634-server
2018-08-14 05:26:23,395 - Directory['/usr/hdp/current/zookeeper-client/conf'] {'owner': 'zookeeper', 'create_parents': True, 'group': 'hadoop'}
2018-08-14 05:26:23,400 - File['/usr/hdp/current/zookeeper-client/conf/zookeeper-env.sh'] {'owner': 'zookeeper', 'content': InlineTemplate(...), 'group': 'hadoop'}
2018-08-14 05:26:23,405 - File['/usr/hdp/current/zookeeper-client/conf/zoo.cfg'] {'owner': 'zookeeper', 'content': Template('zoo.cfg.j2'), 'group': 'hadoop', 'mode': None}
2018-08-14 05:26:23,406 - Writing File['/usr/hdp/current/zookeeper-client/conf/zoo.cfg'] because contents don't match
2018-08-14 05:26:23,407 - File['/usr/hdp/current/zookeeper-client/conf/configuration.xsl'] {'owner': 'zookeeper', 'content': Template('configuration.xsl.j2'), 'group': 'hadoop', 'mode': None}
2018-08-14 05:26:23,407 - Directory['/var/run/zookeeper'] {'owner': 'zookeeper', 'create_parents': True, 'group': 'hadoop', 'mode': 0755}
2018-08-14 05:26:23,407 - Directory['/var/log/zookeeper'] {'owner': 'zookeeper', 'create_parents': True, 'group': 'hadoop', 'mode': 0755}
2018-08-14 05:26:23,408 - Directory['/hadoop/zookeeper'] {'owner': 'zookeeper', 'create_parents': True, 'group': 'hadoop', 'mode': 0755, 'cd_access': 'a'}
2018-08-14 05:26:23,409 - File['/usr/hdp/current/zookeeper-client/conf/log4j.properties'] {'content': InlineTemplate(...), 'owner': 'zookeeper', 'group': 'hadoop', 'mode': 0644}
2018-08-14 05:26:23,410 - File['/usr/hdp/current/zookeeper-client/conf/zoo_sample.cfg'] {'owner': 'zookeeper', 'group': 'hadoop'}
2018-08-14 05:26:23,490 - Could not determine stack version for component zookeeper-client by calling '/usr/bin/hdp-select status zookeeper-client > /tmp/tmpBCMZ1n'. Return Code: 1, Output: .
2018-08-14 05:26:23,492 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}
2018-08-14 05:26:23,520 - call returned (0, '3.0.0.0-1634')
2018-08-14 05:26:23,520 - The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging. However, the stack-select tool was able to report a single version installed (3.0.0.0-1634). This is the version that will be reported.
2018-08-14 05:26:23,808 - Using hadoop conf dir: /usr/hdp/current/hadoop-client/conf
2018-08-14 05:26:23,855 - Execute[('ambari-python-wrap', u'/usr/bin/hdp-select', 'set', u'zookeeper-client', u'3.0.0.0-1634')] {'sudo': True}
2018-08-14 05:26:23,989 - Could not determine stack version for component zookeeper-client by calling '/usr/bin/hdp-select status zookeeper-client > /tmp/tmpiDxYsM'. Return Code: 1, Output: .
2018-08-14 05:26:23,990 - call[('ambari-python-wrap', u'/usr/bin/hdp-select', 'versions')] {}
2018-08-14 05:26:24,028 - call returned (0, '3.0.0.0-1634')
2018-08-14 05:26:24,028 - The 'zookeeper-client' component did not advertise a version. This may indicate a problem with the component packaging. However, the stack-select tool was able to report a single version installed (3.0.0.0-1634). This is the version that will be reported.

Command failed after 1 tries
1 ACCEPTED SOLUTION

avatar
Master Mentor

@kaiguo li

The problem is the following directory which ius supposed to be a symlink instead of a directory.

ExecutionFailed: Execution of 'ambari-python-wrap /usr/bin/hdp-select set zookeeper-client 3.0.0.0-1634' returned 1. symlink target /usr/hdp/current/zookeeper-client for zookeeper already exists and it is  not a symlink. 

.

Please try to create the symlink manually as following to fix this issue:

# ls -l /usr/hdp/current/zookeeper-client 
lrwxrwxrwx. 1 root root 31 Jul 22 02:10 /usr/hdp/current/zookeeper-client -> /usr/hdp/3.0.0.0-1634/zookeeper

.

Example:

If the Symlink is not correct then do this:

# unlink /usr/hdp/current/zookeeper-client
# ln -s /usr/hdp/3.0.0.0-1634/zookeeper /usr/hdp/current/zookeeper-client

.

If "/usr/hdp/current/zookeeper-client" is a directory then in that case move it somewhere and then create a symlink instead.

# ls -ld /usr/hdp/current/zookeeper-client
# mv /usr/hdp/current/zookeeper-client /usr/hdp/current/zookeeper-client_BAK
# ln -s /usr/hdp/3.0.0.0-1634/zookeeper /usr/hdp/current/zookeeper-client

.

View solution in original post

3 REPLIES 3

avatar
Master Mentor

@kaiguo li

The problem is the following directory which ius supposed to be a symlink instead of a directory.

ExecutionFailed: Execution of 'ambari-python-wrap /usr/bin/hdp-select set zookeeper-client 3.0.0.0-1634' returned 1. symlink target /usr/hdp/current/zookeeper-client for zookeeper already exists and it is  not a symlink. 

.

Please try to create the symlink manually as following to fix this issue:

# ls -l /usr/hdp/current/zookeeper-client 
lrwxrwxrwx. 1 root root 31 Jul 22 02:10 /usr/hdp/current/zookeeper-client -> /usr/hdp/3.0.0.0-1634/zookeeper

.

Example:

If the Symlink is not correct then do this:

# unlink /usr/hdp/current/zookeeper-client
# ln -s /usr/hdp/3.0.0.0-1634/zookeeper /usr/hdp/current/zookeeper-client

.

If "/usr/hdp/current/zookeeper-client" is a directory then in that case move it somewhere and then create a symlink instead.

# ls -ld /usr/hdp/current/zookeeper-client
# mv /usr/hdp/current/zookeeper-client /usr/hdp/current/zookeeper-client_BAK
# ln -s /usr/hdp/3.0.0.0-1634/zookeeper /usr/hdp/current/zookeeper-client

.

avatar
New Contributor

Many thanks!

If the shell script can be integrated in the python script, it will be very nice!

The magic operation cost me and my workmate almost the whole day.

avatar
Master Mentor

@kaiguo li

By default the Symlink should be correctly created. In your case may be due to some reason the Symlink was not created properly because the directory might be existing instead of symlink ....

If this answers your query and resolved your issue then please click on the "Accept" button here that way it will help other HCC users to quickly find the correct solution.