Thursday, February 26, 2009

Uploading apps onto GoogleAppEngine behind a proxy

Was stuck for a while trying to upload my google app from the latest Google App Engine 1.1.9 - what should have been an instant upload turned out to be an all-day adventure because of the complication of behind a proxy that required user/password authentication...

But finally got it to work with the following steps (from a Win XP machine using Python v2.6.1)!

1) Install the Python patch 1424152 from They only have diff files there - so for those who don't know how to apply diff patches, I have attached the 2 PATCHED files ( & for Python 2.6.1. Just replace your corresponding files in your Python26\Lib folder with these (WARNING - these files were patched specifically for Python 2.6.1. For any other Python version, you have to patch your appropriate file from the patch link above).

2) Download the latest ntlmaps proxy (v0.9.9?) from
(its only 71kb!).
Change the following attributes in server.cfg: PARENT_PROXY, NT_DOMAIN, USER, PASSWORD.
You can leave the password empty and it will prompt you when you start ntlmaps.

3) Set the following environment values:
set HTTP_PROXY=localhost:5865
set HTTPS_PROXY=localhost:5865
(5685 is the default port used by ntlsmaps which can be changed in server.cfg)

4) Start up the ntlsmaps proxy by running runserver.bat (you might have to edit the
bat file to point to your actual python executable).

5) Test whether ntlsmaps is working by changing your browser proxy to point to
localhost:5865, and try to access some sites. If this fails, your proxy is probably
not understood by ntlsmaps or vice versa - try to finetune ntlsmaps some more.

6) Finally run your upload command: update xyz/
Hopefully you should get something like this:
...\ DeprecationWarning: the sha
module is deprecated; use the hashlib module instead
Scanning files on local disk.
Initiating update.
Password for
Cloning 2 static files.
Cloning 5 application files.
Deploying new version.
Checking if new version is ready to serve.
Will check again in 1 seconds.
Checking if new version is ready to serve.
Closing update: new version is ready to start serving.
Uploading index definitions.

No comments:

Post a Comment

Superblog Directory