Cannot enable SSL for oslo_service wsgi server

Bug #1819085 reported by Matt Parkinson
6
This bug affects 1 person
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/tls/certs/vendordata.crt
key_file = /etc/pki/tls/private/vendordata.key

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/python2.7/site-packages/eventlet/hubs/poll.py", line 115, in wait
    listener.cb(fileno)
  File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/eventlet/wsgi.py", line 880, in server
    client_socket = sock.accept()
  File "/usr/lib64/python2.7/ssl.py", line 884, in accept
    server_side=True)
  File "/usr/lib64/python2.7/ssl.py", line 348, in wrap_socket
    _context=self)
  File "/usr/lib64/python2.7/ssl.py", line 603, in __init__
    server_hostname, ssl_sock=self)
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

Revision history for this message
Matt Parkinson (mattparko) wrote :

This is not a bug. I was able to fix my issue using eventlet.monkey_patch() before initialising the oslo wsgi server

Changed in oslo.service:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.