Deploy to linux environment

Hi,
I followed the instructions given in the manual (WAR deployment to Tomcat Linux Service - CUBA Platform. Developer’s Manual) but i keep encountering a 404 error. The only difference between the instructions and the reality is that i use localhost:8080/krs, where krs is the appname instead of localhost:8080/app as given. I’m trying to deploy to the latest ubuntu server version, with tomcat 9.

Can you please advise?

Regards,

Lloyd

Hi,
If you experience problems with deployment, you always should be looking into system logs.

By default tomcat9 log messages can be found here:

  • /var/log/syslog system journal.
  • Tomcat’s log files in the /var/log/tomcat9 folder.

If (when) you set up logback configuration, you will get additional CUBA log files in the ${app.home}/logs folder.

In the /var/log/tomcat9 folder i see this :
127.0.0.1 - - [28/Jan/2020:09:19:11 -0300] “GET /krs HTTP/1.1” 404 1086.

applink is localhost:8080/krs

There must be other messages.

You can restart tomcat service:

sudo systemctl restart tomcat9

to make the application try to restart and be able to see startup fail errors in the latest today’s log file.

Restarted several times. see copy of part syslog.

Jan 28 10:36:05 iaclinuxserver tomcat9[11641]: 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.rmi/sun.rmi.transport=ALL-UNNAMED
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Server version name: Apache Tomcat/9.0.24 (Ubuntu)
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Server built: Aug 22 2019 11:55:14 UTC
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Server version number: 9.0.24.0
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: OS Name: Linux
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: OS Version: 5.3.0-26-generic
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Architecture: amd64
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Java Home: /usr/lib/jvm/java-11-openjdk-amd64
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: JVM Version: 11.0.5+10-post-Ubuntu-0ubuntu1.1
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: JVM Vendor: Private Build
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: CATALINA_BASE: /var/lib/tomcat9
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: CATALINA_HOME: /usr/share/tomcat9
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Djava.awt.headless=true
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Xmx1024m
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Dapp.home=/opt/app_home
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Dignore.endorsed.dirs=
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Dcatalina.base=/var/lib/tomcat9
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Dcatalina.home=/usr/share/tomcat9
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Command line argument: -Djava.io.tmpdir=/tmp
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.5].
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
Jan 28 10:36:07 iaclinuxserver tomcat9[11641]: OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
Jan 28 10:36:08 iaclinuxserver tomcat9[11641]: Initializing ProtocolHandler [“http-nio-8080”]
Jan 28 10:36:08 iaclinuxserver tomcat9[11641]: Server initialization in [1,895] milliseconds
Jan 28 10:36:08 iaclinuxserver tomcat9[11641]: Starting service [Catalina]
Jan 28 10:36:08 iaclinuxserver tomcat9[11641]: Starting Servlet engine: [Apache Tomcat/9.0.24 (Ubuntu)]
Jan 28 10:36:08 iaclinuxserver tomcat9[11641]: Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml]
Jan 28 10:36:08 iaclinuxserver tomcat9[11641]: The path attribute with value [/host-manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has been ignored
Jan 28 10:36:10 iaclinuxserver tomcat9[11641]: 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.
Jan 28 10:36:10 iaclinuxserver tomcat9[11641]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has finished in [2,069] ms
Jan 28 10:36:10 iaclinuxserver tomcat9[11641]: Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml]
Jan 28 10:36:10 iaclinuxserver tomcat9[11641]: The path attribute with value [/manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has been ignored
Jan 28 10:36:11 iaclinuxserver tomcat9[11641]: 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.
Jan 28 10:36:11 iaclinuxserver tomcat9[11641]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has finished in [865] ms
Jan 28 10:36:11 iaclinuxserver tomcat9[11641]: Deploying web application archive [/var/lib/tomcat9/webapps/krs.war]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,338 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,339 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,340 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/var/lib/tomcat9/webapps/krs/WEB-INF/classes/logback.xml]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,489 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,494 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [Console]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,544 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,603 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [Console] to Logger[ROOT]
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,606 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba] to DEBUG
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,607 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.core.sys] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,609 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.core.sys.CubaDefaultListableBeanFactory] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,609 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.core.app.scheduling] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,609 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.web.sys] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,609 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.portal] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.core.app.LockManager] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [eclipselink] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [eclipselink.sql] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.springframework] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.activiti] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.jgroups] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [freemarker] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.thymeleaf.TemplateEngine] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,610 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.xlsx4j] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,611 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache.fop.apps.FOUserAgent] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,611 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.hibernate] to WARN
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,612 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [sun] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,612 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.sun] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,612 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [javax] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,612 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.apache] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,612 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.eclipse.jetty] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,612 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.atmosphere] to INFO
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.utils.ResourceUtils] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.Docx4jProperties] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.xlsx4j.jaxb.Context] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.utils.XSLTUtils] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.jaxb.JaxbValidationEventHandler] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.TraversalUtil] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,613 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.docx4j.fonts] to ERROR
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,614 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [org.perf4j.TimingLogger] to OFF
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,614 |-INFO in ch.qos.logback.classic.joran.action.LoggerAction - Setting level of logger [com.haulmont.cuba.gui.logging.UIPerformanceLogger] to OFF
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,614 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,615 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@43f50f63 - Registering current configuration as safe fallback point
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 10:36:21,164 |-INFO in ch.qos.logback.classic.servlet.LogbackServletContainerInitializer@4ce9985f - Adding an instance of class ch.qos.logback.classic.servlet.LogbackServletContextListener to the current web-app
Jan 28 10:36:21 iaclinuxserver tomcat9[11641]: 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.
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 2020-01-28 10:36:22.105 INFO [main] com.haulmont.cuba.core.sys.AppComponents - Using app components: [com.haulmont.cuba, com.haulmont.reports, com.haulmont.addon.grapesjs, de.balvi.cuba.declarativecontrollers, com.haulmont.addon.emailtemplates, com.haulmont.fts, de.diedavids.cuba.dataimport, com.haulmont.charts, com.non.dta]
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 2020-01-28 10:36:22.137 INFO [main] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from classpath:com/company/krs/app.properties
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 2020-01-28 10:36:22.140 INFO [main] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from /WEB-INF/local.app.properties
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 2020-01-28 10:36:22.260 INFO [main] com.haulmont.cuba.core.sys.AppComponents - Using app components: [com.haulmont.cuba, com.haulmont.reports, com.haulmont.addon.grapesjs, de.balvi.cuba.declarativecontrollers, com.haulmont.addon.emailtemplates, com.haulmont.fts, de.diedavids.cuba.dataimport, com.haulmont.charts, com.non.dta]
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 2020-01-28 10:36:22.266 INFO [main] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from classpath:com/company/krs/web-app.properties
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 2020-01-28 10:36:22.268 INFO [main] com.haulmont.cuba.core.sys.AbstractWebAppContextLoader - Loading app properties from /WEB-INF/local.app.properties
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: One or more listeners failed to start. Full details will be found in the appropriate container log file
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: Context [/krs] startup failed due to previous errors
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: 10:36:22,283 |-INFO in ch.qos.logback.classic.servlet.LogbackServletContextListener@31b094b4 - About to stop ch.qos.logback.classic.LoggerContext [default]
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: Deployment of web application archive [/var/lib/tomcat9/webapps/krs.war] has finished in [10,906] ms
Jan 28 10:36:22 iaclinuxserver tomcat9[11641]: Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
Jan 28 10:36:23 iaclinuxserver tomcat9[11641]: 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.
Jan 28 10:36:23 iaclinuxserver tomcat9[11641]: Deployment of web application directory [/var/lib/tomcat9/webapps/ROOT] has finished in [680] ms
Jan 28 10:36:23 iaclinuxserver tomcat9[11641]: Starting ProtocolHandler [“http-nio-8080”]
Jan 28 10:36:23 iaclinuxserver tomcat9[11641]: Server startup in [14,826] milliseconds
Jan 28 10:39:01 iaclinuxserver systemd[1]: Starting Clean php session files…
Jan 28 10:39:01 iaclinuxserver CRON[11883]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Jan 28 10:39:02 iaclinuxserver systemd[1]: phpsessionclean.service: Succeeded.
Jan 28 10:39:02 iaclinuxserver systemd[1]: Started Clean php session files.
Jan 28 10:45:01 iaclinuxserver CRON[12362]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)

These are clue messages. They mean that krs.war failed to start.

This message:

tells that full details will be available in one of log files in the /var/log/tomcat9 folder (most probably catalina.log.2020-01-28)

attachment of syslogsyslog.doc (1.9 MB)

This is the localhost log:

28-Jan-2020 10:36:22.326 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [com.haulmont.cuba.core.sys.singleapp.SingleAppCoreServletListener]
java.lang.NullPointerException
at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextDestroyed(AbstractWebAppContextLoader.java:106)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:215)
at com.haulmont.cuba.core.sys.singleapp.SingleAppCoreServletListener.contextDestroyed(SingleAppCoreServletListener.java:99)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4732)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5396)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
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.deployWARs(HostConfig.java:773)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
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:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:932)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:479)

this is the catalina log:

28-Jan-2020 10:36:03.476 INFO [Catalina-utility-2] 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.
28-Jan-2020 10:36:04.141 SEVERE [Catalina-utility-2] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
28-Jan-2020 10:36:04.151 SEVERE [Catalina-utility-2] org.apache.catalina.core.StandardContext.startInternal Context [/krs] startup failed due to previous errors
28-Jan-2020 10:36:04.187 INFO [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat9/webapps/krs.war] has finished in [29,316] ms
28-Jan-2020 10:36:07.073 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.24 (Ubuntu)
28-Jan-2020 10:36:07.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Aug 22 2019 11:55:14 UTC
28-Jan-2020 10:36:07.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.24.0
28-Jan-2020 10:36:07.088 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
28-Jan-2020 10:36:07.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 5.3.0-26-generic
28-Jan-2020 10:36:07.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
28-Jan-2020 10:36:07.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/lib/jvm/java-11-openjdk-amd64
28-Jan-2020 10:36:07.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.5+10-post-Ubuntu-0ubuntu1.1
28-Jan-2020 10:36:07.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Private Build
28-Jan-2020 10:36:07.089 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /var/lib/tomcat9
28-Jan-2020 10:36:07.090 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /usr/share/tomcat9
28-Jan-2020 10:36:07.281 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
28-Jan-2020 10:36:07.282 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
28-Jan-2020 10:36:07.283 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
28-Jan-2020 10:36:07.283 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties
28-Jan-2020 10:36:07.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
28-Jan-2020 10:36:07.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
28-Jan-2020 10:36:07.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
28-Jan-2020 10:36:07.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
28-Jan-2020 10:36:07.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
28-Jan-2020 10:36:07.285 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dapp.home=/opt/app_home
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/var/lib/tomcat9
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat9
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.5].
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
28-Jan-2020 10:36:07.286 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
28-Jan-2020 10:36:07.486 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
28-Jan-2020 10:36:08.212 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“http-nio-8080”]
28-Jan-2020 10:36:08.299 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1,895] milliseconds
28-Jan-2020 10:36:08.492 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
28-Jan-2020 10:36:08.496 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.24 (Ubuntu)]
28-Jan-2020 10:36:08.522 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml]
28-Jan-2020 10:36:08.560 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/host-manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has been ignored
28-Jan-2020 10:36:10.421 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.
28-Jan-2020 10:36:10.591 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has finished in [2,069] ms
28-Jan-2020 10:36:10.592 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml]
28-Jan-2020 10:36:10.595 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has been ignored
28-Jan-2020 10:36:11.447 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.
28-Jan-2020 10:36:11.457 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has finished in [865] ms
28-Jan-2020 10:36:11.481 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/var/lib/tomcat9/webapps/krs.war]
28-Jan-2020 10:36:21.833 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.
28-Jan-2020 10:36:22.270 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
28-Jan-2020 10:36:22.273 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/krs] startup failed due to previous errors
28-Jan-2020 10:36:22.388 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/var/lib/tomcat9/webapps/krs.war] has finished in [10,906] ms
28-Jan-2020 10:36:22.389 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
28-Jan-2020 10:36:23.047 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.
28-Jan-2020 10:36:23.069 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat9/webapps/ROOT] has finished in [680] ms
28-Jan-2020 10:36:23.075 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8080”]
28-Jan-2020 10:36:23.126 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [14,826] milliseconds

In the files presented still there is no root cause of the problem, why application fails to start.

Are you sure that was the only one exception in the localhost.log ?
Before that one there may be will be another exception which was the cause of the problem.

If there isn’t anything, then I would suggest to set up full logging like described in the developer’s manual (“You have two options how to customize logging configuration…”).
Then additional information will be written to the /opt/app_home/logs/app.log file.