Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FAIL - Failed to deploy application at context path /ROOT. Deploy plugin of jenkins failling to deploy

Attempting to set up jenkins and its container deploy plugin.

However, I am receiving the following stacktrace :

ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to exception
org.codehaus.cargo.container.ContainerException: Failed to deploy [/myHome/jenkins/jobs/myAPP/workspace/target/ROOT.war]
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.deploy(AbstractTomcatManagerDeployer.java:111)
    at org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:187)
    at hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:60)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:86)
    at hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:73)
    at hudson.FilePath.act(FilePath.java:784)
    at hudson.FilePath.act(FilePath.java:766)
    at hudson.plugins.deploy.CargoContainerAdapter.redeploy(CargoContainerAdapter.java:73)
    at hudson.plugins.deploy.DeployPublisher.perform(DeployPublisher.java:45)
    at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
    at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:700)
    at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:675)
    at hudson.maven.MavenModuleSetBuild$RunnerImpl.post2(MavenModuleSetBuild.java:998)
    at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:622)
    at hudson.model.Run.run(Run.java:1429)
    at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:481)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:238)
Caused by: org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: FAIL - Failed to deploy application at context path /ROOT

Which isn't really that helpful, I can deploy manually using tomcat manager, and also copying the war file across using command line options works. But i can not get the automated deploy to work.

I am using a tomcat url of http://localhost:8080/ and the deploy fails when their is no app currently deployed.

Any help gratefully received, thanks.

like image 665
NimChimpsky Avatar asked Jan 25 '12 11:01

NimChimpsky


2 Answers

Just a wild guess but the ROOT context is not: /ROOT but rather / maybe there is something wrong in your config

like image 144
Pauli Avatar answered Nov 01 '22 02:11

Pauli


Its a ContainerExc not fileNotFound; therefore the war file has been located.

URL should be http://localhost:8080

Is userName and Password provided?

Is this userName assigned a role of manager-script?

is the tomcat webapp cleared down once for work and temp folder?

If YES to above all, now run the tomcat without any war fiel present in the webapps folder and open a web broswer to see http://localhost:8080 is accessible. Now whilst this tomcat running, build the jenkins job and deployment should be fine.

like image 42
teju Avatar answered Nov 01 '22 03:11

teju