I'm using Openshift with Django/Python 3. As of yesterday, I've been unable to update my server. When I push a change, the push is successful. Using SCP to view the files on the server, the updated files are present. Using rhc git-pull downloads the correct files as well. However, the templates are the only thing that actually get changed on the app by the push. No changes to python files cause an effect on the app.
When I try to use 'rhc tail', I get the following error:
OSError: [Errno 98] Address already in use
Searching this error leads me to believe there are multiple server processes running for my app. I'm not sure how to run suggested diagnostics, as I don't control the server. Any ideas? Restarting the app does not fix it. Running rhc stop appears to successfully stop the app, yet my website works unhindered. (I've never tried stopping before, but assume it's supposed to kill the website.)
I think I solved the problem.
I was using an old django repository, based on https://github.com/openshift/openshift-community-cartridge-python-3.3/blob/master/template/app.py (the link is dead, I mentioned here just for information).
In these old community cartridges, there was a
app.py
file that started CherryPy or httpd, but now the official django repository doesn't have app.py anymore. (check https://github.com/openshift/django-example)The
app.py
doesn't exist anymore becausehttpd
service was added automatically. That's why we were havingOSError: [Errno 98] Address already in use
.Removing the
app.py
from my repository solved the problem.I was receiving error 500 because my Django application was having errors, not my Python cartridge. That's why I wasn't understanding what was happening. I did a
find . -name *.log*
in my cartridge and read all logs.Now my app is working. Good luck!
I found this post this afternoon by somebody having the same problem. It looks like Openshift changed some things on us. I didn't get the memo :(.
Read here: Openshift March Blog post
@MSDOS, it is similar to your answer but I wanted to post the generic answer that is probably affecting most people.
For me, I just had to rename app.py (my old wsgi entry point) to wsgi.py and everything worked as it should. :) Now I have to figure what they changed to the cron jobs :(
Solved by executing 'rhc app force-stop', then 'rhc app start'. I don't know what caused the problem, but force-stopping it killed the website, and it worked with the new code after starting it again.