(2016-01-13, 01:20)m0ngr31 Wrote: Just figured this out with MANswers. Turns out there is something wrong with OpenShift causing this. Had him switch to Heroku and it worked great.
Process is pretty similar, you'll just need to update a few things in the files:
1. Add a new line in the requirements.txt that just has the word gunicorn on it
2. Create a new file called Procfile (no extension or anything) that has this as text:
Code:
web: gunicorn wsgi:application
3. Remove lines 4-9 of wsgi.py since they are specific to openshift.
Hi, I tried using Heroku in place of OpenShift, but I'm having no luck. My logs go as follows:
Erics-Mac:kodicommander aonelova$ heroku logs
2016-01-18T22:13:20.516508+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-01-18T22:13:20.516514+00:00 app[web.1]: application}
2016-01-18T22:13:20.516520+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-01-18T22:13:20.512232+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
2016-01-18T22:13:20.516509+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
2016-01-18T22:13:20.516515+00:00 app[web.1]: ^
2016-01-18T22:13:20.516521+00:00 app[web.1]: self.callable = self.load()
2016-01-18T22:13:20.512380+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [10] [INFO] Worker exiting (pid: 10)
2016-01-18T22:13:20.516509+00:00 app[web.1]: self.callable = self.load()
2016-01-18T22:13:20.516515+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
2016-01-18T22:13:20.516521+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-01-18T22:13:20.516504+00:00 app[web.1]: Traceback (most recent call last):
2016-01-18T22:13:20.516510+00:00 app[web.1]: return self.load_wsgiapp()
2016-01-18T22:13:20.516516+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
2016-01-18T22:13:20.516522+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-01-18T22:13:20.516505+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/arbiter.py", line 515, in spawn_worker
2016-01-18T22:13:20.516511+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
2016-01-18T22:13:20.516517+00:00 app[web.1]: worker.init_process()
2016-01-18T22:13:20.516506+00:00 app[web.1]: worker.init_process()
2016-01-18T22:13:20.516512+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-01-18T22:13:20.516518+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-01-18T22:13:20.516524+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 368, in import_app
2016-01-18T22:13:20.516506+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 122, in init_process
2016-01-18T22:13:20.516512+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/util.py", line 368, in import_app
2016-01-18T22:13:20.516518+00:00 app[web.1]: self.load_wsgi()
2016-01-18T22:13:20.516524+00:00 app[web.1]: app = eval(obj, mod.__dict__)
2016-01-18T22:13:20.516507+00:00 app[web.1]: self.load_wsgi()
2016-01-18T22:13:20.516513+00:00 app[web.1]: app = eval(obj, mod.__dict__)
2016-01-18T22:13:20.516519+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
2016-01-18T22:13:20.516525+00:00 app[web.1]: File "<string>", line 1
2016-01-18T22:13:20.516507+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/workers/base.py", line 130, in load_wsgi
2016-01-18T22:13:20.516513+00:00 app[web.1]: File "<string>", line 1
2016-01-18T22:13:20.516519+00:00 app[web.1]: self.wsgi = self.app.wsgi()
2016-01-18T22:13:20.516525+00:00 app[web.1]: application}
2016-01-18T22:13:20.516510+00:00 app[web.1]: File "/app/.heroku/python/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
2016-01-18T22:13:20.516516+00:00 app[web.1]: Traceback (most recent call last):
2016-01-18T22:13:20.516522+00:00 app[web.1]: return self.load_wsgiapp()
2016-01-18T22:13:20.541380+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [3] [INFO] Shutting down: Master
2016-01-18T22:13:20.516526+00:00 app[web.1]: ^
2016-01-18T22:13:20.516527+00:00 app[web.1]: SyntaxError: unexpected EOF while parsing
2016-01-18T22:13:20.516705+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [9] [INFO] Worker exiting (pid: 9)
2016-01-18T22:13:20.541629+00:00 app[web.1]: [2016-01-18 22:13:20 +0000] [3] [INFO] Reason: Worker failed to boot.
2016-01-18T22:13:20.516523+00:00 app[web.1]: return util.import_app(self.app_uri)
2016-01-18T22:13:21.529524+00:00 heroku[web.1]: State changed from starting to crashed
2016-01-18T22:13:21.514637+00:00 heroku[web.1]: Process exited with status 3
2016-01-18T22:51:41.068215+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=POST path="/" host=kodicommander.herokuapp.com request_id=2082e2ab-feda-4f5f-9c09-63b254d62c03 fwd="72.21.217.180" dyno= connect= service= status=503 bytes=
2016-01-18T22:57:43.932952+00:00 heroku[api]: Deploy 4f51d44 by
[email protected]
2016-01-18T22:57:43.932952+00:00 heroku[api]: Release v5 created by
[email protected]
2016-01-18T22:57:44.045152+00:00 heroku[slug-compiler]: Slug compilation started
2016-01-18T22:57:44.045161+00:00 heroku[slug-compiler]: Slug compilation finished
2016-01-18T22:57:44.818829+00:00 heroku[web.1]: State changed from crashed to starting
2016-01-18T22:57:47.039059+00:00 heroku[web.1]: Starting process with command `gunicorn wsgi:application\`
2016-01-18T22:59:47.471768+00:00 heroku[web.1]: State changed from starting to down
2016-01-18T23:08:56.927229+00:00 heroku[api]: Scale to web=1, worker=1 by
[email protected]
2016-01-18T23:08:59.626024+00:00 heroku[worker.1]: Starting process with command `python worker.py}`
2016-01-18T23:09:00.353824+00:00 heroku[worker.1]: State changed from starting to up
2016-01-18T23:09:01.713706+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory
2016-01-18T23:09:02.414223+00:00 heroku[worker.1]: State changed from up to crashed
2016-01-18T23:09:02.415490+00:00 heroku[worker.1]: State changed from crashed to starting
2016-01-18T23:09:02.415877+00:00 heroku[worker.1]: Process exited with status 2
2016-01-18T23:09:04.152583+00:00 heroku[worker.1]: Starting process with command `python worker.py}`
2016-01-18T23:09:04.836246+00:00 heroku[worker.1]: State changed from starting to up
2016-01-18T23:09:05.330375+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory
2016-01-18T23:09:05.956213+00:00 heroku[worker.1]: State changed from up to crashed
2016-01-18T23:09:05.889941+00:00 heroku[worker.1]: Process exited with status 2
2016-01-18T23:11:40.275415+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=kodicommander.herokuapp.com request_id=2f260db3-1abf-4ca5-9096-8da2f115f04d fwd="96.253.113.115" dyno= connect= service= status=503 bytes=
2016-01-18T23:19:16.244361+00:00 heroku[api]: Set maintenance mode on by
[email protected]
2016-01-18T23:19:25.042870+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=e070554a-fee4-4271-9667-2ae565835b98 fwd="96.253.113.115" dyno= connect= service= status=503 bytes=
2016-01-18T23:20:09.078020+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=POST path="/" host=kodicommander.herokuapp.com request_id=3bcffa91-b70e-413c-b3de-b6ff0bdded33 fwd="72.21.217.83" dyno= connect= service= status=503 bytes=
2016-01-18T23:20:14.371511+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=POST path="/" host=kodicommander.herokuapp.com request_id=6d2b7a5c-8660-4057-a48c-ea16b9dac2e8 fwd="72.21.217.79" dyno= connect= service= status=503 bytes=
2016-01-18T23:22:40.424921+00:00 heroku[worker.1]: State changed from crashed to starting
2016-01-18T23:22:42.852132+00:00 heroku[worker.1]: Starting process with command `python worker.py}`
2016-01-18T23:22:43.398201+00:00 heroku[worker.1]: State changed from starting to up
2016-01-18T23:22:44.642421+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory
2016-01-18T23:22:45.232585+00:00 heroku[worker.1]: Process exited with status 2
2016-01-18T23:22:45.255101+00:00 heroku[worker.1]: State changed from up to crashed
2016-01-18T23:35:49.525122+00:00 heroku[worker.1]: State changed from crashed to starting
2016-01-18T23:35:51.378762+00:00 heroku[worker.1]: Starting process with command `python worker.py}`
2016-01-18T23:35:51.913544+00:00 heroku[worker.1]: State changed from starting to up
2016-01-18T23:35:53.270098+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory
2016-01-18T23:35:53.874345+00:00 heroku[worker.1]: State changed from up to crashed
2016-01-18T23:35:53.874897+00:00 heroku[worker.1]: Process exited with status 2
2016-01-18T23:37:37.752768+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=382c37e3-5459-4ac7-bbe6-d3996b63c358 fwd="96.253.113.115" dyno= connect= service= status=503 bytes=
2016-01-18T23:45:51.248130+00:00 heroku[web.1]: State changed from down to starting
2016-01-18T23:45:51.280736+00:00 heroku[worker.1]: State changed from crashed to starting
2016-01-18T23:45:53.187852+00:00 heroku[worker.1]: Starting process with command `python worker.py}`
2016-01-18T23:45:53.855208+00:00 heroku[worker.1]: State changed from starting to up
2016-01-18T23:45:53.904399+00:00 heroku[web.1]: Starting process with command `gunicorn wsgi:application\`
2016-01-18T23:45:54.798985+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory
2016-01-18T23:45:55.355757+00:00 heroku[worker.1]: State changed from up to crashed
2016-01-18T23:45:55.345924+00:00 heroku[worker.1]: Process exited with status 2
2016-01-18T23:46:36.743756+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=f589b80d-0914-40d3-a8a3-71f874f3cfcb fwd="96.253.113.115" dyno= connect= service= status=503 bytes=
2016-01-18T23:47:43.602698+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=POST path="/" host=kodicommander.herokuapp.com request_id=de6fa747-e771-4ccd-bf49-de189bcbcaf3 fwd="72.21.217.175" dyno= connect= service= status=503 bytes=
2016-01-18T23:48:00.085208+00:00 heroku[web.1]: State changed from starting to down
2016-01-18T23:48:11.541303+00:00 heroku[router]: at=info code=H80 desc="Maintenance mode" method=GET path="/" host=kodicommander.herokuapp.com request_id=d7c734b7-a2b2-4a4a-ba70-9ce815a82b14 fwd="96.253.113.115" dyno= connect= service= status=503 bytes=
2016-01-18T23:48:43.853239+00:00 heroku[worker.1]: State changed from crashed to starting
2016-01-18T23:48:46.130176+00:00 heroku[worker.1]: Starting process with command `python worker.py}`
2016-01-18T23:48:46.776237+00:00 heroku[worker.1]: State changed from starting to up
2016-01-18T23:48:48.116608+00:00 app[worker.1]: python: can't open file 'worker.py}': [Errno 2] No such file or directory
2016-01-18T23:48:48.904906+00:00 heroku[worker.1]: State changed from up to crashed
2016-01-18T23:48:48.888956+00:00 heroku[worker.1]: Process exited with status 2