GAE module: "Request attempted to contact a stopped backend." - python

I am currently experiencing an issue in my GAE app with sending requests to non-default modules. Every request throws an error in the logs saying:
Request attempted to contact a stopped backend.
When I try to access the module directly through the browser, I get:
The requested URL / was not found on this server.
I attempted to stop and start the "backend" modules a few times to no avail. I also tried changing the default version for the module to a previous working version, but the requests from my front-end are still hitting the "new", non-default version. When I try to access a previous version of the module through the browser, it does work however.
One final symptom: I am able to upload my non-default modules fine, but cannot upload my default front-end module. The process continually says "Checking if deployment succeeded...Will check again in 60 seconds.", even after rolling back the update.
I Googled the error from the logs and found almost literally nothing. Anyone have any idea what's going on here, or how to fix it?

Fixed by shutting down all instances (on all modules/versions just to be safe).

Related

500 Internal Server Error for some but not others

My site, https://hendrixia.com, gives an 500 Internal Server error for some users but not others. I have someone helping me debug, but without fruition. He is getting 500 internal server errors on his personal computer and at one of his webservers. I am able to load the site fine. We have no clue what is wrong. Obviously I'm not going to turn debugging on on a live site. But we are running out of options. Can anyone help?
Site is built with python/django. postgresql db. hosted at heroku
Things we've confirmed:
Ipv6 requests are handled correctly
https redirect and www redirect are fine
Things that may be suspect:
I recently removed django-machina from the project entirely. Along (removed) with it went haystack, ckeditor, and other required packages
Non-logged in users got the error but logged in users didn't.

How to clear all caches in Apache?

I have a django app running in a virtualenv on Windows 10 WSL1 (Ubuntu). The python version is 3.6.8.
When using the django development web server, python manage.py runserver, everything is fine. I access that with http://localhost:8000/<my app name>/
But when using apache2, version 2.4.29, months-old javascript code shows up in the browser debugger in a VMxxx file (though I haven't yet found an eval() that supposedly is the cause of the VMxxx being generated).
Also, old server-side code shows up: an old javascript error that resulted from the django python code sending the wrong content type - a bug that was fixed a couple of weeks ago.
I'm accessing apache2 with http://localhost/<my app name>/
I disabled mod_cache:
a2dismod cache
Module cache already disabled.
Also ran htcacheclean -r -l1k and manually looked at the page cache directory, which was empty.
I clear the Chrome cache on every page load, but also get the same errors when using a different browser (Firefox) that wasn't even installed when this old code that's showing up was written.
I put in a HTTP header to request no caching:
<meta http-equiv="Cache-Control" content="no-store" />
The closest thing to a cache that I have configured in Django settings is
SESSION_ENGINE = 'django.contrib.sessions.backends.cached_db',
no CACHES settings.
And, of course, I stopped and restarted Apache.
service apache2 stop
service apache2 start
All to no effect.
Where is this old code coming from?
Duh! I had copied (not moved) the entire directory tree to a different location, but didn't update the apache2 configuration, so it was still pointing to the old location.
I'm leaving this up in case someone else makes the same mistake.

Google App Engine - One module doesn't deploy

I'm deploying my Python app on GAE using the command line interface, which has always worked without problems. Since yesterday, one of the modules is getting stuck on "Scanning 500 files" and in the end throws following error:
Another transaction by user jong.vincent is already in progress for app: s~replimeapp, version: uno. That user can undo the transaction with "appcfg rollback".
However when I rollback updates for this app, the error is still thrown on the next deployment. No clue what I can do to resolve this. There is another module which refers to the same files, which has no problem deploying. No clue what I can do to get rid of this. Help please!
Changed the name of the module and then it worked. Very strange, but at least the problem is solved.

Google App Engine/Cloud SQL/Django syncdb database backend error

I've been successfully able to run syncdb's on my django project for the past weeks, but something must have happened and I'm not sure what.
I always get this error:
No module named google.appengine.ext.django.backends.rdbms.base
I'm not sure why it's just kind of started. Shortly after getting this error, I tried updating my project on app engine and was prompted to download a new app engine launcher SDK, which I have done, but this error still exists. Not sure if maybe something is wrong with my PYTHONPATH?
From your description, this sounds like it could possibly be an issue, not intended behaviour. It sounds crazy, but perhaps something changed with the default Django installation. I suggest you attach a basic reproducing app to a new issue thread in the Public Issue Tracker
You may need to authorize your IP address. If that doesn't work, try using the standard MySQL driver instead of the Google App Engine one as described in our docs.

Can't run coursebuilder in google app engine

It is really weird that after clicking run button, it does nothing and also no log and show a clock sign on the first column.
It works normally before. However, after I messed up my python environment, the google coursebuilder can't run web application. That's my guessing. When I run which python.it only shows:
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
These let me feel like I have no way to solve it!Are there anyone who came across this problem before? Any ideas or suggestions?
Updated: I follow suggestions to use command line to run web application on GAE. It reminds me here:
Update: The error message shows that GAE can't get the allocated port and domain. The reason why it happens is that when I use command line to run the web application, I also open GAE GUI to run a web app with the same port number.
So the way to solve it is to close the GAE GUI and free the port. Or we also could designate another kind of port number with command line.(--port=XXXX and --admin_port=YYYY). Or take a look at the doc:
Again thanks for the help of Mihail R!
The OP had multiple issues with GAE setup which were resolved by simply reinstalling the GAE Launcher and making sure the app was first copied into Applications from the .dmg file, then ran from the Applications instead of from inside the .dmg file, and appropriate permissions were suppose to be given so that GAE Launcher created the symlinks it needed to work properly.
More instructions on proper GAE SDK installation can be found here: https://cloud.google.com/appengine/downloads after clicking on the needed SDK and then the OS the SDK will be installed on.

Categories