Cannot enable SSL for oslo_service wsgi server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.service |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I am trying to enable SSL for an oslo WSGI service. The service is heavily based on the novajoin project.
To enable SSL, I have added the "use_ssl" flag when initialising the oslo WSGI service:
self.server = wsgi.Server(CONF, name, self.app, host=self.host, port=self.port, use_ssl=True)
The following was added to the configuration file:
[ssl]
cert_file = /etc/pki/
key_file = /etc/pki/
The service starts and begins listening on the port, however any attempt by a client to connect hangs, and results in the following errors:
Traceback (most recent call last):
File "/usr/lib/
listener.
File "/usr/lib/
result = function(*args, **kwargs)
File "/usr/lib/
client_socket = sock.accept()
File "/usr/lib64/
server_
File "/usr/lib64/
_context=self)
File "/usr/lib64/
server_
TypeError: _wrap_socket() argument 1 must be _socket.socket, not GreenSocket
Removing descriptor: 7
I have seen a couple of hits for this error related to the eventlet version, but it looks like I should have working versions.
Python version: 2.7.5
eventlet version: 0.20.1
oslo_service version: 1.29.0
I'm not convinced yet this is an oslo_service bug, but I am running out of ideas.
Thanks
This is not a bug. I was able to fix my issue using eventlet. monkey_ patch() before initialising the oslo wsgi server