GeventSocketIOWorker does not have the 'socket' attribute

I need to run a Django application using gunicorn. I read the documentation and I think that I set everything up as it should, but when I run

gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker app.wsgi:application 

I get the following error message

 2013-02-01 18:25:17 [25394] [INFO] Booting worker with pid: 25394 2013-02-01 18:25:18 [25394] [ERROR] Exception in worker process: Traceback (most recent call last): File ".../app-root/data/lib/python2.7/site-packages/gunicorn/arbiter.py", line 485, in spawn_worker worker.init_process() File ".../app-root/data/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 131, in init_process super(GeventWorker, self).init_process() File ".../app-root/data/lib/python2.7/site-packages/gunicorn/workers/base.py", line 104, in init_process self.run() File ".../app-root/data/lib/python2.7/site-packages/socketio/sgunicorn.py", line 14, in run self.socket.setblocking(1) AttributeError: 'GeventSocketIOWorker' object has no attribute 'socket' Traceback (most recent call last): File ".../app-root/data/lib/python2.7/site-packages/gunicorn/arbiter.py", line 485, in spawn_worker worker.init_process() File ".../data/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 131, in init_process super(GeventWorker, self).init_process() File ".../app-root/data/lib/python2.7/site-packages/gunicorn/workers/base.py", line 104, in init_process self.run() File ".../app-root/data/lib/python2.7/site-packages/socketio/sgunicorn.py", line 14, in run self.socket.setblocking(1) AttributeError: 'GeventSocketIOWorker' object has no attribute 'socket' 2013-02-01 18:25:18 [25394] [INFO] Worker exiting (pid: 25394) 

If I run it using django_socketio, everything will be fine, I have to miss something really important.

thanks for the help

+4
source share
3 answers

The problem with lethal weapons seems to be> 0.17, see issue # 122 . For me, this works with version 0.16.1 of the gun.

 pip install gunicorn==0.16.1 
+9
source

It is possible that installing gevent-socketio 0.3.6 might fix this without requiring re-guns in some cases. I had 0.3.5-rc2 and the update fixed this problem for me (NOTE: this was not in django, but it worked.)

pip install gevent-socketio==0.3.6

0
source

Caused by this change in shooting. https://github.com/benoitc/gunicorn/commit/9a83d719b23fe28667a9c76bac25ba66651f8ccf

The sockets used for the gevent worker used to come from the gunicorn socket, now they complete the gevent sockets. So reverting to an older version of the gun is not a good idea. The Flash Policy Server may be disabled, which will disable this check.

0
source

All Articles