2009年9月16日 星期三

How to solve no proxy in appcfg.py

The problem is very Strange.But I google the question and find the solution. Look at the page:http://code.google.com/p/googleappengine/issues/detail?id=126
I follow sachingm's comment and success.
The content post blew:
Hi

Finally got my app to upload to the server. :)

My machine is Win XP with Python 2.6 and my proxy requires user/password authentication.

I had to apply the Python patch AND use ntlmaps proxy (doing only 1 of either gets
you misleading errors. Btw alexander.trakhimenok, I too got those infinite dots on
the NTLSMaps console but this was resolved when I did the patch).
I tried arthurfreeman's appcfg.py (and added yaml) but it did NOT help - so I
reverted to the original appcfg.py.

Final Steps:
1) Install the Python patch from http://bugs.python.org/issue1424152.
Its not just urllib2.py that needs to be patched but httplib.py as well. I've
attached both these PATCHED files for Python 2.6. Just replace your corresponding
files with these.

2) Download the latest ntlmaps proxy (v0.9.9?) from http://ntlmaps.sourceforge.net/
(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:
appcfg.py update xyz/
Hopefully you should get something like this:
...\appcfg.py:40: DeprecationWarning: the sha
module is deprecated; use the hashlib module instead
DIR_PATH,
Scanning files on local disk.
Initiating update.
Email: xyz@gmail.com
Password for xyz@gmail.com:
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.

Thanks A ZILLION to all the above posters...
urllib2.py
48.7 KB Download
httplib.py
44.7 KB Download

But I test if I do not run ntlmaps, it seems to be ok. I need to retest.

沒有留言:

張貼留言