404 when spooling up d2 cluster

I am trying the new d2 cli at DHIS2 CLI by running:

d2 cluster up 2.32.0 --db-version 2.32 --seed --port 8888

However when I browse to http://localhost:8888 I get a 404. What am I doing wrong? I have unsuccessfully tried 2.33 as well.

OS: OSX 10.15.5
Docker Desktop: 2.3.0.4

http://localhost:8888 generates 302 Moved Temporarily redirect to http://localhost:8888/dhis-web-dashboard which returns 404

Hi greg,

You can see the log output from the cluster by running d2 cluster logs 2.32.0, likely that will shed more light on the issue. This usually indicates that the DHIS2 core failed to start up. If you copy any relevant errors here we can help to debug the problem.

You can also see the current status of each container in the cluster by running d2 cluster status 2.32.0, in case the container is not running for some reason.

I’m having a similar problem with:

d2 cluster up 2.35.0 --db-version 2.35 --seed

Running d2 cluster status 2.35.0 indicates it is up and running. The log file includes errors about not having permission to create dhis.log. Output from log file is below. Any assistance is greatly appreciated!

d2 cluster logs 2.35.0 | grep ‘ERROR|SEVERE’

Reading logs from cluster version 2.35.0
db_1 | 2021-05-25 15:25:47.730 UTC [64] ERROR: canceling autovacuum task
db_1 | 2021-05-25 15:27:30.183 UTC [30] ERROR: extension “postgis” already exists
db_1 | 2021-05-25 15:56:56.344 UTC [29] ERROR: extension “postgis” already exists
core_1 | 25-May-2021 15:27:13.121 SEVERE [Catalina-startStop-1] org.apache.catalina.startup.HostConfig.beforeStart Unable to create directory for deployment: [/usr/local/tomcat/conf/Catalina/localhost]
core_1 | 2021-05-25 15:27:23,237 localhost-startStop-1 ERROR Unable to create file dhis.log java.io.IOException: Permission denied
core_1 | 2021-05-25 15:27:23,245 localhost-startStop-1 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@3839f5e7] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@3b8027f[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@3839f5e7] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@3b8027f[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]]
core_1 | 2021-05-25 15:27:23,246 localhost-startStop-1 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
core_1 | 2021-05-25 15:27:23,252 localhost-startStop-1 ERROR Null object returned for RollingFile in Appenders.
core_1 | 2021-05-25 15:27:31,328 localhost-startStop-1 ERROR Unable to create file dhis.log java.io.IOException: Permission denied
core_1 | 2021-05-25 15:27:31,331 localhost-startStop-1 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@3839f5e7] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@7051483d[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@3839f5e7] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@7051483d[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]]
core_1 | 2021-05-25 15:27:31,334 localhost-startStop-1 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
core_1 | 2021-05-25 15:27:31,340 localhost-startStop-1 ERROR Null object returned for RollingFile in Appenders.
core_1 | * ERROR 2021-05-25T15:27:31,938 Context initialization failed (ContextLoader.java [localhost-startStop-1])
core_1 | 25-May-2021 15:27:31.950 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
core_1 | 25-May-2021 15:27:31.964 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
core_1 | 25-May-2021 15:56:39.266 SEVERE [Catalina-startStop-1] org.apache.catalina.startup.HostConfig.beforeStart Unable to create directory for deployment: [/usr/local/tomcat/conf/Catalina/localhost]
core_1 | 2021-05-25 15:56:48,710 localhost-startStop-1 ERROR Unable to create file dhis.log java.io.IOException: Permission denied
core_1 | 2021-05-25 15:56:48,720 localhost-startStop-1 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@10bd30c8] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@77764a7d[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@10bd30c8] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@77764a7d[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]]
core_1 | 2021-05-25 15:56:48,723 localhost-startStop-1 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
core_1 | 2021-05-25 15:56:48,731 localhost-startStop-1 ERROR Null object returned for RollingFile in Appenders.
core_1 | 2021-05-25 15:56:57,753 localhost-startStop-1 ERROR Unable to create file dhis.log java.io.IOException: Permission denied
core_1 | 2021-05-25 15:56:57,758 localhost-startStop-1 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@10bd30c8] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@75ff81ea[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory@10bd30c8] unable to create manager for [dhis.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData@75ff81ea[pattern=dhis.log%i, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[SizeBasedTriggeringPolicy(size=26214400)]), strategy=DefaultRolloverStrategy(min=1, max=3, useMax=true), advertiseURI=null, layout=* %-5p %d{ISO8601} %m (%F [%t])%n %X{sessionId}, filePermissions=null, fileOwner=null]]
core_1 | 2021-05-25 15:56:57,760 localhost-startStop-1 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
core_1 | 2021-05-25 15:56:57,765 localhost-startStop-1 ERROR Null object returned for RollingFile in Appenders.
core_1 | * ERROR 2021-05-25T15:56:58,509 Context initialization failed (ContextLoader.java [localhost-startStop-1])
core_1 | 25-May-2021 15:56:58.520 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
core_1 | 25-May-2021 15:56:58.530 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

Welcome to the community @jarathomas! What OS are you using? Docker version?

Updates?

sudo apt-get update
sudo apt-get upgrade

Try this first:

sudo systemctl start docker

And maybe this:

sudo apt-get autoremove

I would recommend is to go through DHIS2 in Docker | DHIS2 Developer Portal and make sure all the configurations are correct.

I am no way the expert to help, but I am trying to give you initial support. I am sure @austin is the one to help you with this.