简体   繁体   中英

Openshift: OSError Errno 98 can't update server

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 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.

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 because httpd service was added automatically. That's why we were having OSError: [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* find . -name *.log* in my cartridge and read all logs.

Now my app is working. Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM