0

我正在关注标准环境中 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. 

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

任何帮助将非常感激。

4

2 回答 2

1

关于“找不到记录器的处理程序...”,您需要这样做: http ://excid3.com/blog/no-handlers-could-be-found-for-logger

另一个问题是一个已知问题: 什么是 ResourceContainers 以及如何将它们用于 Cloud Endpoints?

于 2017-03-23T14:30:03.537 回答
0

你需要一个 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
于 2017-02-02T02:44:43.397 回答