找不到文件:/ _ah /在Google App Engine上启动

问题描述 投票:0回答:1

我最近在我的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 world html文件

非常感谢您的帮助

java google-app-engine jetty http-status-code-403
1个回答
0
投票

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

手动缩放:请求最多可以运行24小时。手动缩放的实例可以选择处理/ _ah / start并执行程序或脚本数小时,而无需返回HTTP响应代码。任务队列任务最多可以运行24小时。

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

您的欢迎文件的网址是什么?怎么工作

© www.soinside.com 2019 - 2024. All rights reserved.