我最近改变了我的GAE本地应用程序的默认缩放到手动缩放。我可以从/api/*路径获得响应,但是我的欢迎文件不再工作了。
我得到了
访问/的问题。原因:
已禁用
当启动服务器时,上面写着:
com.google.appengine.tools.development.jetty9.LocalResourceFileServlet
doGet
警告:找不到/_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 html文件,应该在访问localhost:8080时显示。
任何帮助都是非常感谢的。
发布于 2019-09-26 23:43:06
/_ah/start被击中了,因为您选择了手动缩放:
手动缩放:请求最多可以运行24小时。手动缩放的实例可以选择处理/_ah/start并执行一个程序或脚本许多小时,而不返回HTTP响应代码。任务队列任务最多可以运行24小时。
https://cloud.google.com/appengine/docs/standard/java/how-instances-are-managed
你的欢迎文件是什么?那是怎么回事?
https://stackoverflow.com/questions/58124321
复制相似问题