gpt4 book ai didi

java - 找不到 :/_ah/start on Google App Engine 的文件

转载 作者:行者123 更新时间:2023-12-02 09:28:58 25 4
gpt4 key购买 nike

我最近在我的 GAE 本地应用程序上从默认缩放更改为手动缩放。我可以从 /api/* 路径获取响应,但我的欢迎文件不再起作用。

我明白了

Problem accessing /. Reason:

Forbidden

启动服务器时它会显示:

com.google.appengine.tools.development.jetty9.LocalResourceFileServlet doGet

WARNING: No file found for: /_ah/start

在此之前一切正常,这是我的 appengine-web.xml

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<version>1.0</version>
<manual-scaling>
<instances>1</instances>
</manual-scaling>
<instance-class>B1</instance-class>
<threadsafe>true</threadsafe>
<sessions-enabled>true</sessions-enabled>
<runtime>java8</runtime>
<static-files>
<include path="/**.html"></include>
</static-files>
<resource-files>
<include path="/**.json" />
</resource-files>
</appengine-web-app>

和我的web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<filter>
<filter-name>connexionFilter</filter-name>
<filter-class>slFilters.connexionFilter</filter-class>
</filter>
<filter>
<filter-name>restrictFilter</filter-name>
<filter-class>slFilters.restrictFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>connexionFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>restrictFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<session-config>
<cookie-config>
<http-only>true</http-only>
</cookie-config>
</session-config>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>

index.html是一个简单的hello world html文件,访问localhost:8080时应该显示

非常感谢任何帮助

最佳答案

/_ah/start 受到攻击,因为您选择了手动缩放:

Manual Scaling: Requests can run for up to 24 hours. A manually-scaled instance can choose to handle /_ah/start and execute a program or script for many hours without returning an HTTP response code. Task queue tasks can run up to 24 hours.

https://cloud.google.com/appengine/docs/standard/java/how-instances-are-managed

您的欢迎文件的网址是什么?这是如何工作的

关于java - 找不到 :/_ah/start on Google App Engine 的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58124321/

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