Server install hdfs client fail - hadoop

I am getting the following errors for HDFS client installation on Ambari. Have reset the server several times but still cannot get it resolved. Any idea how to fix that?
stderr:
Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 120, in <module>
HdfsClient().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/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 36, in install
self.configure(env)
File "/var/lib/ambari-agent/cache/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_client.py", line 41, in configure
hdfs()
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/HDFS/2.1.0.2.0/package/scripts/hdfs.py", line 61, in hdfs
group=params.user_group
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 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/libraries/providers/xml_config.py", line 67, in action_create
encoding = self.resource.encoding
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 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 87, in action_create
raise Fail("Applying %s failed, parent directory %s doesn't exist" % (self.resource, dirname))
resource_management.core.exceptions.Fail: Applying File['/usr/hdp/current/hadoop-client/conf/hadoop-policy.xml'] failed, parent directory /usr/hdp/current/hadoop-client/conf doesn't exist

This is a soft link that link to /etc/hadoop/conf
I run
python /usr/lib/python2.6/site-packages/ambari_agent/HostCleanup.py --silent --skip=users
After run it, it removes /etc/hadoop/conf
However, reinstall does not recreate it.
So you may have to create all conf files by yourself.
Hope someone can patch it.

yum -y erase hdp-select
If you have done installation multiple times, some packages might not be cleaned.
To remove all HDP packages and start with fresh installation, erase hdp-select.
If this is not helping, remove all the versions from /usr/hdp delete this directory if it contains multiple versions of hdp
Remove all the installed packages like hadoop,hdfs,zookeeper etc.
yum remove zookeeper* hadoop* hdp* zookeeper*

I ran into the same problem: I was using HDP 2.3.2 on Centos 7.
The first problem:
Some conf files point to the /etc//conf directory (same as they are supposed to)
However, /etc//conf points back to the other conf directory which leads to an endless loop.
I was able to fix this problem by removing the /etc//conf symbolic links and creating directories
The second problem
If you run the python scripts to clean up the installation and start over however, several directories do not get recreated, such as the hadoop-client directory. This leads to exact your error message. Also this cleanup script does not work out well as it does not clean several users and directories. You have to userdel and groupdel.
UPDATE:
It seems it was a problem of HDP 2.3.2. In HDP 2.3.4, I did not run into that problem any more.

Creating /usr/hdp/current/hadoop-client/conf on failing host should solve the problem.

Related

failed to import pywin32 (even if it already installed) while starting supervisord in windows nanoserver container

I am trying to bring two process up in a windows Nanoserver container using supervisord (pip install supervisor-win )
Everything is setup in supervisord.conf, while starting it I am facing below issue,
C:\data>supervisord -n
C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\options.py:480: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (inc
luding its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
self.warnings.warn(
Traceback (most recent call last):
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 220, in _disable_inheritance_filehandler
import win32api
oduleNotFoundError: No module named 'win32api'
D
uring handling of the above exception, another exception occurred:
T
raceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\python-3.11.1-embed-amd64\Scripts\supervisord.exe\__main__.py", line 7, in <module>
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\supervisord.py", line 403, in main
go(options)
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\supervisord.py", line 415, in go
d.main()
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\supervisord.py", line 77, in main
self.options.make_logger()
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\options.py", line 1221, in make_logger
loggers.handle_file(
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 444, in handle_file
handler = RotatingFileHandler(filename, 'a', maxbytes, backups)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 211, in __init__
self._disable_inheritance_filehandler() # fix file used by others process
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\python-3.11.1-embed-amd64\Lib\site-packages\supervisor\loggers.py", line 223, in _disable_inheritance_filehandler
raise ImportWarning("log rotation requires the installation of the \"pywin32\" library.\n"
ImportWarning: log rotation requires the installation of the "pywin32" library.
Download and install from https://github.com/mhammond/pywin32/releases
C:\data>
pywin32 module is already installed (tried reinstall with whl and pip anyway, that did not help)
C:\data>python -m pip show pywin32
Name: pywin32
Version: 305
Summary: Python for Window Extensions
Home-page: https://github.com/mhammond/pywin32
Author: Mark Hammond (et al)
Author-email: mhammond#skippinet.com.au
License: PSF
Location: C:\python-3.11.1-embed-amd64\Lib\site-packages
Requires:
Required-by: pypiwin32, supervisor-win
C:\data>
What could be the issue here? I see less dll files (around 400 only) in C:\Windows\System32 compared to servercore/server image (This is working fine with windows servercore image.)

SerpentAI Installation error

I have been trying to install SerpentAI. I am on a Mac, and I have followed all the steps. I have all the dependencies, but when I use the keyword serpent it gives me this error.
I know I am missing a config file but I don't know where to find it, or how to solve this.
Any command that started with serpent gave me this error.
Here is the error
Traceback (most recent call last):
File "/anaconda3/bin/serpent", line 11, in <module>
load_entry_point('SerpentAI==2018.1.2', 'console_scripts', 'serpent')()
File "/anaconda3/lib/python3.6/site- packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
return ep.load()
File "/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2322, in load
return self.resolve()
File "/anaconda3/lib/python3.6/site-packages/pkg_resources/__init__.py", line 2328, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/anaconda3/lib/python3.6/site-packages/SerpentAI-2018.1.2-py3.6.egg/serpent/serpent.py", line 11, in <module>
from serpent.utilities import clear_terminal, display_serpent_logo, is_linux, is_macos, is_windows, is_unix, wait_for_crossbar
File "/anaconda3/lib/python3.6/site-packages/SerpentAI-2018.1.2-py3.6.egg/serpent/utilities.py", line 8, in <module>
from serpent.config import config
File "/anaconda3/lib/python3.6/site-packages/SerpentAI-2018.1.2-py3.6.egg/serpent/config.py", line 18, in <module>
raise Exception("Configuration file not found at: 'config/config.yml'...")
Exception: Configuration file not found at: 'config/config.yml'...
So I think I found the problem, you can clone the GitHub repo, and it will have the config files. Then when you run pip install it will clone a version, and that version won't have the config files.
I had the same issue when trying to run serpent vi sual_debugger after following all installation guide steps.
Try to run serpent setup, it might solve the problem you have. It helped in my case.

Spacy and sputnik issue on Python3

I am currently using space(0.101.0), tensorflox (1.0.0) and sputnik (0.9.3). I do have this issue happening :
super(Pool, self).__init__(app_name, app_version, path, **kwargs)
File "/Users/sebastien/xxx/venv/lib/python3.6/site-packages/sputnik/package_list.py", line 33, in __init__
self.load()
File "/Users/sebastien/xxx/venv/lib/python3.6/site-packages/sputnik/package_list.py", line 51, in load
for package in self.packages():
File "/Users/sebastien/xxx/venv/lib/python3.6/site-packages/sputnik/package_list.py", line 47, in packages
yield self.__class__.package_class(path=os.path.join(self.path, path))
File "/Users/sebastien/xxx/venv/lib/python3.6/site-packages/sputnik/package.py", line 15, in __init__
super(Package, self).__init__(defaults=meta['package'])
KeyError: 'package'
I have tried to combine different version but my make stuff is no more working. I have issues to build the overall system.
Based on what I gave as version used, This issue also happened when I am running the "python3 -m spacy.en.download"
Any idea?

docker-compose and term2 on Mac

I am on Mac, El-Capitan 10.11.5
Until Today, I was able to run the docker-daemon by calling "docker quickstart terminal"
then going into my project folder and doing a docker-compose up
Now, when I run that, I keep getting
docker-compose --verbose up --timeout 120
compose.config.config.find: Using configuration files: ./docker-compose.yml
docker.auth.auth.load_config: Found 'auths' section
docker.auth.auth.parse_auth: Found entry (registry=u'https://index.docker.io/v1/', username=u'my_user')
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose/cli/main.py", line 58, in main
File "compose/cli/main.py", line 106, in perform_command
File "compose/cli/command.py", line 34, in project_from_options
File "compose/cli/command.py", line 79, in get_project
File "compose/cli/command.py", line 55, in get_client
File "site-packages/docker/api/daemon.py", line 76, in version
File "site-packages/docker/utils/decorators.py", line 47, in inner
File "site-packages/docker/client.py", line 120, in _get
File "site-packages/requests/sessions.py", line 477, in get
File "site-packages/requests/sessions.py", line 465, in request
File "site-packages/requests/sessions.py", line 573, in send
File "site-packages/requests/adapters.py", line 415, in send
requests.exceptions.ConnectionError: ('Connection aborted.', error(2, 'No such file or directory'))
Is there a quick solution for this problem? my versions are
docker-machine version 0.7.0, build a650a40
Docker version 1.11.1, build 5604cbe
docker-compose version 1.7.1, build 0a9ab35
iterm2 Build 3.0.0
virtual Machine
Version 5.0.20 r106931
I simply solved this problem by adding the following line into my .profile file
alias docker_compose_run='eval "$(docker-machine env default)" && docker-compose up'
then I simply run docker_compose_run

Error with gclient sync while getting the chromium code on Mac OS

I'm trying to setup the chromium code following the documentation on Mac OS X 10.9.2.
I could successfully fetch the code with command:
fetch --nohooks chromium --nosvn=True
but when I try to sync the projects with gclient sync command it's breaking in the middle of the process throwing the following OSError:
________ running '/usr/bin/python src/build/download_nacl_toolchains.py --no-arm-trusted --keep' in '/Volumes/NJHD/google'
Updating /Volumes/NJHD/google/src/native_client/toolchain/.tars/toolchain_mac_x86.tar.bz2
from https://storage.googleapis.com/nativeclient-archive2/x86_toolchain/r12790/toolchain_mac_x86.tar.bz2.
.....................................................................................
|------------------------------------------------|
..................................................Traceback (most recent call last):
File "src/build/download_nacl_toolchains.py", line 63, in <module>
sys.exit(Main(sys.argv[1:]))
File "src/build/download_nacl_toolchains.py", line 58, in Main
download_toolchains.main(args)
File "/Volumes/NJHD/google/src/native_client/build/download_toolchains.py", line 414, in main
keep=options.keep, verbose=options.verbose):
File "/Volumes/NJHD/google/src/native_client/build/download_toolchains.py", line 263, in SyncFlavor
tar.Extract()
File "/Volumes/NJHD/google/src/native_client/build/cygtar.py", line 313, in Extract
self.tar.extract(m)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2084, in extract
self._extract_member(tarinfo, os.path.join(path, tarinfo.name))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2168, in _extract_member
self.makelink(tarinfo, targetpath)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2252, in makelink
os.link(tarinfo._link_target, targetpath)
OSError: [Errno 45] Operation not supported
Error: Command /usr/bin/python src/build/download_nacl_toolchains.py --no-arm-trusted --keep returned non-zero exit status 1 in /Volumes/NJHD/google
Hook '/usr/bin/python src/build/download_nacl_toolchains.py --no-arm-trusted --keep' took 89.91 secs
It seems to me that it is complaining about os.link(tarinfo._link_target, target path), so I tried creating a link using that function which works fine.
Is there any other configuration that I need to take care of?
Thanks in advance!
I placed the chromium project on an external hard disk as you did, and I got the same error.
Perhaps you should try the syncing stuff in your internal drive.
Haven't tried. Hope that help.

Resources