cherrypy + ssl + pyinstaller
harsh savla <[email protected]>
| Newsgroups | gmane.comp.python.cherrypy |
|---|---|
| Message-ID | <[email protected]> |
I am trying to get cherrypy to work with ssl support.
Env:
build: debian wheezy 64-bit chroot
run: debian wheezy 64-bit chroot
cherrypy: 4.0.0
python: 2.7.10 (has ssl support, can import ssl)
pyinstaller: 2.1
Here is the code:
sss.py
import cherrypy
config = {
'global' : {
'server.socket_host' : '0.0.0.0',
'server.socket_port' : 8888,
'server.thread_pool' : 8,
'server.ssl_module' : 'builtin',
'server.ssl_certificate' : '/certs/cert.pem',
#'server.ssl_certificate_chain' : '/path/to/certs/ssl123_ca_bundle.pem',
'server.ssl_private_key' : '/certs/key.pem'
}
}
class App:
@cherrypy.expose
def index(self):
return '*Is this secure?*'
if name == 'main':
cherrypy.quickstart(App(), '/', config)
I compile the above code with: pyinstaller sss.py and run the resultant
binary on a 64-bit chroot environment (which is same as build env)
I see the following traceback.
[22/Jun/2016:17:11:29] ENGINE Listening for SIGHUP.
[22/Jun/2016:17:11:29] ENGINE Listening for SIGTERM.
[22/Jun/2016:17:11:29] ENGINE Listening for SIGUSR1.
[22/Jun/2016:17:11:29] ENGINE Bus STARTING
[22/Jun/2016:17:11:29] ENGINE Started monitor thread 'Autoreloader'.
[22/Jun/2016:17:11:29] ENGINE Started monitor thread '
*TimeoutMonitor'.[22/Jun/2016:17:11:29] ENGINE Error in 'start' listener
>Traceback (most recent call last):File
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy.process.wspbus",
line 203, in publishFile
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy.cpserver",
line 167, in startFile
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy._cpserver",
line 158, in httpserver_from_selfFile
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy._cpwsgi_server",
line 60, in __init*
File
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy.wsgiserver.wsgiserver2",
line 2208, in get_ssl_adapter_class
ImportError: No module named ssl_builtin
[22/Jun/2016:17:11:29] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
File
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy.process.wspbus",
line 241, in start
File
"/home/run_pyinstaller/pyins/build/sss/out00-PYZ.pyz/cherrypy.process.wspbus",
line 221, in publish
ChannelFailures: ImportError('No module named ssl_builtin',)
Has anyone encountered issues with pyinstaller + cherrypy + ssl?
PS: Filed an issue on the cherrypy project
https://github.com/cherrypy/cherrypy/issues/1448
--
You received this message because you are subscribed to the Google Groups "cherrypy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cherrypy-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To post to this group, send email to cherrypy-users-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
Visit this group at https://groups.google.com/group/cherrypy-users.
For more options, visit https://groups.google.com/d/optout.