when i am trying to run punjab (BOSH connection manager) using following command

twistd -y punjab.tac 

i am getting follwing error

in punjab.tac i am referencing

from twisted.internet import reactor, ssl

so far i tried to install pyOpenSSL using yum install pyOpenSSL but even after that i got the same error.

after that i tried downloading source and run following commands but still no luck

wget http://pypi.python.org/packages/source/p/pyOpenSSL/pyOpenSSL-0.13.tar.gz#md5=767bca18a71178ca353dff9e10941929

cd  pyOpenSSL-0.13

python setup.py install

Error

Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 652, in run
    runApp(config)
  File "/usr/local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 451, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---
  File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 462, in getApplication
    application = service.loadApplication(filename, style, passphrase)
  File "/usr/local/lib/python2.7/site-packages/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)
  File "/usr/local/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d
  File "punjab.tac", line 8, in <module>
    from twisted.internet.ssl import ClientContextFactory, PrivateCertificate
  File "/usr/local/lib/python2.7/site-packages/twisted/internet/ssl.py", line 23, in <module>
    from OpenSSL import SSL
**exceptions.ImportError: No module named OpenSSL**

I tried to install pyOpenSSL 0.12 after then but now i am facing a different error

Traceback (most recent call last):   File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 652, in run
    runApp(config)   File "/usr/local/lib/python2.7/site-packages/twisted/scripts/twistd.py", line 23, in runApp
    _SomeApplicationRunner(config).run()   File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 386, in run
    self.application = self.createOrGetApplication()   File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 451, in createOrGetApplication
    application = getApplication(self.config, passphrase)
--- <exception caught here> ---   File "/usr/local/lib/python2.7/site-packages/twisted/application/app.py", line 462, in getApplication
    application = service.loadApplication(filename, style, passphrase)   File "/usr/local/lib/python2.7/site-packages/twisted/application/service.py", line 405, in loadApplication
    application = sob.loadValueFromFile(filename, 'application', passphrase)   File "/usr/local/lib/python2.7/site-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
    exec fileObj in d, d   File "punjab.tac", line 37, in <module>
    '/path/to/cacert.pem',   File "/usr/local/lib/python2.7/site-packages/twisted/internet/ssl.py", line 68, in __init__
    self.cacheContext()   File "/usr/local/lib/python2.7/site-packages/twisted/internet/ssl.py", line 77, in cacheContext
    ctx.use_certificate_file(self.certificateFileName) OpenSSL.SSL.Error: [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'FILE_CTRL', 'system lib'), ('SSL routines', 'SSL_CTX_use_certificate_file', 'system lib')]

Failed to load application: [('system library', 'fopen', 'No such file or directory'), ('BIO routines', 'FILE_CTRL', 'system lib'), ('SSL routines', 'SSL_CTX_use_certificate_file', 'system lib')]
link|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.