0

I'm trying to configure automatic app deployment to Tomcat server using Jenkins. Tomcat runs as a docker container:

$ docker run --rm --name tomcat tomcat

I've configured Jenkins build, but it fails at deployment step. Here is what's in Output:

org.codehaus.cargo.container.ContainerException: Failed to redeploy [/var/jenkins_home/workspace/Tomcat_sample_app_autodeploy/sample.war]

[stack trace here]

Caused by: java.io.FileNotFoundException: http://tomcat:8080/manager/text/list

Here is described that two things could possibly cause that problem and one of these is: "manager" not present in webapps folder. And indeed webapp directory in my container looks empty:

enter image description here

At the same time I can see in many tutorials that this manager is available out-of-the-box with Tomcat.

Has something changed in that matter? Do I need to somehow configure that manager manually?

Piotrek
  • 10,919
  • 18
  • 73
  • 136
  • 1
    If you are using the [Docker Official Image](https://hub.docker.com/_/tomcat), the default apps where moved to `/usr/local/tomcat/webapps.dist` (cf. the _"How to use this image"_ section). – Piotr P. Karwasz Jul 09 '21 at 12:50
  • So what should I do now? Can I move contents of `webapps.dist` to `webapps`? On a page you've linked there is something about "making it easy to re-enable", but nothing about what that means – Piotrek Jul 09 '21 at 12:57
  • Ok, found it, as per [this answer](https://stackoverflow.com/a/61972820) I can move it – Piotrek Jul 09 '21 at 13:04
  • 1
    You can move it or create a `/usr/local/tomcat/conf/Catalina/localhost/manager.xml` descriptor. – Piotr P. Karwasz Jul 09 '21 at 13:08

0 Answers0