Jenkins部署在Tomcat 7上失败,java.io.FileNotFoundException:http:// localhost:8081 / manager / text / list

时间:2015-10-09 07:27:27

标签: tomcat jenkins

我的Jenkins部署失败,但有以下异常,我安装了部署插件,更新了tomcat-users.xml以及各种用户,如下所示。

<user username="deployer" password="deployer" roles="manager-script"/>
<role rolename=”manager”/>
   <role rolename=”admin”/>
   <user username=”harpreet” password=”harpreet” `roles=”standard,manager,admin,manager-gui,manager-script” />`

更新了我的jenkins工作配置页面,其中包含以下信息。

将war / ear部署到容器WAR / EAR文件 - ** / * .war 上下文路径 - Barclays_Tokenization

容器Tomcat 7.x 经理用户名 - harpreet(我之前尝试过deployer) 经理密码 - ••••••••

Tomcat网址 - http://localhost:8081

不确定是什么问题。任何帮助将受到高度赞赏。 我是Java Development的新手。 任何回应表示赞赏。感谢

org.codehaus.cargo.container.ContainerException: Failed to redeploy [C:\Program Files (x86)\Jenkins\jobs\Barclays_Tokenization\workspace\target\Barclays_Tokenization-V-0.0.1.war]
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:193)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
    at hudson.FilePath.act(FilePath.java:991)
    at hudson.FilePath.act(FilePath.java:969)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1766)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:408)
Caused by: java.io.FileNotFoundException: http://localhost:8081/manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:544)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:686)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:699)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:174)
    ... 16 more
java.io.FileNotFoundException: http://localhost:8081/manager/text/list
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:544)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:686)
    at org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:699)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:174)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:116)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:103)
    at hudson.FilePath.act(FilePath.java:991)
    at hudson.FilePath.act(FilePath.java:969)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:103)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:61)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
    at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
    at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
    at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
    at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
    at hudson.model.Run.execute(Run.java:1766)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:408)
Build step 'Deploy war/ear to a container' marked build as failure

2 个答案:

答案 0 :(得分:1)

检查{catalina.base} /webapps/manager/WEB-INF/web.xml

好像你没有经理应用

答案 1 :(得分:0)

你检查了tomcat中的webapps文件夹,以确定它是否有管理器(文件夹)应用程序? 如果是,请检查,您用于访问管理器应用程序的用户是否在tomcat-users.xml中分配了manager- *角色。