无法在 Security-Hardened Tomcat 8 中部署 Tomcat 管理器(严重:ContainerBase.addChild:启动:无法启动组件)
Unable to deploy Tomcat Manager in Security-Hardened Tomcat 8 (SEVERE: ContainerBase.addChild: start: Failed to start component)
This is how we enable Tomcat Manager in a vanilla Tomcat 8。
我有一个 hardened Tomcat 8 分为 CATALINA_HOME 和 CATALINA_BASE,我无法在上面部署 Tomcat 管理器,没有出现以下错误:
org.apache.catalina.core.ContainerBase addChildInternal SEVERE:
ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component
[/manager]
和
SEVERE: The web application with context path [/manager] was not
deployed because it contained a deployment descriptor
[\webapps\manager\META-INF\context.xml] which may include
configuration necessary for the secure deployment of the application
but processing of deployment descriptors is prevented by the deployXML
setting of this host. An appropriate descriptor should be created at
[\conf\Catalina\localhost\manager.xml] to deploy this
application.
类似的帖子(列出一些 1, 2, 3, 4)提出了解决方案但没有帮助。
修复方法如下:
设置好Tomcat Manager后,复制
%CATALINA_BASE%\webapps\manager\META-INF\context.xml
到 %CATALINA_BASE%\conf\Catalina\localhost\manager.xml
如果您有除管理器以外的其他网络应用程序,只需相应地替换文件名即可。
另一个解决方案是将 deployXML="true" 添加到 server.xml 中的 Host 元素。 Explanation.
This is how we enable Tomcat Manager in a vanilla Tomcat 8。
我有一个 hardened Tomcat 8 分为 CATALINA_HOME 和 CATALINA_BASE,我无法在上面部署 Tomcat 管理器,没有出现以下错误:
org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [/manager]
和
SEVERE: The web application with context path [/manager] was not deployed because it contained a deployment descriptor [\webapps\manager\META-INF\context.xml] which may include configuration necessary for the secure deployment of the application but processing of deployment descriptors is prevented by the deployXML setting of this host. An appropriate descriptor should be created at [\conf\Catalina\localhost\manager.xml] to deploy this application.
类似的帖子(列出一些 1, 2, 3, 4)提出了解决方案但没有帮助。
修复方法如下:
设置好Tomcat Manager后,复制
%CATALINA_BASE%\webapps\manager\META-INF\context.xml
到 %CATALINA_BASE%\conf\Catalina\localhost\manager.xml
如果您有除管理器以外的其他网络应用程序,只需相应地替换文件名即可。
另一个解决方案是将 deployXML="true" 添加到 server.xml 中的 Host 元素。 Explanation.