在本地运行开发服务器时,我在 Google 应用引擎上不断收到连接代理错误 502(连接被拒绝)。代理被传递给本地服务器,但它仍然拒绝连接。
这是我得到的:
HTTPError()
HTTPError()
Traceback (most recent call last):
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 250, in __call__
return app(environ, start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 89, in __call__
self._flush_logs(response.get('logs', []))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 225, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 502: Proxy Error ( Connection refused )
Traceback (most recent call last):
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 250, in __call__
return app(environ, start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 89, in __call__
self._flush_logs(response.get('logs', []))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 225, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 502: Proxy Error ( Connection refused )
INFO 2013-07-17 20:55:24,534 module.py:595] default: "GET /favicon.ico HTTP/1.1" 500 -
我在 MS windows 中遇到了同样的错误,所以切换到 Ubuntu,但我仍然得到这个。在我将 Google 应用引擎 SDK 更新到 1.8.2 后出现此错误,以前的版本工作正常。
任何猜测为什么会这样?
提前致谢。