HTTP错误503:在appengine python“留言簿”应用

时间:2015-11-17 08:53:33

标签: python-2.7 google-app-engine webapp2

我正在Google AppEngine Python SDK上运行演示python留言簿应用程序,但它在浏览器上给出了这样的错误。我没有更改脚本文件中的任何一行代码。

我使用的是Python 2.7.10版 Google Python SDK版“GoogleAppEngine-1.9.28.exe” 和Webapp2框架。

错误:

the runtime process gave a bad HTTP response: ''

WARNING  2015-11-17 08:29:59,892 tasklets.py:410] suspended generator run_to_queue(query.py:938) raised HTTPError(HTTP Error 503: Service Unavailable)
WARNING  2015-11-17 08:29:59,894 tasklets.py:410] suspended generator helper(context.py:876) raised HTTPError(HTTP Error 503: Service Unavailable)
ERROR    2015-11-17 08:29:59,894 webapp2.py:1552] HTTP Error 503: Service Unavailable
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1535, in __call__
    rv = self.handle_exception(request, response, e)
  File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1529, in __call__
    rv = self.router.dispatch(request, response)
  File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1278, in default_dispatcher
    return route.handler_adapter(request, response)
  File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 1102, in __call__
    return handler.dispatch()
  File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 572, in dispatch
    return self.handle_exception(e, self.app.debug)
  File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2-2.5.2\webapp2.py", line 570, in dispatch
    return method(*args, **kwargs)
  File "C:\Users\abhilash singh\Documents\guestbook\guestbook.py", line 42, in get
    for greeting in greetings:
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\query.py", line 1774, in next
    self._more_results) = self._fut.get_result()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 326, in get_result
    self.check_success()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\context.py", line 876, in helper
    batch, i, ent = yield inq.getq()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\query.py", line 938, in run_to_queue
    batch = yield rpc
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 455, in _on_rpc_completion
    result = rpc.get_result()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 613, in get_result
    return self.__get_result_hook(self)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_query.py", line 2907, in __query_result_hook
    self._batch_shared.conn.check_rpc_success(rpc)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\datastore\datastore_rpc.py", line 1371, in check_rpc_success
    rpc.check_success()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_stub_map.py", line 579, in check_success
    self.__rpc.CheckSuccess()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\apiproxy_rpc.py", line 157, in _WaitImpl
    self.request, self.response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remote_api\remote_api_stub.py", line 201, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\remote_api\remote_api_stub.py", line 227, in _MakeRealSyncCall
    encoded_response = self._server.Send(self._path, encoded_request)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 393, in Send
    f = self.opener.open(req)
  File "C:\Python27\lib\urllib2.py", line 437, in open
    response = meth(req, response)
  File "C:\Python27\lib\urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:\Python27\lib\urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "C:\Python27\lib\urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "C:\Python27\lib\urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable

有什么建议吗?

1 个答案:

答案 0 :(得分:0)

你正在运行什么命令失败?根据您提供的堆栈跟踪,您似乎正在使用Remote API连接到已部署的应用程序并通过数据存储区实体进行查询。如果您尚未将应用程序部署到App Engine的服务器,则此命令将不会成功,并且很可能导致您共享的503错误。