Google AppEngine端点错误:提取服务配置失败(状态码404) [英] Google AppEngine Endpoints Error: Fetching service config failed (status code 404)
问题描述
我正在执行快速入门。
我注意到另一个问题在这个。
我在app.yaml中检查了 env_variables
部分的 ENDPOINTS_SERVICE_NAME
和 ENDPOINTS_SERVICE_VERSION
。
../_ ah / api / explorer不显示'服务'下的任何终端。
这是什么错误以及如何修复它?
错误日志显示:
(/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback(最近一次调用最后):
文件/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py,第240行,处理
处理程序= _config_handle.add_wsgi_middleware(self._LoadHandler())
文件_base_data / home / run /
handler,path,err = LoadObject(self._handler)
文件/ base / data / home / runtimes / python27_experime nt / python27_lib / versions / 1 / google / appengine / runtime / wsgi.py,第85行,在LoadObject
obj = __import __(path [0])
文件/ base / data / home / apps / s〜test-app-129421 / 20170217t185546.399267289806711006 / main.py,第103行,在< module>
api = endpoints.api_server([EchoApi])
文件/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/endpoints/apiserving.py,第520行,在api_server
控制器中)
文件/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/wsgi.py ,第121行,在add_all
a_service = loader.load()
文件/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/控制/ service.py,第110行,在加载
返回self._load_func(** kw)
文件/ base / data / home / apps / s〜test-app-129421 / 20170217t185546。 399267289806711006 / lib / google / api / config / service_config.py,第78行,在fetch_service_config
_log_and_raise(Exception,message_template.format(status_code))
文件/ base / data / home / apps / s〜test-app-129421 / 20170217t185546.399267289806711006 / lib / google / api / config / service_config.py,第126行,在_log_and_raise中
raise exception_class(message)
例外:获取服务配置失败(状态码404)
我有同样的异常追踪,除了我的是一个403.希望对我有同样挫折的人有帮助。
配置失败(状态码403)我终于在我的app.yaml中发现了它来自GIT克隆
ENDPOINTS_SERVICE_NAME:echo-api.endpoints。[YOUR-PROJECT-ID] .cloud.goog
快速入门指导我取代YOUR-PROJECT-ID。
我还必须使用.appspot.com取代.cloud.goog
I am implementing the steps in the Quickstart.
I did notice another question on this.
I double checked that env_variables
section in app.yaml has the right values for ENDPOINTS_SERVICE_NAME
and ENDPOINTS_SERVICE_VERSION
.
../_ah/api/explorer doesn't show any endpoint under 'Services'.
What is this error and how to fix it?
Error log shows:
(/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py:263)
Traceback (most recent call last):
File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/base/data/home/runtimes/python27_experiment/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/main.py", line 103, in <module>
api = endpoints.api_server([EchoApi])
File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/endpoints/apiserving.py", line 520, in api_server
controller)
File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/wsgi.py", line 121, in add_all
a_service = loader.load()
File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/control/service.py", line 110, in load
return self._load_func(**kw)
File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/config/service_config.py", line 78, in fetch_service_config
_log_and_raise(Exception, message_template.format(status_code))
File "/base/data/home/apps/s~test-app-129421/20170217t185546.399267289806711006/lib/google/api/config/service_config.py", line 126, in _log_and_raise
raise exception_class(message)
Exception: Fetching service config failed (status code 404)
I had the same Exception trace, except mine was a 403. Hope is helpful to others having the same frustration I had.
Exception: Fetching service config failed (status code 403)
I finally found that in my app.yaml it had this from the GIT clone
ENDPOINTS_SERVICE_NAME: echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog
And the Quickstart only directed me to replace YOUR-PROJECT-ID.
I had to also replace .cloud.goog with .appspot.com
这篇关于Google AppEngine端点错误:提取服务配置失败(状态码404)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!