Skip to content
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

Gunicorn error : AttributeError: 'socket' object has no attribute 'cfg_addr' #93

Closed
johaven opened this issue Feb 4, 2015 · 5 comments

Comments

@johaven
Copy link

johaven commented Feb 4, 2015

Configuration:
Flask==0.10.1
Flask-HTTPAuth==2.3.0
Flask-Login==0.2.11
Flask-SocketIO==0.5.0
Flask-SQLAlchemy==2.0
Flask-Triangle==0.5.4
Flask-WTF==0.11
gevent==1.0.1
gevent-socketio==0.3.6
gevent-websocket==0.9.3
greenlet==0.4.5
gunicorn==19.2.1
itsdangerous==0.24
Werkzeug==0.10.1

run.py:
from webapp import app, socketio
if main == 'name':
socketio.run(app)

Command:gunicorn --worker-class socketio.sgunicorn.GeventSocketIOWorker run:app

TraceBack:
[2015-02-04 20:16:03 +0000] [1425] [INFO] Starting gunicorn 19.2.1
[2015-02-04 20:16:03 +0000] [1425] [INFO] Listening at: http://127.0.0.1:8000 (1425)
[2015-02-04 20:16:03 +0000] [1425] [INFO] Using worker: socketio.sgunicorn.GeventSocketIOWorker
[2015-02-04 20:16:03 +0000] [1430] [INFO] Booting worker with pid: 1430
[2015-02-04 20:16:03 +0000] [1430] [ERROR] Exception in worker process:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
worker.init_process()
File "/usr/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 192, in init_process
super(GeventWorker, self).init_process()
File "/usr/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
self.run()
File "/usr/lib/python2.7/site-packages/socketio/sgunicorn.py", line 80, in run
*_ssl_args
File "/usr/lib/python2.7/site-packages/socketio/server.py", line 72, in init
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/gunicorn/arbiter.py", line 503, in spawn_worker
worker.init_process()
File "/usr/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 192, in init_process
super(GeventWorker, self).init_process()
File "/usr/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
self.run()
File "/usr/lib/python2.7/site-packages/socketio/sgunicorn.py", line 80, in run
*_ssl_args
File "/usr/lib/python2.7/site-packages/socketio/server.py", line 72, in init
address = args[0].cfg_addr[0]
AttributeError: 'socket' object has no attribute 'cfg_addr'

@johaven
Copy link
Author

johaven commented Feb 4, 2015

Downgrade to gunicorn==0.16.1 resolves that issue but it would be interesting to specify compatible version

@miguelgrinberg
Copy link
Owner

Did you test any releases between 19.x and 16.1? I'm pretty sure I used v18 at some point and had no problems with it. Release 19.2.1 has been released today, and 19.2.0 was released just a few days ago. I guess there is a chance they introduced a regression.

@johaven
Copy link
Author

johaven commented Feb 5, 2015

16, 17, 18 are ok
Since 19 it no longer works

@jaredmcqueen
Copy link

@Yoyoprs that worked great.

pip uninstall gunicorn
pip install gunicorn==18.0

nijotz added a commit to nijotz/shitstream.tv that referenced this issue Jun 3, 2015
@miguelgrinberg
Copy link
Owner

Closing this as it is outdated with the 1.0 release. I have tested gunicorn 19 and it seems to work fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants