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

OSError: [Errno 92] Protocol not available #1501

Closed
pawamoy opened this Issue Apr 12, 2017 · 8 comments

Comments

6 participants
@pawamoy

pawamoy commented Apr 12, 2017

Gunicorn version: 19.7.1
Operating system: Ubuntu 14.04.5

$ /webapps/genida/virtualenv/bin/gunicorn_start
[2017-04-12-06:56:04] Starting genida as mazzucotelli
Traceback (most recent call last):
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/sock.py", line 44, in set_options
    sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
OSError: [Errno 92] Protocol not available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/webapps/genida/virtualenv/bin/gunicorn", line 11, in <module>
    sys.exit(run())
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/app/base.py", line 203, in run
    super(Application, self).run()
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/arbiter.py", line 198, in run
    self.start()
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/arbiter.py", line 157, in start
    self.LISTENERS = sock.create_sockets(self.cfg, self.log, fds)
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/sock.py", line 180, in create_sockets
    sock = sock_type(addr, conf, log)
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/sock.py", line 117, in __init__
    super(UnixSocket, self).__init__(addr, conf, log, fd=fd)
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/sock.py", line 32, in __init__
    self.sock = self.set_options(sock, bound=bound)
  File "/webapps/genida/virtualenv/lib/python3.5/site-packages/gunicorn/sock.py", line 46, in set_options
    if err[0] not in (errno.ENOPROTOOPT, errno.EINVAL):
TypeError: 'OSError' object is not subscriptable

Downgrading to 19.6.0 works fine.

Is there some library missing on my system?

@arishpyne

This comment has been minimized.

arishpyne commented Apr 20, 2017

I have the same issue!

@benoitc

This comment has been minimized.

Owner

benoitc commented Apr 21, 2017

@berkerpeksag i guess #1491 is fixing it?

@pawamoy

This comment has been minimized.

pawamoy commented Apr 21, 2017

Note that the TypeError was raised during handling of OSError here. It's like 2 issues in 1 but I was more pointing at the OSError ☺️

@berkerpeksag

This comment has been minimized.

Collaborator

berkerpeksag commented Apr 26, 2017

Yes, #1491 should fix TypeError.

@pawamoy that depends on the value of err.errno. If it's not ENOPROTOOPT or EINVAL there might be second error. Could you please try again with the current master?

@pawamoy

This comment has been minimized.

pawamoy commented Apr 26, 2017

Hi @berkerpeksag , I cloned master branch and installed it in my venv instead of 19.6.0 and it worked.

@berkerpeksag

This comment has been minimized.

Collaborator

berkerpeksag commented Apr 26, 2017

@pawamoy that's great, thanks for trying it out! Closing this as fixed.

@xrmx

This comment has been minimized.

xrmx commented Jun 20, 2017

Any plan for a release with this fix? Thanks in advance.

@tilgovi

This comment has been minimized.

Collaborator

tilgovi commented Apr 28, 2018

@xrmx 19.8.0 is released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment