Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exceptions.AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1' #35

Closed
rothgar opened this issue May 15, 2017 · 3 comments
Closed

Comments

@rothgar
Copy link

rothgar commented May 15, 2017

Getting this error with Python 2.7.5 or red hat linux 7.3

Traceback (most recent call last):
  File "/usr/bin/kubetop", line 7, in <module>
    from kubetop._script import main
  File "/usr/lib/python2.7/site-packages/kubetop/_script.py", line 25, in <module>
    from ._twistmain import TwistMain
  File "/usr/lib/python2.7/site-packages/kubetop/_twistmain.py", line 43, in <module>
    from twisted.application.twist._twist import Twist
  File "/usr/lib64/python2.7/site-packages/twisted/application/twist/_twist.py", line 14, in <module>
    from ..runner._runner import Runner, RunnerOptions
  File "/usr/lib64/python2.7/site-packages/twisted/application/runner/_runner.py", line 20, in <module>
    from twisted.internet import default as defaultReactor
  File "/usr/lib64/python2.7/site-packages/twisted/internet/default.py", line 56, in <module>
    install = _getInstallFunction(platform)
  File "/usr/lib64/python2.7/site-packages/twisted/internet/default.py", line 44, in _getInstallFunction
    from twisted.internet.epollreactor import install
  File "/usr/lib64/python2.7/site-packages/twisted/internet/epollreactor.py", line 24, in <module>
    from twisted.internet import posixbase
  File "/usr/lib64/python2.7/site-packages/twisted/internet/posixbase.py", line 18, in <module>
    from twisted.internet import error, udp, tcp
  File "/usr/lib64/python2.7/site-packages/twisted/internet/tcp.py", line 28, in <module>
    from twisted.internet._newtls import (
  File "/usr/lib64/python2.7/site-packages/twisted/internet/_newtls.py", line 21, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/lib64/python2.7/site-packages/twisted/protocols/tls.py", line 63, in <module>
    from twisted.internet._sslverify import _setAcceptableProtocols
  File "/usr/lib64/python2.7/site-packages/twisted/internet/_sslverify.py", line 38, in <module>
    TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1,
AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

I tried in python 3.6.0 but got a different error (I'll open a separate ticket)

@exarkun
Copy link
Contributor

exarkun commented May 17, 2017

I think this is an incompatibility between Twisted and OpenSSL (not pyOpenSSL). Older versions of OpenSSL don't have OP_NO_TLSv1_1. pyOpenSSL (which deals gracefully with older and newer versions of OpenSSL) consequently doesn't export it. But Twisted unconditionally tries to use it, breaking.

But I suppose it could also be due to a very old version of pyOpenSSL.

There are two (!!) upstream bug reports about this:

I'm not sure if this is easily fixable in kubetop but hopefully it will be fixed in Twisted 17.2...

@glyph
Copy link

glyph commented May 26, 2017

How exactly did you install kubetop? I'm trying to understand all the circumstances where this can occur, so that I'm sure that any fix we have gives users correct directions about how to remedy it.

@exarkun
Copy link
Contributor

exarkun commented Aug 20, 2018

If anyone can reproduce this and provide instructions for doing so, please leave them in a comment here and re-open the issue.

Until then, closing this as it's not clear what the problem is (and therefore the means to fix it are similarly unclear).

@exarkun exarkun closed this as completed Aug 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants