I installed Openstack(Kilo) on Centos7
The error occurred in adding the security group rules
I'm using Nova-network.
I got this error form nova-compute.log
2015-07-31 16:55:05.669 5950 ERROR oslo_messaging.rpc.dispatcher [req-76584058-8dbd-4860-a048-e9dbad712779 843c47b4a71b4ac3a6c4375d558aa423 3f4e979ea9b9409a9425442a8b096457 - -
-] Exception during message handling: 'metadata'
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher Traceback (most recent call last):
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 142, in _dispatch_and_reply
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher executor_callback))
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 186, in _dispatch
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher executor_callback)
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/dispatcher.py", line 130, in _do_dispatch
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher result = func(ctxt, **new_args)
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 6716, in refresh_instance_security_rules
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher return self.manager.refresh_instance_security_rules(ctxt, instance)
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 434, in decorated_function
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher args = (_load_instance(args[0]),) + args[1:]
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 425, in _load_instance
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher expected_attrs=metas)
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/objects/instance.py", line 492, in _from_db_object
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher instance['metadata'] = utils.instance_meta(db_inst)
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher File "/usr/lib/python2.7/site-packages/nova/utils.py", line 816, in instance_meta
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher if isinstance(instance['metadata'], dict):
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher KeyError: 'metadata'
2015-07-31 16:55:05.669 5950 TRACE oslo_messaging.rpc.dispatcher
Thank you warm-hearted!
I also faced the same error.
Try adding the rules to the security group first and then create the instance.
It worked for me.
This is a work around only. Since I don't have enough privileges to comment I am adding this as an answer.
If I get to know about any solution I will post it here.
Although it's been 4 years, probably nobody even cares what the root cause is but I put it here anyway, since I did some (re)search.
The object_compat decorator expects to get the Instance object with
'metadata' and 'system_metadata' attributes but if those aren't in the
db instance dict object, Instance._from_db_object will fail with a
KeyError.
In Kilo this happens per refresh_instance_security_rules because in
the compute API code, the instance passed to
refresh_instance_security_rules comes from the call to get the
security group(s) which joins on the instances column, but that
doesn't join on the metadata/system_metadata fields for the instances.
So when the instances get to object_compat in the compute manager and
the db instance dict is converted to the Instance object, it expects
fields that aren't in the dict and we get the KeyError.
Refer to the following code commit for details.
https://opendev.org/openstack/nova/commit/9369aab04e37b7818d49b00e65857be8b3564e9e
Related
I am getting SSH operator error timed out issue in Airflow. Initially I was not getting this issue but Now I am getting this issue continually
Code
xx = [
SSHOperator(
task_id=str(i),
command="sh /home/ec2-user/rapid/dht/hi_policy/bin/filename.sh ",
ssh_conn_id=SECRET_NAME,
dag=dag,
do_xcom_push=True,
)
for i in dbo_list_1
]
Error
[2022-08-22 10:16:03,760] {{taskinstance.py:1482}} ERROR - Task failed with exception
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/airflow/providers/ssh/operators/ssh.py", line 109, in execute
with self.ssh_hook.get_conn() as ssh_client:
File "/usr/local/lib/python3.7/site-packages/airflow/providers/ssh/hooks/ssh.py", line 240, in get_conn
client.connect(**connect_kwargs)
File "/usr/local/lib/python3.7/site-packages/paramiko/client.py", line 349, in <lambda>
retry_on_signal(lambda: sock.connect(addr))
socket.timeout: timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1138, in _run_raw_task
self._prepare_and_execute_task_with_callbacks(context, task)
File "/usr/local/lib/python3.7/site-packages/airflow/models/taskinstance.py", line 1311, in _prepare_and_execute_task_with_callbacks
result = self._execute_task(context, task_copy)
raise AirflowException(f"SSH operator error: {str(e)}")
airflow.exceptions.AirflowException: SSH operator error: timed out
I am using Openstack (Ocata).
I am facing an error (Resource CREATE failed: ResourceInError: resources.bigip_instance: Went to status ERROR due to \"Message: 'NoneType' object is not iterable, Code: 500\") intermittently.
We need your help with this. Here are the logs from nova-compute container.
2021-11-04 02:17:03.051 6 INFO nova.virt.libvirt.driver [req-102ca315-27e6-42db-b6f7-96957b9957b4 171e3f22877942e7a6c3a2839fd12721 b706dec01b2e470982a34a2c8f0c17b6 - - -] [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] Creating image
2021-11-04 02:17:03.092 6 ERROR nova.image.glance [req-102ca315-27e6-42db-b6f7-96957b9957b4 171e3f22877942e7a6c3a2839fd12721 b706dec01b2e470982a34a2c8f0c17b6 - - -] Error writing to /var/lib/nova/instances/_base/5b6cf3f5d3319fa96ce0e1537e7abcd5c59fe8d3.part: 'NoneType' object is not iterable
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [req-102ca315-27e6-42db-b6f7-96957b9957b4 171e3f22877942e7a6c3a2839fd12721 b706dec01b2e470982a34a2c8f0c17b6 - - -] [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] Instance failed to spawn
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] Traceback (most recent call last):
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2133, in _build_resources
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] yield resources
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1939, in _build_and_run_instance
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] block_device_info=block_device_info)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2786, in spawn
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] block_device_info=block_device_info)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3193, in _create_image
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] fallback_from_host)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3309, in _create_and_inject_local_root
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] instance, size, fallback_from_host)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 6988, in _try_fetch_image_cache
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] size=size)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 242, in cache
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] *args, **kwargs)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 584, in create_image
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] prepare_template(target=base, *args, **kwargs)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py", line 274, in inner
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] return f(*args, **kwargs)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/imagebackend.py", line 238, in fetch_func_sync
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] fetch_func(target=target, *args, **kwargs)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/utils.py", line 458, in fetch_image
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] images.fetch_to_raw(context, image_id, target)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 132, in fetch_to_raw
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] fetch(context, image_href, path_tmp)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/virt/images.py", line 123, in fetch
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] IMAGE_API.download(context, image_href, dest_path=path)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/image/api.py", line 184, in download
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] dst_path=dest_path)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 602, in download
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] {'path': dst_path, 'exception': ex})
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] self.force_reraise()
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] six.reraise(self.type_, self.value, self.tb)
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] File "/usr/lib/python2.7/dist-packages/nova/image/glance.py", line 586, in download
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] for chunk in image_chunks:
2021-11-04 02:17:03.093 6 ERROR nova.compute.manager [instance: adc77e69-ead0-4e10-9587-cae31e2d904a] TypeError: 'NoneType' object is not iterable
I have installed the spacy 3.1.2 and trying to install en_core_web_sm on jupyter notebook in Jupyterlab by using
!python3 -m spacy download en_core_web_sm
but it is showing the following error
2021-09-01 07:00:12.028366: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2021-09-01 07:00:12.028469: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2021-09-01 07:00:12.028486: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 488, in wrap_socket
cnx.do_handshake()
File "/opt/conda/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/opt/conda/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1671, in _raise_ssl_error
_raise_current_error()
File "/opt/conda/lib/python3.7/site-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 667, in urlopen
self._prepare_proxy(conn)
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 932, in _prepare_proxy
conn.connect()
File "/opt/conda/lib/python3.7/site-packages/urllib3/connection.py", line 371, in connect
ssl_context=context,
File "/opt/conda/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 384, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/opt/conda/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 494, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
timeout=timeout
File "/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py", line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/opt/conda/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/opt/conda/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/__main__.py", line 4, in <module>
setup_cli()
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/_util.py", line 69, in setup_cli
command(prog_name=COMMAND)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/conda/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/jovyan/.local/lib/python3.7/site-packages/typer/main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/download.py", line 35, in download_cli
download(model, direct, sdist, *ctx.args)
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/download.py", line 67, in download
compatibility = get_compatibility()
File "/home/jovyan/.local/lib/python3.7/site-packages/spacy/cli/download.py", line 78, in get_compatibility
r = requests.get(about.__compatibility__)
File "/opt/conda/lib/python3.7/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/opt/conda/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/compatibility.json (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
Due to this, I can't use
import spacy
nlp = spacy.load('en_core_web_sm')
Because it is showing error as:
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.
I have searched various post and articles related to it but nothing is working for me.
Can anyone tell me how to resolve this error ? It would be very helpful for me.
Good morning,
i am using tensorflow lite and i also wanted to use telepot.
I also installed the Coral USB accelerator, but I don't think it depends on him, also because it is independent of whether or not to add --edgetpu to the end of the program start command.
It works only if the transfer of messages or images I place it before this instruction:
from tensorflow.lite.python.interpreter import Interpreter
it's how telepot is incompatible with tflite.
Obviously everything works without the telepot instruction
What can I do?
I'm using a raspberry pi 4 with s.o. Debian burst, Python 3.7 and Opencv 4.1
This is the error that gives me:
Traceback (most recent call last):
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
cnx.do_handshake()
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1915, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/usr/lib/python3/dist-packages/OpenSSL/SSL.py", line 1647, in _raise_ssl_error
_raise_current_error()
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 54, in exception_from_error_queue
raise exception_type(errors)
OpenSSL.SSL.Error: [('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 672, in urlopen
chunked=chunked,
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])",)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "TFLite_detection_webcam_Prova1.py", line 137, in <module>
spedisci()
File "TFLite_detection_webcam_Prova1.py", line 33, in spedisci
bot.sendPhoto(256868258, foto)
File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 539, in sendPhoto
return self._api_request_with_file('sendPhoto', _rectify(p), 'photo', photo)
File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 499, in _api_request_with_file
return self._api_request(method, _rectify(params), files, **kwargs)
File "/usr/local/lib/python3.7/dist-packages/telepot/__init__.py", line 491, in _api_request
return api.request((self._token, method, params, files), **kwargs)
File "/usr/local/lib/python3.7/dist-packages/telepot/api.py", line 154, in request
r = fn(*args, **kwargs) # `fn` must be thread-safe
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/request.py", line 171, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/poolmanager.py", line 330, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
**response_kw
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
**response_kw
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 760, in urlopen
**response_kw
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/connectionpool.py", line 720, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/home/pi/tflite1/tflite1-env/lib/python3.7/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool
(host='api.telegram.org', port=443): Max retries exceeded with url: /bot926377239:AAEl0gqMWzG0dMidkGNqcGr2wkeTLbgZn3g/sendPhoto (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate', 'certificate verify failed')])")))
I am new to FIWARE. On my Ubuntu 16.04, I have setup Fiware's KeyRock which is a combination of OpenStack Keystone Identity Management and Horizon Dashboard. I have used this guide to set up everything.
After installing Keystone (which is a RESTful API), I have used curl to send HTTP requests and everything is working fine, i.e. I can run these commands on the keystone server using curl.
However, when I run Horizon on the same server using the reference Django project located in the openstack_dashboard directory with:
sudo tools/with_venv.sh python manage.py runserver 0.0.0.0:8000,
Horizon server starts with no errors but when I access it via browser, I get the following error:
A server error occured. Please contact the administrator
On the Keystone server console, I get the following error:
2017-01-09 11:53:40.962 13285 ERROR keystone.notifications [-] Failed to construct notifier
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications Traceback (most recent call last):
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications File "/keystone/keystone/notifications.py", line 220, in _get_notifier
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications transport = messaging.get_transport(CONF)
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications File "/keystone/.venv/local/lib/python2.7/site-packages/oslo/messaging/transport.py", line 185, in get_transport
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications invoke_kwds=kwargs)
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications File "/keystone/.venv/local/lib/python2.7/site-packages/stevedore/driver.py", line 45, in __init__
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications verify_requirements=verify_requirements,
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications File "/keystone/.venv/local/lib/python2.7/site-packages/stevedore/named.py", line 55, in __init__
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications verify_requirements)
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications File "/keystone/.venv/local/lib/python2.7/site-packages/stevedore/extension.py", line 170, in _load_plugins
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications self._on_load_failure_callback(self, ep, err)
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications File "/keystone/.venv/local/lib/python2.7/site-packages/stevedore/driver.py", line 50, in _default_on_load_failure
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications raise err
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications ImportError: cannot import name _uuid_generate_random
2017-01-09 11:53:40.962 13285 TRACE keystone.notifications
2017-01-09 11:53:40.964 13285 WARNING keystone.common.wsgi [-] Authorization failed. The request you have made requires authentication. from 127.0.0.1
2017-01-09 11:53:40.970 13285 INFO eventlet.wsgi.server [-] 127.0.0.1 - - [09/Jan/2017 11:53:40] "POST /v3/auth/tokens HTTP/1.1" 401 331 0.261293
On the Horizon server console, I get the following error:
DEBUG:idm_logger:Creating a new internal keystoneclient connection to http://0.0.0.0:5000/v3.
Unauthorized: The request you have made requires authentication. (HTTP 401)
Traceback (most recent call last):
File "/horizon/openstack_dashboard/fiware_api/keystone.py", line 990, in _get_element_and_cache
resource_element = function(request, element)
File "/horizon/openstack_dashboard/fiware_api/keystone.py", line 1022, in <lambda>
request, basic, lambda req, n: internal_keystoneclient(req).roles.find(name=n), pickle_props=['name'])
File "/horizon/openstack_dashboard/fiware_api/keystone.py", line 64, in internal_keystoneclient
cache.set(CACHE_CLIENT, keystoneclient.session.get_token(), INTERNAL_CLIENT_CACHE_TIME)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/session.py", line 610, in get_token
return (self.get_auth_headers(auth) or {}).get('X-Auth-Token')
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/session.py", line 589, in get_auth_headers
return auth.get_headers(self, **kwargs)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/auth/base.py", line 114, in get_headers
token = self.get_token(session)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/auth/identity/base.py", line 104, in get_token
return self.get_access(session).auth_token
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/auth/identity/base.py", line 144, in get_access
self.auth_ref = self.get_auth_ref(session)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/auth/identity/v3.py", line 127, in get_auth_ref
authenticated=False, log=False, **rkwargs)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/session.py", line 488, in post
return self.request(url, 'POST', **kwargs)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/utils.py", line 318, in inner
return func(*args, **kwargs)
File "/horizon/.venv/src/python-keystoneclient/keystoneclient/session.py", line 389, in request
raise exceptions.from_response(resp, method, url)
Unauthorized: The request you have made requires authentication. (HTTP 401)
Traceback (most recent call last):
File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
self.result = application(self.environ, self.start_response)
File "/horizon/.venv/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 64, in __call__
return self.application(environ, start_response)
File "/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 168, in __call__
self.load_middleware()
File "/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 46, in load_middleware
mw_instance = mw_class()
File "/horizon/.venv/local/lib/python2.7/site-packages/django/middleware/locale.py", line 23, in __init__
for url_pattern in get_resolver(None).url_patterns:
File "/horizon/.venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 367, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/horizon/.venv/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 361, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/horizon/openstack_dashboard/urls.py", line 36, in <module>
from openstack_dashboard.dashboards.idm_admin.user_accounts \
File "/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/views.py", line 28, in <module>
from openstack_dashboard.dashboards.idm_admin.user_accounts \
File "/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 195, in <module>
class UpdateAccountForm(forms.SelfHandlingForm, UserAccountsLogicMixin):
File "/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 202, in UpdateAccountForm
choices=get_account_choices())
File "/horizon/openstack_dashboard/dashboards/idm_admin/user_accounts/forms.py", line 172, in get_account_choices
use_idm_account=True),
File "/horizon/openstack_dashboard/fiware_api/keystone.py", line 1022, in get_basic_role
request, basic, lambda req, n: internal_keystoneclient(req).roles.find(name=n), pickle_props=['name'])
File "/horizon/openstack_dashboard/fiware_api/keystone.py", line 997, in _get_element_and_cache
exceptions.handle(request)
File "/horizon/horizon/exceptions.py", line 291, in handle
messages.error(request, message or fallback)
File "/horizon/horizon/messages.py", line 83, in error
fail_silently=fail_silently)
File "/horizon/horizon/messages.py", line 41, in add_message
if not horizon_message_already_queued(request, message):
File "/horizon/horizon/messages.py", line 28, in horizon_message_already_queued
if request.is_ajax():
AttributeError: 'NoneType' object has no attribute 'is_ajax'
[09/Jan/2017 12:39:35] "GET / HTTP/1.1" 500 59
I am sending a GET request via the browser but the Keystone server is receiving a POST request as indicated in its console output. I don't understand why is this so.
It looks like the Horizon server is not able to verify the credentials.
In the case of Fiware, you would get this error on Horizon server if the file local_settings.py (located in the /horizon/openstack_dashboard/local/ directory) is not properly configured. In this file, there is a dictionary named IDM_USER_CREDENTIALS where you have to set the password for the admin profile that was created when you populated the database of Keystone. It is also given in the link that you provided. Try changing the password and see if it works.