← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1601986] [NEW] RuntimeError: osrandom engine already registered

 

Public bug reported:

Horizon errors with 500 Internal Server Error.

The apache error.log logs an exception "RuntimeError: osrandom engine
already registered", cf. traceback below. We need to restart apache2 to
recover.

This happens in a non-deterministic way, ie. Horizon will function
correctly for some time after throwing this error.

Versions:

python-django-horizon            2:8.0.1-0ubuntu1~cloud0 
apache2                          2.4.7-1ubuntu4.10     
libapache2-mod-wsgi              3.4-4ubuntu2.1.14.04.2

Traceback:


[Mon Jul 11 20:16:46.373640 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908] mod_wsgi (pid=2045796): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Mon Jul 11 20:16:46.373681 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908] Traceback (most recent call last):
[Mon Jul 11 20:16:46.373697 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 168, in __call__
[Mon Jul 11 20:16:46.390398 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     self.load_middleware()
[Mon Jul 11 20:16:46.390420 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 46, in load_middleware
[Mon Jul 11 20:16:46.390515 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     mw_instance = mw_class()
[Mon Jul 11 20:16:46.390525 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/middleware/locale.py", line 23, in __init__
[Mon Jul 11 20:16:46.394033 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     for url_pattern in get_resolver(None).url_patterns:
[Mon Jul 11 20:16:46.394052 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 372, in url_patterns
[Mon Jul 11 20:16:46.394500 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
[Mon Jul 11 20:16:46.394516 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 366, in urlconf_module
[Mon Jul 11 20:16:46.394533 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     self._urlconf_module = import_module(self.urlconf_name)
[Mon Jul 11 20:16:46.394540 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Mon Jul 11 20:16:46.410602 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     __import__(name)
[Mon Jul 11 20:16:46.410618 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/urls.py", line 35, in <module>
[Mon Jul 11 20:16:46.416197 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     url(r'^api/', include('openstack_dashboard.api.rest.urls')),
[Mon Jul 11 20:16:46.416219 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 28, in include
[Mon Jul 11 20:16:46.422868 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     urlconf_module = import_module(urlconf_module)
[Mon Jul 11 20:16:46.422882 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
[Mon Jul 11 20:16:46.422899 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     __import__(name)
[Mon Jul 11 20:16:46.422905 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/__init__.py", line 36, in <module>
[Mon Jul 11 20:16:46.432789 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from openstack_dashboard.api import cinder
[Mon Jul 11 20:16:46.432803 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/cinder.py", line 30, in <module>
[Mon Jul 11 20:16:46.440814 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from cinderclient.v2.contrib import list_extensions as cinder_list_extensions
[Mon Jul 11 20:16:46.440829 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cinderclient/v2/__init__.py", line 17, in <module>
[Mon Jul 11 20:16:46.453863 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from cinderclient.v2.client import Client    # noqa
[Mon Jul 11 20:16:46.453887 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cinderclient/v2/client.py", line 16, in <module>
[Mon Jul 11 20:16:46.457850 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from cinderclient import client
[Mon Jul 11 20:16:46.457864 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cinderclient/client.py", line 44, in <module>
[Mon Jul 11 20:16:46.461033 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet import sleep
[Mon Jul 11 20:16:46.461048 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/__init__.py", line 10, in <module>
[Mon Jul 11 20:16:46.468784 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet import convenience
[Mon Jul 11 20:16:46.468810 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/convenience.py", line 3, in <module>
[Mon Jul 11 20:16:46.473247 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet import greenio
[Mon Jul 11 20:16:46.473265 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/greenio/__init__.py", line 3, in <module>
[Mon Jul 11 20:16:46.475382 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet.greenio.base import *  # noqa
[Mon Jul 11 20:16:46.475406 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/greenio/base.py", line 441, in <module>
[Mon Jul 11 20:16:46.476165 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from OpenSSL import SSL
[Mon Jul 11 20:16:46.476185 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
[Mon Jul 11 20:16:46.482761 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from OpenSSL import rand, crypto, SSL
[Mon Jul 11 20:16:46.482781 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
[Mon Jul 11 20:16:46.490827 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from OpenSSL._util import (
[Mon Jul 11 20:16:46.490842 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/OpenSSL/_util.py", line 7, in <module>
[Mon Jul 11 20:16:46.497707 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     binding = Binding()
[Mon Jul 11 20:16:46.497725 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 63, in __init__
[Mon Jul 11 20:16:46.505876 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     self._ensure_ffi_initialized()
[Mon Jul 11 20:16:46.505897 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 95, in _ensure_ffi_initialized
[Mon Jul 11 20:16:46.505922 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     cls._register_osrandom_engine()
[Mon Jul 11 20:16:46.505934 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 70, in _register_osrandom_engine
[Mon Jul 11 20:16:46.505954 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     raise RuntimeError("osrandom engine already registered")
[Mon Jul 11 20:16:46.505984 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908] RuntimeError: osrandom engine already registered

** Affects: horizon
     Importance: Undecided
         Status: New


** Tags: canonical-bootstack

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1601986

Title:
  RuntimeError: osrandom engine already registered

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Horizon errors with 500 Internal Server Error.

  The apache error.log logs an exception "RuntimeError: osrandom engine
  already registered", cf. traceback below. We need to restart apache2
  to recover.

  This happens in a non-deterministic way, ie. Horizon will function
  correctly for some time after throwing this error.

  Versions:

  python-django-horizon            2:8.0.1-0ubuntu1~cloud0 
  apache2                          2.4.7-1ubuntu4.10     
  libapache2-mod-wsgi              3.4-4ubuntu2.1.14.04.2

  Traceback:

  
  [Mon Jul 11 20:16:46.373640 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908] mod_wsgi (pid=2045796): Exception occurred processing WSGI script '/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
  [Mon Jul 11 20:16:46.373681 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908] Traceback (most recent call last):
  [Mon Jul 11 20:16:46.373697 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 168, in __call__
  [Mon Jul 11 20:16:46.390398 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     self.load_middleware()
  [Mon Jul 11 20:16:46.390420 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 46, in load_middleware
  [Mon Jul 11 20:16:46.390515 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     mw_instance = mw_class()
  [Mon Jul 11 20:16:46.390525 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/middleware/locale.py", line 23, in __init__
  [Mon Jul 11 20:16:46.394033 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     for url_pattern in get_resolver(None).url_patterns:
  [Mon Jul 11 20:16:46.394052 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 372, in url_patterns
  [Mon Jul 11 20:16:46.394500 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  [Mon Jul 11 20:16:46.394516 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 366, in urlconf_module
  [Mon Jul 11 20:16:46.394533 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     self._urlconf_module = import_module(self.urlconf_name)
  [Mon Jul 11 20:16:46.394540 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
  [Mon Jul 11 20:16:46.410602 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     __import__(name)
  [Mon Jul 11 20:16:46.410618 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/urls.py", line 35, in <module>
  [Mon Jul 11 20:16:46.416197 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     url(r'^api/', include('openstack_dashboard.api.rest.urls')),
  [Mon Jul 11 20:16:46.416219 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 28, in include
  [Mon Jul 11 20:16:46.422868 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     urlconf_module = import_module(urlconf_module)
  [Mon Jul 11 20:16:46.422882 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
  [Mon Jul 11 20:16:46.422899 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     __import__(name)
  [Mon Jul 11 20:16:46.422905 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/__init__.py", line 36, in <module>
  [Mon Jul 11 20:16:46.432789 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from openstack_dashboard.api import cinder
  [Mon Jul 11 20:16:46.432803 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/share/openstack-dashboard/openstack_dashboard/wsgi/../../openstack_dashboard/api/cinder.py", line 30, in <module>
  [Mon Jul 11 20:16:46.440814 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from cinderclient.v2.contrib import list_extensions as cinder_list_extensions
  [Mon Jul 11 20:16:46.440829 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cinderclient/v2/__init__.py", line 17, in <module>
  [Mon Jul 11 20:16:46.453863 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from cinderclient.v2.client import Client    # noqa
  [Mon Jul 11 20:16:46.453887 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cinderclient/v2/client.py", line 16, in <module>
  [Mon Jul 11 20:16:46.457850 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from cinderclient import client
  [Mon Jul 11 20:16:46.457864 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cinderclient/client.py", line 44, in <module>
  [Mon Jul 11 20:16:46.461033 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet import sleep
  [Mon Jul 11 20:16:46.461048 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/__init__.py", line 10, in <module>
  [Mon Jul 11 20:16:46.468784 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet import convenience
  [Mon Jul 11 20:16:46.468810 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/convenience.py", line 3, in <module>
  [Mon Jul 11 20:16:46.473247 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet import greenio
  [Mon Jul 11 20:16:46.473265 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/greenio/__init__.py", line 3, in <module>
  [Mon Jul 11 20:16:46.475382 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from eventlet.greenio.base import *  # noqa
  [Mon Jul 11 20:16:46.475406 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/eventlet/greenio/base.py", line 441, in <module>
  [Mon Jul 11 20:16:46.476165 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from OpenSSL import SSL
  [Mon Jul 11 20:16:46.476185 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
  [Mon Jul 11 20:16:46.482761 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from OpenSSL import rand, crypto, SSL
  [Mon Jul 11 20:16:46.482781 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/OpenSSL/rand.py", line 11, in <module>
  [Mon Jul 11 20:16:46.490827 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     from OpenSSL._util import (
  [Mon Jul 11 20:16:46.490842 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/OpenSSL/_util.py", line 7, in <module>
  [Mon Jul 11 20:16:46.497707 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     binding = Binding()
  [Mon Jul 11 20:16:46.497725 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 63, in __init__
  [Mon Jul 11 20:16:46.505876 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     self._ensure_ffi_initialized()
  [Mon Jul 11 20:16:46.505897 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 95, in _ensure_ffi_initialized
  [Mon Jul 11 20:16:46.505922 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     cls._register_osrandom_engine()
  [Mon Jul 11 20:16:46.505934 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]   File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 70, in _register_osrandom_engine
  [Mon Jul 11 20:16:46.505954 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908]     raise RuntimeError("osrandom engine already registered")
  [Mon Jul 11 20:16:46.505984 2016] [:error] [pid 2045796:tid 139828791035648] [remote 172.16.4.81:33908] RuntimeError: osrandom engine already registered

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1601986/+subscriptions


Follow ups