简体   繁体   中英

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." 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. 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. 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. (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)

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 :

    <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:

  • dropping the WAR file to $CATALINA_BASE/webapps (where $CATALINA_BASE is the folder where Tomcat is installed) in Tomcat 9,
  • dropping the WAR file to $CATALINA_BASE/webapps-javaee in Tomcat 10.

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. Dropping them to the folder webapps-javaee does exactly that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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