Issue: DHIS2 WAR deployment fails on Tomcat 9:/ HTTP Status 404 – Not Found

Hi DHIS2 Community,

I am trying to deploy DHIS2 (nmdr.war) on Apache Tomcat 9 running on Ubuntu 22.04.
I am encountering the following issues:

  • Tomcat starts successfully, but the DHIS2 web application is not available.

HTTP Status 404 – Not Found


Type Status Report

Message The requested resource [/] is not available

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


Apache Tomcat/9.0.48

Any guidance is appreciated. Thank you.

Hi @dollhouse01

Thank you for your post. It appears that you are using nmdr.war as the WAR file name, which is typically not the official way because usually it’s either ROOT.war or dhis.war; however, if you’ve intentionally named the file nmdr then I supposed the configuration files where also updated accordingly.

The issue you are seeing is very generic (it just says that something is not setup properly) so we need the logs, as well as the Java version and the verison of the DHIS2 instance you are trying to setup. The newer versions require Java version 17.

Additionally, please share the Catalina.out logs (without the authentication/sensitive info).

Thank you!

Dear @Gassim ,

Please see details below.

=== DHIS2 Support Information ===

  1. Java Version:
    openjdk version “11.0.27” 2025-04-15
    OpenJDK Runtime Environment (build 11.0.27+6-post-Ubuntu-0ubuntu120.04)
    OpenJDK 64-Bit Server VM (build 11.0.27+6-post-Ubuntu-0ubuntu120.04, mixed mode, sharing)

  2. DHIS2 Version:

  3. Tomcat Version:
    Using CATALINA_BASE: /opt/tomcat9
    Using CATALINA_HOME: /opt/tomcat9
    Using CATALINA_TMPDIR: /opt/tomcat9/temp
    Using JRE_HOME: /usr
    Using CLASSPATH: /opt/tomcat9/bin/bootstrap.jar:/opt/tomcat9/bin/tomcat-juli.jar
    Using CATALINA_OPTS:
    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
    Server version: Apache Tomcat/9.0.48
    Server built: Jun 10 2021 09:22:01 UTC
    Server number: 9.0.48.0
    OS Name: Linux
    OS Version: 5.15.0-1084-aws
    Architecture: amd64
    JVM Version: 11.0.27+6-post-Ubuntu-0ubuntu120.04
    JVM Vendor: Ubuntu

  4. Operating System:
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 20.04.4 LTS
    Release: 20.04
    Codename: focal

  5. PostgreSQL Version:
    could not change directory to “/home/ubuntu”: Permission denied
    version


PostgreSQL 12.22 (Ubuntu 12.22-0ubuntu0.20.04.4) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0, 64-bit
(1 row)

  1. Catalina.out logs (last 200 lines):

Detected resolved migration not applied to database: 2.36.27.
To ignore this migration, set -ignoreMigrationPatterns=‘:ignored’. To allow executing this migration, set -outOfOrder=true.
Detected resolved migration not applied to database: 2.36.28.
To ignore this migration, set -ignoreMigrationPatterns='
:ignored’. To allow executing this migration, set -outOfOrder=true.
Detected resolved migration not applied to database: 2.36.29.
To ignore this migration, set -ignoreMigrationPatterns=‘:ignored’. To allow executing this migration, set -outOfOrder=true.
Detected resolved migration not applied to database: 2.36.30.
To ignore this migration, set -ignoreMigrationPatterns='
:ignored’. To allow executing this migration, set -outOfOrder=true.
Detected resolved migration not applied to database: 2.36.31.
To ignore this migration, set -ignoreMigrationPatterns=‘:ignored’. To allow executing this migration, set -outOfOrder=true.
Detected resolved migration not applied to database: 2.36.32.
To ignore this migration, set -ignoreMigrationPatterns='
:ignored’. To allow executing this migration, set -outOfOrder=true.
Detected resolved migration not applied to database: 2.36.33.
To ignore this migration, set -ignoreMigrationPatterns=‘*:ignored’. To allow executing this migration, set -outOfOrder=true.
Need more flexibility with validation rules? Learn more: Customize validation rules with ignoreMigrationPatterns - Redgate Flyway - Product Documentation
at org.flywaydb.core.Flyway.lambda$migrate$0(Flyway.java:146)
at org.flywaydb.core.FlywayExecutor.execute(FlywayExecutor.java:213)
at org.flywaydb.core.Flyway.migrate(Flyway.java:140)
at org.hisp.dhis.db.migration.config.DhisFlyway.migrate(DhisFlyway.java:54)
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.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1930)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1872)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
… 97 more
27-Mar-2026 15:34:10.294 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
27-Mar-2026 15:34:10.296 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/nmdr] startup failed due to previous errors

  • INFO 2026-03-27T15:34:10,300 De-registering jdbc driver: org.postgresql.Driver@38bc559 (StartupListener.java [main])
    27-Mar-2026 15:34:10.341 WARNING [main] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [nmdr]
    java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader ‘bootstrap’)
    at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2325)
    at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2300)
    at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1669)
    at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1597)
    at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:463)
    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.start(LifecycleBase.java:187)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:728)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1024)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1911)
    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:825)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1618)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:319)
    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:948)
    at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:835)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1388)
    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:921)
    at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:263)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardService.startInternal(StandardService.java:437)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:934)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
    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:345)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
    27-Mar-2026 15:34:10.348 INFO [main] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/opt/tomcat9/webapps/nmdr.war] has finished in [15,907] ms
    27-Mar-2026 15:34:10.348 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/manager]
    27-Mar-2026 15:34:10.374 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/manager] has finished in [26] ms
    27-Mar-2026 15:34:10.374 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/ROOT]
    27-Mar-2026 15:34:10.382 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/ROOT] has finished in [8] ms
    27-Mar-2026 15:34:10.383 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/docs]
    27-Mar-2026 15:34:10.391 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/docs] has finished in [7] ms
    27-Mar-2026 15:34:10.391 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/dr]
    27-Mar-2026 15:34:10.399 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/dr] has finished in [7] ms
    27-Mar-2026 15:34:10.399 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/host-manager]
    27-Mar-2026 15:34:10.409 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/host-manager] has finished in [10] ms
    27-Mar-2026 15:34:10.409 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/ROOTx]
    27-Mar-2026 15:34:10.417 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/ROOTx] has finished in [7] ms
    27-Mar-2026 15:34:10.417 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat9/webapps/examples]
    27-Mar-2026 15:34:10.496 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat9/webapps/examples] has finished in [79] ms
    27-Mar-2026 15:34:10.499 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8080”]
    27-Mar-2026 15:34:10.506 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [16121] milliseconds
    27-Mar-2026 16:33:43.981 INFO [http-nio-8080-exec-2] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in the request target [/api/me?fields=id,code,name,displayName,created,lastUpdated,birthday,education,gender,jobTitle,surname,firstName,introduction,employer,interests,languages,email,phoneNumber,nationality,deleted,userGroups[id,code,name,displayName,created,lastUpdated,deleted],userCredentials[username,userRoles[id,code,name,displayName,created,lastUpdated,deleted]],username,userRoles[id,code,name,displayName,created,lastUpdated,deleted] ]. The valid characters are defined in RFC 7230 and RFC 3986
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    27-Mar-2026 16:48:46.709 INFO [http-nio-8080-exec-4] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x000xee0x010x000x000xea0x030x038?_0x88:0xb2Ce)[0x8f0x85K!S[0x910x0er0xbc0x9d0xac=0xdbU0x9f0xba0x030x0fS0x820x1e ]. HTTP method names must be tokens
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    27-Mar-2026 16:51:46.392 INFO [http-nio-8080-exec-3] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in the request target [/api/me?fields=id,code,name,displayName,created,lastUpdated,birthday,education,gender,jobTitle,surname,firstName,introduction,employer,interests,languages,email,phoneNumber,nationality,deleted,userGroups[id,code,name,displayName,created,lastUpdated,deleted],userCredentials[username,userRoles[id,code,name,displayName,created,lastUpdated,deleted]],username,userRoles[id,code,name,displayName,created,lastUpdated,deleted] ]. The valid characters are defined in RFC 7230 and RFC 3986
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    27-Mar-2026 16:52:14.786 INFO [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in the request target [/api/me?fields=id,code,name,displayName,created,lastUpdated,birthday,education,gender,jobTitle,surname,firstName,introduction,employer,interests,languages,email,phoneNumber,nationality,deleted,userGroups[id,code,name,displayName,created,lastUpdated,deleted],userCredentials[username,userRoles[id,code,name,displayName,created,lastUpdated,deleted]],username,userRoles[id,code,name,displayName,created,lastUpdated,deleted] ]. The valid characters are defined in RFC 7230 and RFC 3986
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    27-Mar-2026 19:14:39.315 INFO [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x00{0x010x000x00w0x030x030xdd0xfb0xe80x190xbal_R0xe90xdc0x100x9c0xd2"0x9e5P0x8bW0xe70xed0x920xf60x8dyR0x12<d0xfe_40x000x000x1a0xc0/0xc0+0xc00x110xc00x070xc00x130xc00x090xc00x140xc00x0a0x000x050x00/0x0050xc00x120x000x0a0x010x000x0040x000x050x000x050x010x000x000x000x000x000x0a0x000x080x000x060x000x170x000x180x000x190x000x0b0x000x020x010x000x000x0d0x000x100x000x0e0x040x010x040x030x020x010x020x030x040x010x050x010x060x010xff0x010x000x010x00…]. HTTP method names must be tokens
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    27-Mar-2026 19:48:10.774 INFO [http-nio-8080-exec-9] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in the request target [/api/me?fields=id,code,name,displayName,created,lastUpdated,birthday,education,gender,jobTitle,surname,firstName,introduction,employer,interests,languages,email,phoneNumber,nationality,deleted,userGroups[id,code,name,displayName,created,lastUpdated,deleted],userCredentials[username,userRoles[id,code,name,displayName,created,lastUpdated,deleted]],username,userRoles[id,code,name,displayName,created,lastUpdated,deleted] ]. The valid characters are defined in RFC 7230 and RFC 3986
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    28-Mar-2026 05:20:31.010 INFO [http-nio-8080-exec-1] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in method name [0x160x030x010x00{0x010x000x00w0x030x030xcf!H0xdc!Vs0xb00x0dx=Z#k;'0xb20x090x880xd4G0xb90xd1W0x050xb9Q-0xe90x940x9a0x8f0x000x000x1a0xc0/0xc0+0xc00x110xc00x070xc00x130xc00x090xc00x140xc00x0a0x000x050x00/0x0050xc00x120x000x0a0x010x000x0040x000x050x000x050x010x000x000x000x000x000x0a0x000x080x000x060x000x170x000x180x000x190x000x0b0x000x020x010x000x000x0d0x000x100x000x0e0x040x010x040x030x020x010x020x030x040x010x050x010x060x010xff0x010x000x010x00…]. HTTP method names must be tokens
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:419)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)
    28-Mar-2026 08:08:38.543 INFO [http-nio-8080-exec-9] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
    Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
    java.lang.IllegalArgumentException: Invalid character found in the request target [/api/me?fields=id,code,name,displayName,created,lastUpdated,birthday,education,gender,jobTitle,surname,firstName,introduction,employer,interests,languages,email,phoneNumber,nationality,deleted,userGroups[id,code,name,displayName,created,lastUpdated,deleted],userCredentials[username,userRoles[id,code,name,displayName,created,lastUpdated,deleted]],username,userRoles[id,code,name,displayName,created,lastUpdated,deleted] ]. The valid characters are defined in RFC 7230 and RFC 3986
    at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:494)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:269)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    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)

Hi
Thanks for the info! Please what is the DHIS2 Version because it’s not written in your post, please see it might not have been copied:

Thanks!

HI @Gassim ,

thanks for swift response.

ls /opt/tomcat9/webapps/nmdr/WEB-INF/lib/ | grep dhis-service-core
dhis-service-core-2.40.9.jar

DHIS 2 version : dhis-service-core-2.40.9.jar.

here is dhis.conf

location: /opt/dhis2/dhis_conf

connection.driver_class = org.postgresql.Driver
connection.url = jdbc:postgresql:xxxxx
connection.username = xxxxxxx
connection.password =xxxxxxx

File store

filestore.provider = filesystem
filestore.container = files

Database schema

database.schema = public

/////

Hi, are you using virtualization? I had almost same problem, tomcat9 failed on start always. Till I move and run into Docker, now my dhis2 server on running .

1 Like

Hi
It seems that the versions are compatible which is good; however, I noticed that your current DHIS2 version is 2.40.9, may I ask if you have recently performed an upgrade? It seems that the issues you are facing are probably caused by upgrading from lower version to a higher version without following the ‘upgrade notes’.

First, please make a full DB backup including your current /nmdr.war and dhis.conf files.

Second, if you still have a full database backup, I would recommend to revert back to the original version and when upgrading from version to version, follow the upgrade steps. See ‘upgrade notes’ in #releases. The upgrade notes contain important steps for the admin to perform before upgrading to a higher version.

Third, the log shows many ‘invalid character’ errors, so you might also need to update your server.xml <Connector and add the line relaxedQueryChars="[]"

Please see if you can perform a sequential upgrade and follow the upgrade notes. If you no longer have the original backup before the upgrades. We will need further expert support as this is a critical migration issue which needs to be handled carefully (without deleting tables), see DHIS2 patch release 2.36.2 is now available - [HOT FIX] - #16 by Ameen .

Thanks!