gpt4 book ai didi

gae-search - GAE 后端进程终止,因为它无法响应 HTTP 状态代码为 200-299 或 404 的启动请求

转载 作者:行者123 更新时间:2023-12-02 01:02:07 24 4
gpt4 key购买 nike

在 Google App Engine Java 中,我正在尝试运行后端,但我总是在后端日志中收到错误消息..

Process terminated because it failed to respond to the start request with an HTTP status code of 200-299 or 404.

应用引擎日志

2014-12-07 11:06:31.944 /_ah/start 302 4842ms 0kb instance=0 module=default version=testservice
0.1.0.3 - - [06/Dec/2014:21:36:31 -0800] "GET /_ah/start HTTP/1.1" 302 231 - - "0.testservice.testapp.appspot.com" ms=4842 cpu_ms=7626 cpm_usd=0.000026 loading_request=1 exit_code=107 instance=0 app_engine_release=1.9.16

com.test.AppFilter doGet: Filter Initiated..!

This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application. E 2014-12-05 11:02:16.916

Process terminated because it failed to respond to the start request with an HTTP status code of 200-299 or 404.

请帮助。

最佳答案

当模块(或以前的版本:后端)启动时,Google App Engine 编排器会向 /_ah/start 发送一个 HTTP 请求。 .您可以使用此 HTTP 请求执行您希望的任何初始化操作。

如日志消息中所述,此 HTTP 请求必须返回 200 之间的 HTTP 状态代码。和 299 (表明请求已正确处理)或 404 Not Found (这表明您没有将任何 servlet 或过滤器附加到此请求)。

Google 的文档 at this page 中解释了所有这些内容.

这里的答案是 302 Redirect .这通常由重定向到身份验证屏幕的安全过滤器触发。

如果您定义了自定义安全过滤器或处理 /_ah/start 的 servlet URL,确保它返回 200 HTTP 代码。

如果你设置一个<security-constraint>在此 URL 上(除了强制 SSL),将其删除。

关于gae-search - GAE 后端进程终止,因为它无法响应 HTTP 状态代码为 200-299 或 404 的启动请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27266399/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com