【发布时间】:2018-11-27 07:46:00
【问题描述】:
我正在尝试将war文件部署到tomcat,使用端口8080上的cargo maven插件(这是免费的,我检查了),我得到catalina.LifeCycleException: Failed to start component [Connector[AJP/1.3-auto-1]]
它还说输入的端口号无效,但在 server.xml 文件中端口指定为:<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
我是否缺少其他配置?
货物配置:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.14</version>
<configuration>
<container>
<containerId>tomcat8x</containerId>
<type>installed</type>
<zipUrlInstaller>
<url>http://repo.release.cerner.corp/external/repo/org/apache/tomcat/apache-tomcat/${apache.tomcat.version}/apache-tomcat-${apache.tomcat.version}.tar.gz</url>
</zipUrlInstaller>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
</dependency>
</dependencies>
<timeout>300000</timeout>
</container>
<configuration>
<configfiles>
<configfile>
<file>${project.basedir}/src/test/resources/context/context.xml</file>
<todir>conf</todir>
</configfile>
</configfiles>
<properties>
<cargo.servlet.port>${apache.tomcat.servletPort}</cargo.servlet.port>
<cargo.rmi.port>${apache.tomcat.rmiPort}</cargo.rmi.port>
<cargo.tomcat.ajp.port>${apache.tomcat.ajpPort}</cargo.tomcat.ajp.port>
<cargo.logging>low</cargo.logging>
<!--uncomment to enable debugging on the server-->
<!--<cargo.jvmargs> "-Xdebug" "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=7998"-->
<!--</cargo.jvmargs>-->
</properties>
</configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>sample-war</artifactId>
<type>war</type>
<properties>
<context>sample-war</context>
</properties>
</deployable>
</deployables>
</configuration>
<executions>
<execution>
<id>start-container</id>
<goals>
<goal>start</goal>
</goals>
<phase>pre-integration-test</phase>
</execution>
<execution>
<id>stop-container</id>
<goals>
<goal>stop</goal>
</goals>
<phase>post-integration-test</phase>
</execution>
</executions>
</plugin>
</plugins>
【问题讨论】: