I got this error while try to do auto-deploy to our tomcat server.
ERROR: Publisher hudson.plugins.deploy.DeployPublisher aborted due to
exception org.codehaus.cargo.container.ContainerException: Failed to
redeploy
[/home/affiza/workspace/mimos-test-deploy/dist/met-server.war] at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:195)
at
hudson.plugins.deploy.CargoContainerAdapter.deploy(CargoContainerAdapter.java:64)
at
hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:90)
at
hudson.plugins.deploy.CargoContainerAdapter$1.invoke(CargoContainerAdapter.java:77)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2309) at
hudson.remoting.UserRequest.perform(UserRequest.java:118) at
hudson.remoting.UserRequest.perform(UserRequest.java:48) at
hudson.remoting.Request$2.run(Request.java:326) at
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722) Caused by:
java.io.IOException: Server returned HTTP response code: 403 for URL:
http://test.mest.my:8080//manager/text/list at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.invoke(TomcatManager.java:504)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.list(TomcatManager.java:622)
at
org.codehaus.cargo.container.tomcat.internal.TomcatManager.getStatus(TomcatManager.java:635)
at
org.codehaus.cargo.container.tomcat.internal.AbstractTomcatManagerDeployer.redeploy(AbstractTomcatManagerDeployer.java:176)
… 13 more
What i need to do?
Best Answer
I think this is the key:
403 means Forbidden:
So you probably have wrong deployment configuration in Jenkins job (wrong place where you try to deploy, where it's not allowed), or then your Tomcat is not configured right and does not allow deployment (at least not the way Jenkins job is trying to do it).