简体   繁体   English

tomcat 一个微服务的 9 和 10 战争文件部署给出“无法访问此站点连接已重置。” 错误页面

[英]tomcat 9 and 10 war file deployment for one microservice gives "This site can’t be reached The connection was reset." error page

tomcat 9 and 10 war file deployment for one microservice gives "This site can't be reached The connection was reset." tomcat 一个微服务的 9 和 10 战争文件部署给出“无法访问此站点连接已重置。” error page错误页面

I have successfully deployed three other war files, but the more bulky one (69.5MB) gives me the error above when I click the "Deploy" button after selecting the.war file.我已经成功部署了另外三个 war 文件,但是当我在选择 .war 文件后单击“部署”按钮时,更大的一个(69.5MB)给了我上面的错误。 Someone suggested I try simply putting the file in the conf/webapps directory under the apache installation folder (Windows 10 OS) and restarting the server, but that doesn't work either.有人建议我尝试简单地将文件放在 apache 安装文件夹(Windows 10 操作系统)下的 conf/webapps 目录中并重新启动服务器,但这也不起作用。 I tried running the 4 microservices from Spring Tool Suite (STS) and they work fine, but I am trying to follow directions for adding a.war file for a tiny web project on Tomcat and running both my 69.5MB microservice and the tiny web project on Tomcat as the instructions say to use port 8080 for both. I tried running the 4 microservices from Spring Tool Suite (STS) and they work fine, but I am trying to follow directions for adding a.war file for a tiny web project on Tomcat and running both my 69.5MB microservice and the tiny web project在 Tomcat 上,如说明所说,两者都使用端口 8080。 (and subsequently command line start Tomcat with both projects/microservices running on a non-embedded Tomcat. The 69.5MB microservice and the other three microservices run fine with Spring Boot) (随后命令行启动 Tomcat,两个项目/微服务都在非嵌入式 Tomcat 上运行。69.5MB 微服务和其他三个微服务在 Z38008DD81C2F4D798ZAF1DE 上运行良好)

Any ideas on how to proceed?关于如何进行的任何想法?

Michael迈克尔

Tomcat Manager has a 50 MiB limit on attachments, which can not be changed without modifying the deployment descriptor of the Tomcat Manager application: see the following lines of manager/WEB-INF/web.xml : Tomcat Manager 对附件有 50 MiB 的限制,如果不修改 Tomcat Manager 应用程序的部署描述符,则无法更改此限制:请参阅manager/WEB-INF/web.xml的以下行:

    <multipart-config>
      <!-- 50MB max -->
      <max-file-size>52428800</max-file-size>
      <max-request-size>52428800</max-request-size>
      <file-size-threshold>0</file-size-threshold>
    </multipart-config>

On the other hand, unless you disabled autoDeploy , you can deploy new applications by:另一方面,除非您禁用autoDeploy ,否则您可以通过以下方式部署新应用程序:

  • dropping the WAR file to $CATALINA_BASE/webapps (where $CATALINA_BASE is the folder where Tomcat is installed) in Tomcat 9,将 WAR 文件放到 Tomcat 9 中的$CATALINA_BASE/webapps (其中$CATALINA_BASE是安装 Tomcat 的文件夹),
  • dropping the WAR file to $CATALINA_BASE/webapps-javaee in Tomcat 10.将 WAR 文件放到 Tomcat 10 中$CATALINA_BASE/webapps-javaee中。

The application should be deployed within seconds.应用程序应在几秒钟内部署。

Remark : Tomcat 10 is a Jakarta EE 9 servlet container, so most applications will not work on it out-of-the-box (see eg this question ), but need to be converted.备注:Tomcat 10 是一个 Jakarta EE 9 servlet 容器,所以大多数应用程序不能在它上运行(参见例如这个问题),但需要转换。 Dropping them to the folder webapps-javaee does exactly that.将它们放到webapps-javaee文件夹中就是这样做的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM