我正在实现Quickstart中的步骤。
我在这上面确实注意到了another question。我仔细检查了app.yaml中的env_variables部分是否具有正确的ENDPOINTS_SERVICE_NAME和ENDPOINTS_SERVICE_VERSION值。
../_ah/api/explorer不显示'Services‘下的任何端点。
这个错误是什么?如何修复它?
错误日志显示:
(/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)发布于 2017-02-26 03:55:38
我有相同的异常跟踪,除了我的是403。希望对那些和我有同样挫折的人是有帮助的。
Exception: Fetching service config failed (status code 403)
我终于发现在我的app.yaml里有这个来自GIT克隆的
ENDPOINTS_SERVICE_NAME: echo-api.endpoints.[YOUR-PROJECT-ID].cloud.goog
快速入门只指示我替换您的-PROJECT-ID。
我还不得不用.appspot.com替换.cloud.goog
发布于 2017-06-29 15:56:58
我有一个叫myapp的应用
First show services:
D:\projects\barcode\ebk>gcloud service-management configs list --service=myapp.appspot.com
CONFIG_ID SERVICE_NAME
2017-06-29r3 myapp.appspot.com
2017-06-29r2 myapp.appspot.com
2017-06-29r1 myapp.appspot.com
2017-06-29r0 myapp.appspot.com您可以看到结果中的第一行是2017-06-29r3 myapp.appspot.com,编辑app.yaml:
env_variables:
# The following values are to be replaced by information from the output of
# 'gcloud service-management deploy swagger.json' command.
ENDPOINTS_SERVICE_NAME: myapp.appspot.com
ENDPOINTS_SERVICE_VERSION: 2017-06-29r3这对我很管用
发布于 2017-02-21 06:56:57
如果获取服务配置失败并返回404,那么gcloud service-management deploy步骤可能不会像预期的那样工作。我将再次尝试该步骤,确保所有内容都配置正确,并确保命令完成时没有任何错误。
https://stackoverflow.com/questions/42310672
复制相似问题