Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Tomcat startup issue in Debian11

    Good Morning,

    I've spent nearly one day to understand what happens on my new Debian 11 server, using either Tomcat8 or 9 and Java 8 or 11.

    In all environment, I get an exception at Tomcat startup, at the initialization phase. Here is the log extract:
    28-Sep-2021 12:19:11.728 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.43 (Debian)]
    28-Sep-2021 12:19:11.743 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/var/lib/tomcat9/webapps/SicaBO.war]
    28-Sep-2021 12:19:22.739 SEVERE [main] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/var/lib/tomcat9/webapps/SicaBO.war]
    java.lang.IllegalStateException: Error starting child
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:706)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:946)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1792)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
    at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:757)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:426)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1520)
    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:843)
    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.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
    at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
    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:434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:477)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SicaBO]]
    at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
    ... 37 more
    Caused by: java.lang.ExceptionInInitializerError
    at com.isomorphic.messaging.MessagingWebSocketEndpoint.<clinit>(MessagingWebSocketEndpoint.java:52)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.tomcat.websocket.server.WsSci.onStartup(WsSci.java:81)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    ... 38 more
    Caused by: java.lang.NullPointerException
    at com.isomorphic.log.Log4jLogger.<init>(Log4jLogger.java:197)
    at com.isomorphic.log.Logger.<init>(Logger.java:284)
    at com.isomorphic.log.Logger.<init>(Logger.java:257)
    at com.isomorphic.base.ISCInit.<clinit>(ISCInit.java:422)
    I don't really understand where the issue is.

    Thank you in advance for your precious help.
    Regards
    Pascal

    #2
    What is the exact Smartclient version you are using?

    Comment


      #3
      Good Morning,
      Thanks for the answer, it's the version 12.0p_2018-10-18/Pro

      Comment


        #4
        Please show us the complete server startup log. Seems like logging system failed to initialize properly.

        Comment


          #5
          Hi,

          Ok, I will repeat my installation to generate logs for you.

          I can as well explain the context: we deploy the same app for more than 3 years without issues, on Tomcat8 and Tomcat9. I can deploy exactly the same .war on our Debian 9 and 10 servers without issues.

          For a new customer, I have to prepare a new server in the cloud provider Scaleway. They offer prepared servers with Debian9, 10 and 11. I've tried all these versions and got exactly the same exception at startup. Someone knowing GWT told me the MessagingWebSocketEndpoint certainly crashed due to network issue and then tried to log and was not able to log. Effectively, I don't thing we configured logs for smartClient nor GWT.

          The question could be: What is the code at MessagingWebSocketEndpoint.java:52 to know what I miss in the server configuration to make it working?

          I will prepare logs and send it here soon.
          Kind Regards
          Attached Files
          Last edited by integration@proactive.swiss; 30 Sep 2021, 22:38. Reason: Here are complete logs

          Comment


            #6
            And here is a log of a working startup
            Attached Files

            Comment


              #7
              Thank you for the logs, although it is still unclear how things end up with an NPE. MessagingWebSocketEndpoint.java:52 is calling the ISCInit.go(), same would be called if the InitListener would be installed as described here.

              Comment


                #8
                So.. if I understand well, the only way to really know what happens is to configure logs for ISC?

                In between, I could reproduce the case in most of Debians, Ubuntus environment.. then it's more related to my .war, working on some older sytem than a problem of Debian 11.

                If you could give me a simple tip to configure the logging I would be glad.

                Comment


                  #9
                  And but looking into the web.xml, I see some deprecated issues (see screenshot), so I've decided to follow the tutorial and replace this config by adding the listener in the web.xml

                  <listener>
                  <listener-class>com.isomorphic.base.InitListener</listener-class>
                  </listener>
                  Unfortunetely it does not correct the issue.. I have exactly the same error at startup.
                  Attached Files
                  Last edited by integration@proactive.swiss; 5 Oct 2021, 01:42.

                  Comment


                    #10
                    We can close this thread, I found the solution. This was due to log4j library. Tomcat could not load log4j due to conflicts in several log4 libraries.. I've had to exclude one log for, like that:

                    compile ":spring-security-rest:1.5.2",{
                    excludes 'log4j-over-slf4j'
                    }
                    Thank you for your support.
                    Regards
                    Pascal

                    Comment

                    Working...
                    X