找不到文件:/_ah/start on Google App Engine
No file found for: /_ah/start on Google App Engine
我最近在我的 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
欢迎文件 url 是什么?它是如何工作的
我最近在我的 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
欢迎文件 url 是什么?它是如何工作的