Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime errors when building custom docker image with maven #460

Open
karbah-geodata opened this issue May 19, 2022 · 0 comments
Open

Runtime errors when building custom docker image with maven #460

karbah-geodata opened this issue May 19, 2022 · 0 comments

Comments

@karbah-geodata
Copy link

Describe the bug
I'm trying to build a custom docker image of geoportal with custom configs (the only changes are to the appcontext and appsecurity config files), using maven to build the .war files. The image is built without error, the configs work, and the application is able to run successfully (using docker run). However, even though the application works, we keep getting warnings and severe error logs about invalid character ':', apparently because it's trying to deploy some webapp based on a malformed path, eg Deploying web application directory [/usr/local/tomcat/webapps/C:] (see logs below).

When instead copying over the precompiled .war files available from the official geoportal-server-catalog v2.6.5 release (rather than building them using maven), there are no such errors (see below). In addition, the error happens even if I use no custom configs and simply try to build the official v2.6.5 repo source code. I suspect therefore the issue is with how I've built the image using maven in the dockerfile.

Although the application seems to work now, some of the errors are listed as "severe", and it doesn't yet work in all environments, so I would like to eliminate all possible problems.

Any insights into how you've created the v2.6.5 release .war files would be greatly appreciated (the Dockerfile inside the docker folder is setup for an older geoportal version still and doesn't work for v2.6.5), or if you've ever encountered similar errors.

To Reproduce
To demonstrate the point, the following dockerfile (adapted from https://github.com/ma-ku/docker-geoportal) tries to build the official esri v2.6.5 source code:

FROM tomcat:9-jre11

# IMPORTANT: This script assumes docker build is run from the root of the repo

# Install wget and install/updates certificates
RUN apt-get update \
 && apt-get install -y -q --no-install-recommends \
    ca-certificates \
    git \
    maven \
    openjdk-11-jdk \
    #ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
 && apt-get clean \
 && rm -r /var/lib/apt/lists/*

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64

# Install geoportal web application using our own custom git repo
WORKDIR /tmp
RUN git clone -b v2.6.5 https://github.com/Esri/geoportal-server-catalog.git geoportal-repo

WORKDIR /tmp/geoportal-repo/geoportal
RUN mvn clean install -DskipTests

WORKDIR /tmp/geoportal-repo/geoportal-search
RUN mvn clean install -DskipTests

WORKDIR $CATALINA_HOME/webapps/
RUN cp /tmp/geoportal-repo/geoportal/target/*.war geoportal.war
RUN cp /tmp/geoportal-repo/geoportal-search/target/*.war geoportal-search.war
RUN ls $CATALINA_HOME/webapps/

COPY docker3/geoportal/tomcat-users.xml $CATALINA_HOME/conf

A relevant snippet of the errors encountered (this seems to recur multiple places throughout the logs):

2022-05-19 09:02:34,965 INFO [org.springframework.security.config.http.HttpSecurityBeanDefinitionParser] - Checking sorted filter chain: [Root bean: class [org.springframework.security.web.context.SecurityContextPersistenceFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 200, Root bean: class [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 400, Root bean: class [org.springframework.security.web.header.HeaderWriterFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 500, <oauthResourceFilter>, order = 1099, Root bean: class [org.springframework.security.web.authentication.www.BasicAuthenticationFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2000, Root bean: class [org.springframework.security.web.savedrequest.RequestCacheAwareFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2100, Root bean: class [null]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.security.config.http.HttpConfigurationBuilder$SecurityContextHolderAwareRequestFilterBeanFactory#1; factoryMethodName=getBean; initMethodName=null; destroyMethodName=null, order = 2200, Root bean: class [org.springframework.security.web.authentication.AnonymousAuthenticationFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2500, Root bean: class [org.springframework.security.web.session.SessionManagementFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2700, Root bean: class [org.springframework.security.web.access.ExceptionTranslationFilter]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null, order = 2800, <org.springframework.security.web.access.intercept.FilterSecurityInterceptor#1>, order = 2900]

18-May-2022 11:48:54.898 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED

18-May-2022 11:48:54.898 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED

18-May-2022 11:48:54.898 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED

18-May-2022 11:48:54.898 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED

18-May-2022 11:48:54.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

18-May-2022 11:48:54.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties

18-May-2022 11:48:54.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

18-May-2022 11:48:54.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048

18-May-2022 11:48:54.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

18-May-2022 11:48:54.899 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027

18-May-2022 11:48:54.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=

18-May-2022 11:48:54.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat

18-May-2022 11:48:54.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat

18-May-2022 11:48:54.900 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp

18-May-2022 11:48:54.911 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.33] using APR version [1.7.0].

18-May-2022 11:48:54.912 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].

18-May-2022 11:48:54.912 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

18-May-2022 11:48:54.918 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1n  15 Mar 2022]

18-May-2022 11:48:55.163 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

18-May-2022 11:48:55.188 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [438] milliseconds

18-May-2022 11:48:55.240 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

18-May-2022 11:48:55.240 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.63]

18-May-2022 11:48:55.256 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/geoportal-search.war]

18-May-2022 11:48:55.776 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

18-May-2022 11:48:56.082 WARNING [main] org.glassfish.jersey.server.wadl.WadlFeature.configure JAXBContext implementation could not be found. WADL feature is disabled.

18-May-2022 11:48:56.241 WARNING [main] org.glassfish.jersey.server.wadl.WadlFeature.configure JAXBContext implementation could not be found. WADL feature is disabled.

18-May-2022 11:48:56.269 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/geoportal-search.war] has finished in [1,012] ms

18-May-2022 11:48:56.275 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/geoportal.war]

18-May-2022 11:48:59.550 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

18-May-2022 11:49:02.891 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/geoportal.war] has finished in [6,616] ms

18-May-2022 11:49:02.897 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]

18-May-2022 11:49:02.906 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [7718] milliseconds

18-May-2022 11:49:12.902 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/usr/local/tomcat/webapps/C:]

18-May-2022 11:49:12.905 WARNING [Catalina-utility-2] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/C:]] with name [Catalina:j2eeType=WebModule,name=//localhost/C:,J2EEApplication=none,J2EEServer=none] during component initialisation

javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:155)

at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:57)

at org.apache.catalina.core.ContainerBase.initInternal(ContainerBase.java:874)

at org.apache.catalina.core.StandardContext.initInternal(StandardContext.java:6290)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1667)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1162)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1347)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:829)

18-May-2022 11:49:12.909 WARNING [Catalina-utility-2] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [org.apache.catalina.webresources.StandardRoot@3971f8dd] with name [Catalina:type=WebResourceRoot,host=localhost,context=/C:] during component initialisation

javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:155)

at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:57)

at org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:689)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)

at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4885)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5023)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1667)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1162)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1347)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:829)

18-May-2022 11:49:12.909 WARNING [Catalina-utility-2] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [org.apache.catalina.webresources.Cache@5faee455] with name [Catalina:type=WebResourceRoot,host=localhost,context=/C:,name=Cache] during component initialisation

javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:155)

at org.apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.java:696)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)

at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4885)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5023)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1667)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1162)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1347)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:829)

18-May-2022 11:49:12.913 WARNING [Catalina-utility-2] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [WebappLoader[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/C:]]] with name [Catalina:type=Loader,host=localhost,context=/C:] during component initialisation

javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:155)

at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:57)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5086)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1667)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1162)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1347)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:829)

18-May-2022 11:49:12.915 SEVERE [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory [/usr/local/tomcat/webapps/C:]

java.lang.IllegalStateException: Error starting child

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:729)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1185)

at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1933)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1095)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:477)

at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1667)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1162)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1365)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1369)

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1347)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)

at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)

at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

at java.base/java.lang.Thread.run(Thread.java:829)

Caused by: org.apache.catalina.LifecycleException: Error starting the loader

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:433)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5086)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)

... 24 more

Caused by: javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.loader.WebappLoader.startInternal(WebappLoader.java:426)

... 28 more

18-May-2022 11:49:12.917 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/usr/local/tomcat/webapps/C:] has finished in [15] ms

18-May-2022 11:50:29.500 INFO [Thread-2] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]

18-May-2022 11:50:29.501 INFO [Thread-2] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]

18-May-2022 11:50:29.615 INFO [Thread-2] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]

18-May-2022 11:50:29.628 INFO [Thread-2] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]

18-May-2022 11:50:29.629 WARNING [Thread-2] org.apache.catalina.util.LifecycleMBeanBase.register Failed to register object [org.apache.catalina.deploy.NamingResourcesImpl@3c509e09] with name [Catalina:type=NamingResources,host=localhost,context=/C:] during component initialisation

javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.util.LifecycleMBeanBase.register(LifecycleMBeanBase.java:155)

at org.apache.catalina.util.LifecycleMBeanBase.initInternal(LifecycleMBeanBase.java:57)

at org.apache.catalina.deploy.NamingResourcesImpl.initInternal(NamingResourcesImpl.java:959)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.core.StandardContext.setNamingResources(StandardContext.java:2113)

at org.apache.catalina.core.StandardContext.getNamingResources(StandardContext.java:2064)

at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:212)

at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:252)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:293)

at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)

at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1033)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)

at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1033)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:579)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:1050)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.startup.Catalina.stop(Catalina.java:850)

at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:996)

18-May-2022 11:50:29.632 WARNING [Thread-2] org.apache.catalina.loader.WebappLoader.stopInternal Error stopping the loader

javax.management.MalformedObjectNameException: Invalid character ':' in value part of property

at java.management/javax.management.ObjectName.construct(ObjectName.java:621)

at java.management/javax.management.ObjectName.<init>(ObjectName.java:1406)

at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:476)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)

at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5515)

at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:293)

at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)

at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1033)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:826)

at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1033)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:579)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:1050)

at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:321)

at org.apache.catalina.startup.Catalina.stop(Catalina.java:850)

at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:996)

NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

19-May-2022 09:02:28.074 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.63

19-May-2022 09:02:28.076 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          May 11 2022 07:52:11 UTC

19-May-2022 09:02:28.076 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.63.0

19-May-2022 09:02:28.076 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            5.10.102.1-microsoft-standard-WSL2

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-11-openjdk-amd64

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           11.0.15+10-post-Debian-1deb11u1

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Debian

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /usr/local/tomcat

19-May-2022 09:02:28.077 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/local/tomcat

19-May-2022 09:02:28.093 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048

19-May-2022 09:02:28.094 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources

19-May-2022 09:02:28.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027

19-May-2022 09:02:28.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=

19-May-2022 09:02:28.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/usr/local/tomcat

19-May-2022 09:02:28.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/local/tomcat

19-May-2022 09:02:28.095 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp

19-May-2022 09:02:28.105 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.33] using APR version [1.7.0].

19-May-2022 09:02:28.105 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].

19-May-2022 09:02:28.105 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

19-May-2022 09:02:28.112 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1n  15 Mar 2022]

19-May-2022 09:02:28.395 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

19-May-2022 09:02:28.421 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [545] milliseconds

19-May-2022 09:02:28.471 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

19-May-2022 09:02:28.471 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.63]

19-May-2022 09:02:28.483 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/usr/local/tomcat/webapps/geoportal-search.war]

19-May-2022 09:02:29.042 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

19-May-2022 09:02:29.341 WARNING [main] org.glassfish.jersey.server.wadl.WadlFeature.configure JAXBContext implementation could not be found. WADL feature is disabled.

19-May-2022 09:02:29.503 WARNING [main] org.glassfish.jersey.server.wadl.WadlFeature.configure JAXBContext implementation could not be found. WADL feature is disabled.

19-May-2022 09:02:29.534 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/usr/local/tomcat/webapps/geoportal-search.war] has finished in [1,050] ms

Expected behavior
A dockerfile that works is where I instead just copy over the precompiled .war files from the official v2.6.5 release:

FROM tomcat:9-jre11
MAINTAINER Mathias Kühn [email protected]

# Install wget and install/updates certificates
RUN apt-get update \
 && apt-get install -y -q --no-install-recommends \
    ca-certificates \
    git \
    maven \
    openjdk-11-jdk \
    #ca-certificates-java="$CA_CERTIFICATES_JAVA_VERSION" \
 && apt-get clean \
 && rm -r /var/lib/apt/lists/*

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64

# Install geoportal web application
ENV GPTURL=https://github.com/Esri/geoportal-server-catalog/releases/download/v2.6.5/geoportal-server-catalog-2.6.5.zip

ADD $GPTURL /tmp/geoportal.zip

WORKDIR $CATALINA_HOME/webapps/
RUN unzip /tmp/geoportal.zip *.war
RUN rm /tmp/geoportal.zip

COPY tomcat-users.xml $CATALINA_HOME/conf

# Install harvester application
ENV GITURL=https://github.com/Esri/geoportal-server-harvester.git

WORKDIR /tmp
RUN git clone ${GITURL} harvester
WORKDIR /tmp/harvester
RUN mvn package -DskipTests

WORKDIR $CATALINA_HOME/webapps/

RUN cp /tmp/harvester/geoportal-application/geoportal-harvester-war/target/*.war harvester.war

This does not produce any of the errors listed above, and results in a working application together with a local elasticsearch service.

Desktop (please complete the following information):

  • OS: Windows 11, through Docker.
  • Browser Chrome
  • Version 2.6.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant