Ambari ZooKeeper Server install failure - apache-zookeeper

When i am installing ZooKeeper Server on the NameNode with Ambari.It throw:
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 179, in <module>
ZookeeperServer().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/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py", line 70, in install
self.configure(env)
File "/var/lib/ambari-agent/cache/common-services/ZOOKEEPER/3.4.5.2.0/package/scripts/zookeeper_server.py", line 49, in configure
zookeeper(type='server', upgrade_type=upgrade_type)
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.py", line 40, in zookeeper
conf_select.select(params.stack_name, "zookeeper", params.current_version)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/functions/conf_select.py", line 266, in select
shell.checked_call(get_cmd("set-conf-dir", package, version), logoutput=False, quiet=False, sudo=True)
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 'conf-select set-conf-dir --package zookeeper --stack-version 2.4.3.0-227 --conf-version 0' returned 1. zookeeper not installed or incorrect package name
I am searching from Google,they said "make sure have installed Zookeeper server",and i am installing now(failed).Where is going wrong?How to fix it?
CentOS 7.2,Ambari 2.2.2.0,Zookeeper 3.4.6.2.4,HDP 2.4.3.

Related

Python Imports Keep Failing

I recently wrote a package which is on 1.2.9 but when trying to import it using pip install rolimons Python tries to import 1.2.9 which fails and moves on until version 1.1.3 which is the only version that doesn't error out.
Here is the error:
ERROR: Command errored out with exit status 1:
command: /home/runner/rolimonspy-test/venv/bin/python3 /home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp89bhulpc
cwd: /tmp/pip-install-baj2a_r_/rolimons_41a3df9c7f414766a57996a21dc8cd26
Complete output (16 lines):
Traceback (most recent call last):
File "/home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 280, in <module>
main()
File "/home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/runner/rolimonspy-test/venv/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 41, in prepare_metadata_for_build_wheel
builder = WheelBuilder(poetry)
File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/wheel.py", line 56, in __init__
super().__init__(poetry, executable=executable)
File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/builders/builder.py", line 83, in __init__
self._module = Module(
File "/tmp/pip-build-env-029qi198/overlay/lib/python3.8/site-packages/poetry/core/masonry/utils/module.py", line 69, in __init__
raise ModuleOrPackageNotFound(
poetry.core.masonry.utils.module.ModuleOrPackageNotFound: No file/folder found for package python-template
More information about the structure and package here:

error executing flower with celery in Windows 10

I am developing an application in Django 3, in windows 10.
I have installed celery and RabitMQ and flower. Celery works well but when I run
celery -A proj flower
produces the following error
[I 200718 21:32:31 command:134] Visit me at http://localhost:5555
[I 200718 21:32:31 command:141] Broker: amqp://guest:**#localhost:5672//
[I 200718 21:32:31 command:142] Registered tasks:
['apps.tareas.task.send_emails_users',
'celery.accumulate',
'celery.backend_cleanup',
'celery.chain',
'celery.chord',
'celery.chord_unlock',
'celery.chunks',
'celery.group',
'celery.map',
'celery.starmap']
Traceback (most recent call last):
File "C:\Program Files\Python38\lib\runpy.py", line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\Python38\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\Sofia\OneDrive\Proyectos\Django 3\shop\env\Scripts\celery.exe\__main__.py", line 9, in <module>
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\celery\__main__.py", line 16, in main
_main()
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\celery\bin\celery.py", line 322, in main
cmd.execute_from_commandline(argv)
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\celery\bin\celery.py", line 495, in execute_from_commandline
super(CeleryCommand, self).execute_from_commandline(argv)))
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\celery\bin\base.py", line 305, in execute_from_commandline
return self.handle_argv(self.prog_name, argv[1:])
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\celery\bin\celery.py", line 487, in handle_argv
return self.execute(command, argv)
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\celery\bin\celery.py", line 415, in execute
[I 200718 21:32:31 mixins:229] Connected to amqp://guest:**#127.0.0.1:5672//
return cls(
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\flower\command.py", line 51, in run_from_argv
flower.start()
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\flower\app.py", line 50, in start
self.listen(self.options.port, address=self.options.address,
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\tornado\web.py", line 2042, in listen
server.listen(port, address)
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\tornado\tcpserver.py", line 144, in listen
self.add_sockets(sockets)
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\tornado\tcpserver.py", line 157, in add_sockets
self._handlers[sock.fileno()] = add_accept_handler(
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\tornado\netutil.py", line 268, in add_accept_handler
io_loop.add_handler(sock, accept_handler, IOLoop.READ)
File "c:\users\sofia\onedrive\proyectos\django 3\shop\env\lib\site-packages\tornado\platform\asyncio.py", line 79, in add_handler
self.asyncio_loop.add_reader(
File "C:\Program Files\Python38\lib\asyncio\events.py", line 501, in add_reader
raise NotImplementedError
NotImplementedError
Can't be causing this error.
I have searched the documentation and found nothing like this error.
I have solved the problem by editing the file asyncio.py in tornado\platform adding:
import sys
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
I had the same error.
Which version of python do you use? mine was 3.8 then I changed to 3.6 and everything works correctly.

Failing to install pandas due to an error

I am Failing to install pandas in cmd using pip-install pandas due to the error below that pops up when installing. I am using python version 3.7
Traceback (most recent call last):
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 360, in _error_catcher
yield
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 442, in read
data = self._fp.read(amt)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\http\client.py", line 447, in read
n = self.readinto(b)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\http\client.py", line 491, in readinto
n = self.fp.readinto(b)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\ssl.py", line 1052, in recv_into
return self.read(nbytes, buffer)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\ssl.py", line 911, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\cli\base_command.py", line 179, in main
status = self.run(options, args)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
resolver.resolve(requirement_set)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\resolve.py", line 131, in resolve
self._resolve_one(requirement_set, req)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\resolve.py", line 294, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\resolve.py", line 242, in _get_abstract_dist_for
self.require_hashes
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\operations\prepare.py", line 334, in prepare_linked_requirement
progress_bar=self.progress_bar
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\download.py", line 878, in unpack_url
progress_bar=progress_bar
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\download.py", line 702, in unpack_http_url
progress_bar)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\download.py", line 946, in _download_http_url
_download_url(resp, link, content_file, hashes, progress_bar)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\download.py", line 639, in _download_url
hashes.check_against_chunks(downloaded_chunks)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\utils\hashes.py", line 62, in check_against_chunks
for chunk in chunks:
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\download.py", line 607, in written_chunks
for chunk in chunks:
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\utils\ui.py", line 159, in iter
for x in it:
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_internal\download.py", line 596, in resp_read
decode_content=False):
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 494, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 459, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\chiya\appdata\local\programs\python\python37-32\lib\site-packages\pip\_vendor\urllib3\response.py", line 365, in _error_catcher
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
I tried updating pip with the command pip install -U pip setuptools
but it showed that pip is up to date.
I tried again pip install fbchat which downloaded successfully but after trying to install pandas with the same "pip install pandas" the error popped up again.**

airflow worker not reaching sqs

I am running the airflow worker service. The service is not able to connect to the sqs
The scheduler is able to reach and write to the queue
Environment:
Amazon Linux
Python 3.54
Airflow 1.10.1
Celery 4.1.1
Proxies are fine; I have implemented this in both python 2.7 and 3.5 same issue
I have set the celery_transport_options for the region
Airflow is configured with celeryExecutor, SQS broker & postgres database for backend
partial log
[2018-08-30 15:43:58,779: CRITICAL/MainProcess] Unrecoverable error: Exception('Request Empty body HTTP 599 Failed to connect to eu-west-1.queue.amazonaws.com port 443: Connection timed out (None)',)
Traceback (most recent call last):
File "/usr/local/lib/python3.5/site-packages/celery/worker/worker.py", line 207, in start
self.blueprint.start(self)
File "/usr/local/lib/python3.5/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/usr/local/lib/python3.5/site-packages/celery/bootsteps.py", line 370, in start
return self.obj.start()
File "/usr/local/lib/python3.5/site-packages/celery/worker/consumer/consumer.py", line 316, in start
blueprint.start(self)
File "/usr/local/lib/python3.5/site-packages/celery/bootsteps.py", line 119, in start
step.start(parent)
File "/usr/local/lib/python3.5/site-packages/celery/worker/consumer/consumer.py", line 592, in start
c.loop(*c.loop_args())
File "/usr/local/lib/python3.5/site-packages/celery/worker/loops.py", line 91, in asynloop
next(loop)
File "/usr/local/lib/python3.5/site-packages/kombu/asynchronous/hub.py", line 354, in create_loop
cb(*cbargs)
File "/usr/local/lib/python3.5/site-packages/kombu/asynchronous/http/curl.py", line 114, in on_writable
return self._on_event(fd, _pycurl.CSELECT_OUT)
File "/usr/local/lib/python3.5/site-packages/kombu/asynchronous/http/curl.py", line 124, in _on_event
self._process_pending_requests()
File "/usr/local/lib/python3.5/site-packages/kombu/asynchronous/http/curl.py", line 132, in _process_pending_requests
self._process(curl, errno, reason)
File "/usr/local/lib/python3.5/site-packages/kombu/asynchronous/http/curl.py", line 178, in _process
buffer=buffer, effective_url=effective_url, error=error,
File "/usr/local/lib/python3.5/site-packages/vine/promises.py", line 150, in __call__
svpending(*ca, **ck)
File "/usr/local/lib/python3.5/site-packages/vine/promises.py", line 143, in __call__
return self.throw()
File "/usr/local/lib/python3.5/site-packages/vine/promises.py", line 140, in __call__
retval = fun(*final_args, **final_kwargs)
File "/usr/local/lib/python3.5/site-packages/vine/funtools.py", line 100, in _transback
return callback(ret)
File "/usr/local/lib/python3.5/site-packages/vine/promises.py", line 143, in __call__
return self.throw()
File "/usr/local/lib/python3.5/site-packages/vine/promises.py", line 140, in __call__
retval = fun(*final_args, **final_kwargs)
File "/usr/local/lib/python3.5/site-packages/vine/funtools.py", line 98, in _transback
callback.throw()
File "/usr/local/lib/python3.5/site-packages/vine/funtools.py", line 96, in _transback
ret = filter_(*args + (ret,), **kwargs)
File "/usr/local/lib/python3.5/site-packages/kombu/asynchronous/aws/connection.py", line 233, in _on_list_ready
raise self._for_status(response, response.read())
Exception: Request Empty body HTTP 599 Failed to connect to eu-west-1.queue.amazonaws.com port 443: Connection timed out (None)

ipython: OperationalError: disk I/O error

I was running ipython successfully on fedora 18 until now: I'm getting the following exception when trying to launch it:
Traceback (most recent call last):
File "/usr/bin/ipython", line 9, in <module>
load_entry_point('ipython==1.1.0', 'console_scripts', 'ipython')()
File "/usr/lib/python2.7/site-packages/IPython/__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/config/application.py", line 544, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/usr/lib/python2.7/site-packages/IPython/config/application.py", line 89, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 323, in initialize
self.init_shell()
File "/usr/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 339, in init_shell
ipython_dir=self.ipython_dir, user_ns=self.user_ns)
File "/usr/lib/python2.7/site-packages/IPython/config/configurable.py", line 349, in instance
inst = cls(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 320, in __init__
**kwargs
File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 456, in __init__
self.init_history()
File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 1487, in init_history
self.history_manager = HistoryManager(shell=self, parent=self)
File "/usr/lib/python2.7/site-packages/IPython/core/history.py", line 481, in __init__
self.new_session()
File "<string>", line 2, in new_session
File "/usr/lib/python2.7/site-packages/IPython/core/history.py", line 65, in needs_sqlite
return f(self, *a, **kw)
File "/usr/lib/python2.7/site-packages/IPython/core/history.py", line 500, in new_session
self.session_number = cur.lastrowid
OperationalError: disk I/O error
If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev#scipy.org
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.
Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
c.Application.verbose_crash=True
I tried to upgrade ipython to the latest version using pip, which did not help. Any solution or workaround is very much welcomed.
IPython store history in a profile generally in ~/.ipython/profile_default/history.sqlite. There seem to be a disk error reading/writting to it.
Check the permissions of the file/folders, if necessary delete the file.
I solved it by set c.NotebookNotary.db_file = u':memory:' in jupyter configure file ~/.jupyter/jupyter_notebook_config.py