oncall icon indicating copy to clipboard operation
oncall copied to clipboard

TypeError: get_wsgi_app() takes no arguments (2 given)

Open osalmasan opened this issue 6 years ago • 3 comments

Tried running gunicorn command gunicorn -b 0.0.0.0:8080 app:get_wsgi_app Got this error. noc@linux-test:/opt/oncall/build/lib.linux-x86_64-2.7/oncall$ gunicorn -b 0.0.0.0:8080 app:get_wsgi_app [2018-08-29 21:52:30 +0000] [2064] [INFO] Starting gunicorn 19.7.1 [2018-08-29 21:52:30 +0000] [2064] [INFO] Listening at: http://0.0.0.0:8080 (2064) [2018-08-29 21:52:30 +0000] [2064] [INFO] Using worker: sync [2018-08-29 21:52:30 +0000] [2068] [INFO] Booting worker with pid: 2068 [2018-08-29 21:52:54 +0000] [2068] [ERROR] Error handling request / Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python2.7/dist-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/sync.py", line 176, in handle_request respiter = self.wsgi(environ, resp.start_response) TypeError: get_wsgi_app() takes no arguments (2 given) [2018-08-29 21:52:54 +0000] [2068] [ERROR] Error handling request /favicon.ico Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/sync.py", line 135, in handle self.handle_request(listener, req, client, addr) File "/usr/local/lib/python2.7/dist-packages/gunicorn-19.7.1-py2.7.egg/gunicorn/workers/sync.py", line 176, in handle_request respiter = self.wsgi(environ, resp.start_response) Is there any documentation on how to roll out this tool in production environment?

osalmasan avatar Aug 29 '18 13:08 osalmasan

We're running this with uwsgi/nginx in production, so I don't have too much to offer on the gunicorn front. I'm not able to run that command, only gunicorn -b 0.0.0.0:8080 oncall.app:get_wsgi_app, which works for me. For now, we only have the docker images as a reference for getting things set up in a prod-like environment. See https://github.com/linkedin/oncall/blob/master/ops/packer/oncall.yaml and other files in the ops directory.

dwang159 avatar Sep 05 '18 18:09 dwang159

@dwang159 I see. Will look into that stuff. Thanks

osalmasan avatar Sep 06 '18 08:09 osalmasan

Hi @dwang159 , Tried gunicorn -b 0.0.0.0:8080 oncall.app:get_wsgi_app. It works successfully until you have to visit the site itself. It throws an Internal Server Error right after hitting the homepage of the site. image

osalmasan avatar Sep 20 '18 06:09 osalmasan