我有一个在 Nginx 反向代理后面运行的 Tomcat 8 实例。它为我们通过 Maven 3 和 cargo-maven2-plugin 更新的常规 J2EE 应用程序提供服务。
通常这工作正常,但最终,Tomcat 管理器(或 Nginx,很难说真的)失败,返回 413 实体太大。最大上传大小设置为 150 MB,WAR 为 85,所以这应该不是问题。
[INFO] [edDeployerDeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-tomcat:jar:1.6.1 for container tomcat8x
[INFO] [mcat8xRemoteDeployer] Deploying [C:\source\web-0.1-SNAPSHOT.war]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:56 min
[INFO] Finished at: 2016-11-10T17:07:30+01:00
[INFO] Final Memory: 61M/656M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.6.1:deploy (default-cli) on project reforce-fasthi-web: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.6.1:deploy failed: Failed to deploy [C:\source\web-0.1-SNAPSHOT.war]: Server returned HTTP response code: 413 for URL: https://server:443/manager/text/deploy?path=%2F&version=20161110-1604UTC -> [Help 1]
有什么想法可能是这里的问题吗?我已经尝试了很多东西,比如绕过 Nginx(在这种情况下传输超时)。根据 Tomcat Manager 的服务器概述,上传会导致一个延迟线程,除非重新启动服务器,否则该线程不会消失。日志什么也没说!