Bug 1284148

Summary: Error Contents: osrandom engine already registered
Product: [Fedora] Fedora Reporter: Sergio Basto <sergio>
Component: python-cryptographyAssignee: Matěj Cepl <mcepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: mcepl, mcepl, nathaniel, terrycwk1994
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-cryptography-1.2.1-1.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-15 23:24:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergio Basto 2015-11-21 02:38:49 UTC
Description of problem:
Many add-ons of kodi doesn't run 


Error Type: <type 'exceptions.RuntimeError'>
                                            Error Contents: osrandom engine already registered
                                            Traceback (most recent call last):
                                              File "/home/sergio/.kodi/addons/script.pseudotv.live/default.py", line 29, in <module>
                                                from resources.lib.utils import *
                                              File "/home/sergio/.kodi/addons/script.pseudotv.live/resources/lib/utils.py", line 20, in <module>
                                                import os, re, sys, time, zipfile, threading, requests, random, traceback, pyfscache
                                              File "/home/sergio/.kodi/addons/script.module.requests/lib/requests/__init__.py", line 53, in <module>
                                                from .packages.urllib3.contrib import pyopenssl
                                              File "/home/sergio/.kodi/addons/script.module.requests/lib/requests/packages/urllib3/contrib/pyopenssl.py", line 53, in <module>
                                                import OpenSSL.SSL
                                              File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
                                                from OpenSSL import rand, crypto, SSL
                                              File "/usr/lib/python2.7/site-packages/OpenSSL/rand.py", line 11, in <module>
                                                from OpenSSL._util import (
                                              File "/usr/lib/python2.7/site-packages/OpenSSL/_util.py", line 7, in <module>
                                                binding = Binding()
                                              File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 95, in __init__
                                                self._ensure_ffi_initialized()
                                              File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 127, in _ensure_ffi_initialized
                                                cls._register_osrandom_engine()
                                              File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", line 102, in _register_osrandom_engine
                                                raise RuntimeError("osrandom engine already registered")
                                            RuntimeError: osrandom engine already registered
Version-Release number of selected component (if applicable):


How reproducible:
Run kodi , and one addon that needs python cryptography for example pseudotv.live


Additional info:
I had update to python-cryptography-1.1-1.fc23.x86_64 and is working 

version 1.1 from f24 recompiled for F23 gives me another error :
 Error Contents: cffi library '_openssl' has no function, constant or global variable named 'Cryptography_HAS_SET_CERT_CB'

but I don't know if I missed a restart to kodi .

Anyway my recommendation is upgrade to 1.1.1


More references : 
https://github.com/pyca/cryptography/issues/2287
https://github.com/hippojay/plugin.video.plexbmc/issues/123

Comment 1 Sergio Basto 2015-12-25 05:45:07 UTC
Updated to 1.1.2 in https://copr.fedoraproject.org/coprs/sergiomb/buildsforF21/builds/

curiosity:  python-cryptography fail to build in tests for F22 and F21

Comment 2 Fedora Update System 2016-01-11 15:11:18 UTC
python-cryptography-1.2.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8351acc81f

Comment 3 Fedora Update System 2016-01-12 09:52:58 UTC
python-cryptography-1.2.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8351acc81f

Comment 4 Fedora Update System 2016-01-13 21:48:21 UTC
python-cryptography-1.2.1-1.fc23 python-cryptography-vectors-1.2.1-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8351acc81f

Comment 5 Fedora Update System 2016-01-14 11:26:13 UTC
python-cryptography-1.2.1-1.fc23, python-cryptography-vectors-1.2.1-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8351acc81f

Comment 6 Fedora Update System 2016-01-15 23:24:25 UTC
python-cryptography-1.2.1-1.fc23, python-cryptography-vectors-1.2.1-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.