Dhis2 live installation on windows 10 laptop

I want to learn about DHIS2 more about DHIS2, i just enrolled into the fundamental course.
i have been trying to run the the live jar. version 2.29. but i keep running into the HTTP 503 error.

I am using A HP windows 10x64 bit, 4G RAM, with PostgreSQL 12.
i have followed you tube videos for older versions it didnt go well. and likewise i have gone through the slides to both of the 2011 and 2016 presentation from Knut. although my lack of familiarity to these coding processes is already a challenge .
DHIS2_HOME:C:\dhis2-live\dhis2-live\conf
JAVA_HOME:C:\Program Files\Java\jre1.8.0_221
JAVA_OPTS: -Xmx2048m -Xms512m -XX:MaxPermSize=500m -XX:PermSize=300m
C:\PostgreSQL\12\bin
C:\Program Files\Java\jre1.8.0_221\bin
C:\PostgreSQL\12\lib

Martin

1 Like

Hi @Martludex,

Welcome to the DHIS2 Community! Glad to have you aboard! Have you checked out the installation instructions shared here: Installing DHIS2 on a Windows Local Server? kindy check them out (including the links to the shared resources) and I also want to recommend you to use Version 2.32 since Version 2.29 was deprecated a while back.

Let me know if you need any more information and I will gladly help.

Best,
James.

@jomutsani,
Thank you for the previous instruction. You mean both Windows server and windows 10 can have the same configuration? older slides suggested not using Postgis, but the recent guides suggest that be installed. Remember i am installing for personal practice given that i dont have network where i am to practice till i get to town.
Thank you for the previous instruction, though i initially tried to use the 2.33 War files which also didnt end well for me: i got stuck with the HTTP 503 error. so i decided to use the dhis live 2.29 which was the only option of the live set up available.

Martin

1 Like

Hi @Martludex,

  • Yes, they can.

On the older slides, the DB used was MySQL but when the team migrated to PostgreSQL, it requires you to install PostGIS Extension.

Have you tried the version 2.32? you can download from the playstore or HERE

Check out more information from this thread and it’s links: Installing DHIS2 on a Windows Local Server

Let me know if you need more information.

Best,
James.

Hi @jomutsani,

I have made a headway, though i am still running into the HTTP 404 error.

aused by: org.postgresql.util.PSQLException: ERROR: out of shared memory
Hint: You might need to increase max_locks_per_transaction.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:266)
at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75)
at org.flywaydb.core.internal.jdbc.JdbcTemplate.executeStatement(JdbcTemplate.java:235)
at org.flywaydb.core.internal.sqlscript.StandardSqlStatement.execute(StandardSqlStatement.java:42)
at org.flywaydb.core.internal.sqlscript.DefaultSqlScriptExecutor.executeStatement(DefaultSqlScriptExecutor.java:189)

also these;

  • ERROR 2019-10-22 16:21:46,290 Migration of schema “public” to version 2.32.10 - Use bigint for id columns failed! Changes successfully rolled back. (Slf4jLog.java [main])
  • WARN 2019-10-22 16:21:46,290 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.security.acl.AclService’ defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/dhis/WEB-INF/lib/dhis-service-acl-2.32.2.jar!/META-INF/dhis/beans.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.SchemaService’ defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/dhis/WEB-INF/lib/dhis-service-schema-2.32.2.jar!/META-INF/dhis/beans.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.PropertyIntrospectorService’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.32.2.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:
    Migration V2_32_10__Use_bigint_for_id_columns.sql failed

SQL State : 53200
Error Code : 0
Message : ERROR: out of shared memory
Hint: You might need to increase max_locks_per_transaction.
Location : org/hisp/dhis/db/migration/2.32/V2_32_10__Use_bigint_for_id_columns.sql (C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\file:\C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\dhis\WEB-INF\lib\dhis-support-db-migration-2.32.2.jar!\org\hisp\dhis\db\migration\2.32\V2_32_10__Use_bigint_for_id_columns.sql)
Line : 808
Statement : alter table userrole alter column userroleid type bigint
(AbstractApplicationContext.java [main])

  • ERROR 2019-10-22 16:21:46,321 Context initialization failed (ContextLoader.java [main])
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.security.acl.AclService’ defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/dhis/WEB-INF/lib/dhis-service-acl-2.32.2.jar!/META-INF/dhis/beans.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.SchemaService’ defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/dhis/WEB-INF/lib/dhis-service-schema-2.32.2.jar!/META-INF/dhis/beans.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.PropertyIntrospectorService’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.32.2.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is org.flywaydb.core.internal.command.DbMigrate$FlywayMigrateException:
    Migration V2_32_10__Use_bigint_for_id_columns.sql failed

SQL State : 53200
Error Code : 0
Message : ERROR: out of shared memory
Hint: You might need to increase max_locks_per_transaction.
Location : org/hisp/dhis/db/migration/2.32/V2_32_10__Use_bigint_for_id_columns.sql (C:\Program Files\Apache Software Foundation\Tomcat 9.0\bin\file:\C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\dhis\WEB-INF\lib\dhis-support-db-migration-2.32.2.jar!\org\hisp\dhis\db\migration\2.32\V2_32_10__Use_bigint_for_id_columns.sql)
Line : 808
Statement : alter table userrole alter column userroleid type bigint

thanks for your Guide.

Martin

1 Like

i am downgrading to Postgres 11

1 Like

This is great progress @Martludex!

For this, You have to set “max_locks_per_transaction = 1024” in the /etc/postgresql/10/main/postgresql.conf file

Kindly check out these conversations:

  1. Problems in tomcat startup for fresh installation - #3 by Stian
  2. Issue to Upgrade from 2.31 to 2.32

Let us know if this helps.

Best,
James.

@jomutsani
Your Guide has been most enlightening, I appreciate alot.
Somehow i read similar stuffs like that from the log so i downgraded to 2.29 and it worked but reloading 2.32 didnt work. and i also saw in the log it made reference to your recommendation, coz it was asking for upgrade from 2.31 which i am going to download now.
The other issue i have is;

  1. my laptop is a 4G RAM what maximum locks can i set?
  2. For the JAVA_OPTS Environment variable can you suggest an optimized setting ?
1 Like