部署Google Endpoints Quickstart应用在我请求网址时给出错误消息?

时间:2017-02-02 01:24:27

标签: google-app-engine google-cloud-endpoints openapi

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

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

非常感谢任何帮助。

2 个答案:

答案 0 :(得分:1)

关于"没有为记录器找到处理程序......"你需要这样做: http://excid3.com/blog/no-handlers-could-be-found-for-logger

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

答案 1 :(得分:0)

如果这是一个有效的网址,则需要/的网址处理程序:

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