已部署 Google Endpoints Quickstart 应用程序在我请求 url 时给出错误消息?

Deployed Google Endpoints Quickstart app giving error message when i request url?

我正在标准环境中关注 App Engine 上的 Cloud Endpoints Frameworks 快速入门。我已经部署了示例 API。当我打开 https://[my-project].appspot.com/ 时,我收到错误消息:

Error: Not Found. The Requested URL / was not found on this server

日志显示消息:

No Handlers matched this url

app.yaml 处理程序是 endpoints-frameworks-v2/echo 示例附带的:

  handlers:
# The endpoints handler must be mapped to /_ah/api.
- url: /_ah/api/.*
  script: main.api

我在快速入门的前一步生成 OpenAPI 配置文件时遇到了很大困难。我通过更新 SDK 的系统变量路径让它工作,但我确实收到了这个错误:

No handlers could be found for logger "endpoints.apiserving"
WARNING:root:Method echo.echo_path_parameter specifies path parameters buy you are
not using a ResourceContainer. This will fail in future releases; please
switch to using ResourceContainer as soon as possible. 

我不知道这个错误是否与当前问题有关。

如有任何帮助,我们将不胜感激。

如果 url 有效,您需要 / 的 url 处理程序:

handlers:
# The endpoints handler must be mapped to /_ah/api.
- url: /_ah/api/.*
  script: main.api

- url: /.*            # catchall for all other urls
  script: main.api    # or wherever you handle the request for `/` and others

关于 "No handlers could be found for logger..." 你需要这样做: http://excid3.com/blog/no-handlers-could-be-found-for-logger

另一个问题是一个已知问题: What are ResourceContainers and how to use them for Cloud Endpoints?