Urgent. challenge in deploying dhis2.35.8 instance

Hey everyone am facing this challenge, i have installed the instance more than 4 times but i get same error, please help
ubuntu OS: 20.04 LTS
dhis2 version: 2.35.8
tomcat: tomcat 9
postgres : postgres 12
java version: java 11

Hi @ahly,
Please make sure you have given the right authorities when using the command sudo chown to the user dhis because the first error:

I wrote this command
" sudo chmod 600 dhis.conf"
inside the path cd /home/dhis/config

@ahly what kind of installation are you doing? Are you using ng tools. from the look of things you are using a normal installation.

1. Creating an Ubuntu user to run DHIS2
Create a new user called ‘dhis’ by invoking:
sudo useradd -d /home/dhis -m dhis -s /bin/false

Then set the password for the account by invoking:
sudo passwd dhis
Make sure you set a strong password

We are assume you have already created one.

2. Creating the configuration directory
sudo mkdir /home/dhis/config
Set ownership of the directory to ‘dhis’ user created above
sudo chown dhis:dhis /home/dhis/config

which you have already done we assume

3. Creating DHIS2 configuration file
sudo -u dhis nano /home/dhis/config/dhis.conf

which is giving you errors.

If you have done these steps correctly, you would not be having the errors.

if you want the file to be read by everyone

chmod 777 -R /home/dhis/config the entire folder
chmod 777 /home/dhis/config/dhis.conf file only.

1 Like

I hope this solves the issue for @ahly. Thank you @moses_mwale! (:

am using normal installation,
i think my mistake is to assign the user to the file, let me do this and will give the output

1 Like

hello it helped to give permission but still does not start, it just loads

No my friend, you have started several tomcat processes, that error you had has gone. What you need to do is kill all tomcat running. And start the server again. Run this command $

pkill -9 -f tomcat

Let’s start from here and see what other errors we will have then we resolve.

still loads
after writing this command and starting the server

or maybe I can use another way to install instance into the server instead of normal installation?

The instance is running now the issue is with the ports. Did you make any changes from defaults?

no i didnt make any change with the ports

Yeah still defaults. At this state the instance is running. Let’s see what happens when you access the instance

it loads, where did you put this configuration? did you also enable SSL?
If you are using this setup for production, you might as well consider using ngtools. But you are so close to making this instance work. would want to see what you have put in the dhis.conf and the server.xml

1 Like

dhis.conf.docx (11.1 KB)
server xml.docx (14.1 KB)