If you go looking for Documentum’s DA 20.2 Docker file you’ll find the following:
documentum_adminstrator_20.2_docker_centos.tar (1.4 GB)
What’s wrong with this? Well, in a container world (specially when using application servers) why is there the word “centos” and why a tomcat is 1.4 GB?
The answer is simple: Whoever built this image didn’t know what a container is, and it seems that nobody knows yet at Opentext.
What is a container? Well you can google it, but a container IS NOT A VM, it is a process. The idea behind containers is to have an isolated process that can be easily scalable (ie: deploy multiple similar tomcat instances quickly). So what’s the point of running a Docker environment when what we are doing is simply deploying VM’s? None at all.
So let’s assume we can use an actual container, that can be scaled up quickly, and won’t force us to “redeploy” a Centos OS on each container (for Tomcat, as DA is not a process and should not be “a container”), what should we do? Here we go (Note that I’ve used the same VM used for Opentext Documentum 20.2 Docker with PostgreSQL install guide):
- Pull Tomcat 9 + openJDK 11 image from DockerHub:
[dmadmin@dctm202 ~]$ docker pull tomcat:9-jdk11 9-jdk11: Pulling from library/tomcat f15005b0235f: Pull complete 41ebfd3d2fd0: Pull complete b998346ba308: Pull complete f01ec562c947: Pull complete 74c11ae3efe8: Pull complete c65829cc6c71: Pull complete b98eacc09bf1: Pull complete b12b9c976670: Pull complete 62a47f54db4c: Pull complete 8c872760f50c: Pull complete Digest: sha256:2254679f4958efe7c9810d6a66d449f58b58-p 8888:80808ecd253e83e9d3afb68c51637cf4 Status: Downloaded newer image for tomcat:9-jdk11 docker.io/library/tomcat:9-jdk11 [dmadmin@dctm202 ~]$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE tomcat 9-jdk11 54877c1fa80a 40 hours ago 647MB
- Create the following folder structure and copy there these files:
/opt/docker/tomcat/conf/web.xml (just for Tag Pooling) /opt/docker/tomcat/webapps/da.war (Da to deploy) /opt/docker/tomcat/java.security (with anon whitelisted)
- Run container (I’ve used 8888 as external port as the VM has another Tomcat running on 8080):
[dmadmin@dctm202 tomcat]$ docker run -it --rm -p 8888:8080 --name tomcatda -v /opt/docker/tomcat/java.security:/usr/local/openjdk-11/conf/security/java.security -v /opt/docker/tomcat/conf/web.xml:/usr/local/tomcat/conf/web.xml -v /opt/docker/tomcat/webapps:/usr/local/tomcat/webapps tomcat:9-jdk11
And that’s it, you now have a 650MB real container for DA.
Thanks for this post. Tried it with DA 21.4 and tomcat:9.0.58-jre11-temurin. Not sure what I’m doing wrong but the DA redirect mechanism doesn’t seem to work: I get HTTP 404 Page not found when I try to access http://localhost:8888/da. I tried to deploy the Tomcat examples webapp and that one works. Any ideas?
LikeLike
check tomcat’s log to see what’s going on
LikeLike
Tomcat access log shows this;
# cat localhost_access_log.2022-02-15.txt
172.17.0.1 – – [15/Feb/2022:13:10:44 +0000] “GET /da HTTP/1.1” 302 –
172.17.0.1 – – [15/Feb/2022:13:10:46 +0000] “GET /da/ HTTP/1.1” 200 1335
172.17.0.1 – – [15/Feb/2022:13:10:47 +0000] “GET /da/component/errormessage HTTP/1.1” 404 763
Main tomcat log shows that it’s not able to compile some jsp files:
# cat localhost.2022-02-15.log
15-Feb-2022 13:10:46.490 SEVERE [http-nio-8080-exec-3] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet [jsp] threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [3] in the jsp file: [/wdk/tagPoolingDetector.jsp]
com.documentum.web.form.control cannot be resolved to a type
1:
2:
3:
4:
An error occurred at line: [3] in the jsp file: [/wdk/tagPoolingDetector.jsp]
com.documentum.web.form.control cannot be resolved to a type
1:
2:
3:
4:
An error occurred at line: [4] in the jsp file: [/wdk/tagPoolingDetector.jsp]
com.documentum.web.form.control cannot be resolved to a type
1:
2:
3:
4:
An error occurred at line: [4] in the jsp file: [/wdk/tagPoolingDetector.jsp]
com.documentum.web.form.control cannot be resolved to a type
1:
2:
3:
4:
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:213)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:498)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:397)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:367)
The image I used initially (tomcat:9.0.58-jre11-temurin) is labelled ‘jre’ so I figured I need the full JDK. So i picked another one (9.0.58-jdk11-openjdk-slim) but still no luck. Eventually, I tried it with yours (tomcat:9-jdk11) but same error. The logs are from my attempt with tomcat:9-jdk11.
Any ideas?
LikeLike
you need to disable tagpooling on web.xml, this is documented on da install guide (and that’s the reason you need to override web.xml on tomcat/conf)
LikeLike
That’s not it. I did it already.
LikeLike
have you checked if the war file works outside the container? It might be a corrupt download from support
LikeLike
It’s unlikely because I tried with both DA 21.2 and 21.4. I also made a count of files and directories inside the war and compared with the OpenText DA docker image which I got working and everything seems fine. But I’ll give it a try. Perhaps also with DA 22.1 which just got released.
LikeLike
[…] already saw that OpenText clearly fails to understand the concept of container (TIP: a container is a process, not a VM) so it keeps providing “D2/da/webtop/rest” […]
LikeLike