Migration 2.37 to 2.38

Hello,

I’m trying to migrate 2.37 to 2.38, everything seems to be OK in logs, but I got 404 not found in browser.

Dec 29 11:16:40 training tomcat9[57564]: Deployment of web application directory [/var/lib/tomcat9/webapps/training] has finished in [13,724] ms
Dec 29 11:16:40 training tomcat9[57564]: Starting ProtocolHandler ["http-nio-8080"]
Dec 29 11:16:40 training tomcat9[57564]: Server startup in [18,001] milliseconds
Dec 29 11:17:35 training systemd[1]: Stopping Apache Tomcat 9 Web Application Server...
Dec 29 11:17:35 training tomcat9[57564]: Pausing ProtocolHandler ["http-nio-8080"]
Dec 29 11:17:35 training tomcat9[57564]: Stopping service [Catalina]
Dec 29 11:17:35 training tomcat9[57564]: Stopping ProtocolHandler ["http-nio-8080"]
Dec 29 11:17:35 training tomcat9[57564]: Destroying ProtocolHandler ["http-nio-8080"]
Dec 29 11:17:36 training systemd[1]: tomcat9.service: Succeeded.
Dec 29 11:17:36 training systemd[1]: Stopped Apache Tomcat 9 Web Application Server.
-- Reboot --
Dec 29 11:18:05 training systemd[1]: Starting Apache Tomcat 9 Web Application Server...
Dec 29 11:18:05 training systemd[1]: Started Apache Tomcat 9 Web Application Server.
Dec 29 11:18:06 training tomcat9[283]: 2022-12-29 11:18:06.644 INFO  org.glowroot - Glowroot version: 0.13.6, built 2020-03-01 01:25:31 +0000
Dec 29 11:18:06 training tomcat9[283]: 2022-12-29 11:18:06.646 INFO  org.glowroot - Java version: 1.8.0_352 (Private Build / Linux)
Dec 29 11:18:06 training tomcat9[283]: 2022-12-29 11:18:06.647 INFO  org.glowroot - Java args: -XX:+UseG1GC -XX:MaxGCPauseMillis=1500 -XX:GCTimeRatio=9 -javaagent:/opt/glowroot/glowroot.jar
Dec 29 11:18:10 training tomcat9[283]: 2022-12-29 11:18:10.628 INFO  org.glowroot - UI listening on 127.0.0.1:4000 (to access the UI from remote machines, change the bind address to 0.0.0.0, either in the Glowroot UI under Configuration > Web or directly in the admin.json file, and then restart JVM to take effect)
Dec 29 11:18:10 training tomcat9[283]: Match [Server/Service/Engine/Host] failed to set property [xmlValidation] to [false]
Dec 29 11:18:10 training tomcat9[283]: Match [Server/Service/Engine/Host] failed to set property [xmlNamespaceAware] to [false]
Dec 29 11:18:10 training tomcat9[283]: Match [Server/Service/Engine/Host/Valve] failed to set property [remoteIpProxiesHeader] to [x-forwarded-by]
Dec 29 11:18:10 training tomcat9[283]: Initializing ProtocolHandler ["http-nio-8080"]
Dec 29 11:18:10 training tomcat9[283]: Server initialization in [377] milliseconds
Dec 29 11:18:10 training tomcat9[283]: Starting service [Catalina]
Dec 29 11:18:10 training tomcat9[283]: Starting Servlet engine: [Apache Tomcat/9.0.31 (Ubuntu)]
Dec 29 11:18:10 training tomcat9[283]: Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml]
Dec 29 11:18:10 training tomcat9[283]: The path attribute with value [/host-manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has been ignored
Dec 29 11:18:12 training tomcat9[283]: 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.
Dec 29 11:18:12 training tomcat9[283]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/host-manager.xml] has finished in [1,355] ms
Dec 29 11:18:12 training tomcat9[283]: Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml]
Dec 29 11:18:12 training tomcat9[283]: The path attribute with value [/manager] in deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has been ignored
Dec 29 11:18:13 training tomcat9[283]: 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.
Dec 29 11:18:13 training tomcat9[283]: Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/manager.xml] has finished in [964] ms
Dec 29 11:18:13 training tomcat9[283]: Deploying web application directory [/var/lib/tomcat9/webapps/training]
Dec 29 11:18:25 training tomcat9[283]: 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.
Dec 29 11:18:25 training tomcat9[283]: One or more Filters failed to start. Full details will be found in the appropriate container log file
Dec 29 11:18:25 training tomcat9[283]: Context [/training] startup failed due to previous errors
Dec 29 11:18:25 training tomcat9[283]: Deployment of web application directory [/var/lib/tomcat9/webapps/training] has finished in [12,205] ms
Dec 29 11:18:25 training tomcat9[283]: Starting ProtocolHandler ["http-nio-8080"]
Dec 29 11:18:25 training tomcat9[283]: Server startup in [14,587] milliseconds

Sorry to hear that @didate!

What do you think could be the reason? Could you share more about the environment settings (Java, postgresql…etc versions)?

Did you try to check if the port is used by another application? Maybe changing ports will resolve the issue?

Hello @Gassim

I don’t know what happening

It was working fine with 2.37 version.

I’ve just run dhis2-deploy-war with the link of the 2.38 version.

I note that the restart of the instance is too fast. And there are not enough logs like in previous versions. is this normal?

I will share env settings soon.

1 Like

Hi @didate ,

From the logs it looks like you are using Java 8, whereas 2.38 requires Java 11 (see upgrade notes).
Remember that you should always read the upgrade notes for all versions between your current version and target version to make sure you are aware of any key changes or new requirements.

I hope that helps,
Phil

P.S. Unfortunately it was not possible for us to add a log message to clearly highlight the error with the Java version, as you need to already be using Java 11 in order to get any of the logs from DHIS2 itself.

1 Like

Oh Yes thank you @phil , my lxc container was on java 8. It’s working perfectly after migrate to java 11.

I suggest to add if possible to https://releases.dhis2.org the requirements of Java and PostgreSQL.

Thank you @phil and @Gassim

1 Like

@didate

We do note the requirements in a couple of places (upgrade notes and documentation), but we are planning to update the releases (and downloads) pages a little and your idea of indicating system requirements in those places is something I will consider. Thanks!

1 Like

What if I am experiencing the same log errors but I am indeed running java 11?

image

I am updating from 2.37.9 to 2.38.3

Tomcat 9
Windows 10
Postgres 12

Hi @lillian1n2 ,

Sorry for the slow response - I didn’t see your post before now.

From the log you posted it is clear to see that the environment you are running DHIS2 in is using Java 8.
image

I suspect the JAVA_HOME is set somewhere in your tomcat configuration, and should be updated to point to Java 11 instead.

Kind regards,
Phil

1 Like

Thanks @phil! The JAVA_HOME variable is set on the Environmental Variables on the Windows environment and mine was set to the path to JRE rather than JDK.

What is tomcat supposed to take as the JVM? JRE or JDK?

image

Hi @lillian1n2

Either JRE or JDK should work. The JRE is sufficient for running the application, whereas the JDK is necessary for developing the application (compiling, debugging, etc).

But, whichever you use, you will need Java 11, and in your screenshot you are using Java 8.

Kind regards,
Phil

1 Like