Tomcat error when starting DHIS2

Hello, I have DHIS2 (dhis2-stable-2.36.13.2.war) on Tomcat9 installed on an Ubuntu 22.04.5 machine with Java openjdk 11.

DHIS2 can’t start anymore.

This is Tomcat catalina.out :

<6>Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
<6>Command line argument: -Djava.awt.headless=true
<6>Command line argument: -Xms8g
<6>Command line argument: -Xmx12g
<6>Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
<6>Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
<6>Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
<6>Command line argument: -Dignore.endorsed.dirs=
<6>Command line argument: -Dcatalina.base=/home/dhis/tomcat-dhis
<6>Command line argument: -Dcatalina.home=/usr/share/tomcat9
<6>Command line argument: -Djava.io.tmpdir=/home/dhis/tomcat-dhis/temp
<6>Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
<6>APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
<6>APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
<6>OpenSSL successfully initialized [OpenSSL 3.0.2 15 Mar 2022]
<6>Initializing ProtocolHandler ["http-nio--1"]
**<2>Failed to initialize component [Connector[HTTP/1.1-auto-1]]**
<2>org.apache.catalina.LifecycleException: Protocol handler initialization failed
<2>    at org.apache.catalina.connector.Connector.initInternal(Connector.java:1049)
<2>    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
<2>    at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
<2>    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
<2>    at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1042)
<2>    at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
<2>    at org.apache.catalina.startup.Catalina.load(Catalina.java:724)
<2>    at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
<2>    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
<2>    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
<2>    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
<2>    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
<2>    at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
<2>    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
<2>Caused by: java.lang.IllegalArgumentException: port out of range:-1
<2>    at java.base/java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
<2>    at java.base/java.net.InetSocketAddress.<init>(InetSocketAddress.java:188)
<2>    at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:272)
<2>    at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:228)
<2>    at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1213)
<2>    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1226)
<2>    at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:603)
<2>    at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
<2>    at org.apache.catalina.connector.Connector.initInternal(Connector.java:1046)
<2>    ... 13 more
<2>
<6>Initializing ProtocolHandler ["http-nio-8091"]
<6>Server initialization in [242] milliseconds
<6>Starting service [Catalina]
<6>Starting Servlet engine: [Apache Tomcat/9.0.58 (Ubuntu)]
<6>Deploying web application archive [/home/dhis/tomcat-dhis/webapps/ROOT.war]

I checked in my server.xml, nothing is changed and the Connector port is still 8091.
My setenv.sh file is correct too.

Could anybody help please ?

Thank you

Please check the configuration in the server.xml file. What is the port there? Based on the log, the port is not 8091 but if it is then I’m not sure what’s going on.

Any recent system changes that might have caused this?

Thanks!