Reputation: 336
I just upgraded my GAE SDK to 1.7.6 (Linux, Python). Now, using dev_appserver.py, my apps are loaded just fine, but as soon as I go to localhost:8080 in the browser, there is an uncaught HTTP 504 Gateway Timeout Exception. I've reproduced it with the helloworld sample code. Everything works like before using old_dev_appserver.py.
Is this a bug or am I doing something wrong? Or is it my Python distribution?
File "/usr/lib64/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib64/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib64/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib64/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 504: Gateway Time-out
Upvotes: 2
Views: 1149
Reputation: 33
In my case it was proxy. I had:
export http_proxy=http://IP.IP.IP.IP:3128/
In my .bashrc file. I thought that I was not using proxy in python and mechanize. But opposite was the reason. I canceled exported proxy and went without it, which solved this error:
mechanize._response.httperror_seek_wrapper: HTTP Error 504: Gateway Time-out
Now connection with authentication using python and mechanize works ok.
P.S.: I was able to connect to the site and get login screen (with proxy enabled). But when I submited login entries, Error 504 occured.
Upvotes: 0
Reputation: 2725
Might be too late, but I hope this helps anyone who might have the same problem.
Same thing happened to me, and the problem for me was that my system was set on using proxy. So, GAE dev_appserver was not able to connect to itself (it uses ip and port combination to connect to itself and manage some API stuffs), so it would threw HTTP 504 Gateway Timeout error. So, I removed proxy settings, and worked as usual.
Upvotes: 3