← Back to team overview

dhis2-users team mailing list archive

Re: Data Store Issue in DHIS2 [2.26]

 

Yes. It is good approach thanks for comment i will make seprate user for this.

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
Sent: Wednesday, April 26, 2017 12:50:01 AM
To: Muhammad Bilal Siddqui
Cc: Em Le Hong; DHIS 2 Users list
Subject: Re: [Dhis2-users] Data Store Issue in DHIS2 [2.26]

One small comment on the dhis.conf file, which I know is a distraction from the original question.

It is not a good idea in production for the application to connect to the database using the postgres user.  If the application is hacked (as has happened more than once - recently with the struts vulnerability) then an attacker could get access to the dhis.conf file.  To minimize the damage you don't want to be giving away the database superuser credentials.

A better practice is to create a database user which only has access to this database.  And put that user's name and password in the conf file.

But good that you got the database connection working properly :-)

On 25 April 2017 at 18:38, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Yes you are right i miss this
connection.dialect = org.hibernate.dialect.PostgreSQLDialect

Now i am able to add OrgUnit .

Thanks alot for help me out.

On Tue, Apr 25, 2017 at 10:01 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
Yes, you have to define it in dhis.conf file.
See example from the file that I have sent to you or copy the configuration below. DhisH2 database may cause an issue with the strange error.



# Hibernate SQL dialect
connection.dialect = org.hibernate.dialect.PostgreSQLDialect

# JDBC driver class
connection.driver_class = org.postgresql.Driver

# Database connection URL
connection.url = jdbc:postgresql:databaseName

# Database username
connection.username = postgres

# Database password
connection.password = postgresPasswordHere

# Database schema behavior, can be validate, update, create, create-drop
connection.schema = update

# Encryption password (sensitive)
encryption.password = 1

On Tue, Apr 25, 2017 at 11:55 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
How do I set database type? Should it define in dhis.conf file?

On Tue, Apr 25, 2017 at 9:53 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
The database should be pointed to Postgres, look at play demo server, the last row

[Inline image 1]

On Tue, Apr 25, 2017 at 11:50 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
1 important thing, I just realize that you database type is DhisH2, it's not postgres which should be, you can compare with play server
[Inline image 1]

On Tue, Apr 25, 2017 at 11:44 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
I just logged into your server, it's really strange, since it works properly on my laptop and dhis2 play server. Can you delete all dhis folder in your tomcat/webapp folder, try to download latest war file and run it again.

On Tue, Apr 25, 2017 at 11:35 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Hi

Thanks for providing blank DB. After importing this my application started but again in organisation unit I am not able to add organisation it shows same error. ERROR: null value in column "organisationunitid" violates not-null constraint


On Tue, Apr 25, 2017 at 8:17 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
Hi,

I just created 1 blank instance on my laptop, I give you the backup of its. You can try to restore it with any testing instance that running DHIS2 2.26. (Remember that when you restore this database, it will completely cover your old database, so make sure that you have a backup of your database, otherwise you can't recover it).

I created 1 orgUnit in this database called Global, you can change it later. It's working fine on my laptop, hope you can run it.

[Inline image 1]

On Tue, Apr 25, 2017 at 10:02 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Yes.

I am using dhis.conf file.

I have to change because i am using 2 instance of DHIS one with name dhis and other with lhs so i had to change 2nd one to LHS_HOME.

Although i have facing same error on both when creating orgUnit

On Tue, Apr 25, 2017 at 7:58 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
you can change the war file name, but the variable name should be DHIS2_HOME and make sure that you use dhis.conf file (not the hibernate.properties file).

On Tue, Apr 25, 2017 at 9:55 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
I am using war file.

its name lhs.war
and using LHS_HOME varible instead of DHIS2_HOME

On Tue, Apr 25, 2017 at 7:45 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
How did you run it? Did you download the war file from dhis2.org<http://dhis2.org> and run it with tomcat server or you just download the dhis2 live package?

On Tue, Apr 25, 2017 at 9:37 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Hi.

I tried as you suggested I check some tables in DB created. But application failed to start.

I attached log files. It shows error about DB.

On Tue, Apr 25, 2017 at 3:01 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Ok. Thank you. I will try that.

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>>
Sent: Tuesday, April 25, 2017 2:59:44 PM

To: Muhammad Bilal Siddqui
Subject: Re: [Dhis2-users] Data Store Issue in DHIS2 [2.26]

in postgresSQL, create a database, then run it with your instance, it will automatically generate all tables for you.

On Tue, Apr 25, 2017 at 4:56 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Can you tell me how to create db?
Just i stop server and make db. And start server again. All table in db should generate automatically? Or i need to create all tables?

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>>
Sent: Tuesday, April 25, 2017 2:47:42 PM
To: Muhammad Bilal Siddqui

Subject: Re: [Dhis2-users] Data Store Issue in DHIS2 [2.26]

Hi,

I guess you download a copy database from dhis2.org<http://dhis2.org> site and modified something, there's some wrong with database. The orgUnit from demo server has 2 attributes: HR identifier and NGO ID, I removed it from your server, but it still doesn't work.

My suggestion is that you need to create a blank database on 2.26 and import all metadata (orgUnit...) into the new server.

Hope this work for you.

Sincerely,

On Tue, Apr 25, 2017 at 4:12 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Hi
http://45.33.45.176:8080/lhs/

user admin
pass district

you can check with this account


On Tue, Apr 25, 2017 at 1:51 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
Hi,

If your server is online, is it possible to give me one account, I will login and check for you.

On Tue, Apr 25, 2017 at 3:38 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Actually there are some OrgUnits. I select 1 as parent but it still showing that error.

Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>>
Sent: Tuesday, April 25, 2017 1:30:41 PM
To: Muhammad Bilal Siddqui
Cc: Knut Staring; DHIS 2 Users list
Subject: Re: [Dhis2-users] Data Store Issue in DHIS2 [2.26]

I guess you are missing parent orgUnit, you need to create it as root orgUnit if there's no orgUnit exist in your database.

On Tue, Apr 25, 2017 at 3:10 PM, Muhammad Bilal Siddqui <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
Thanks for response. I check console it show me following error
null value in column "organisationunitid" violates not-null constraint

console screenshot attached

On Tue, Apr 25, 2017 at 11:26 AM, Knut Staring <knutst@xxxxxxxxx<mailto:knutst@xxxxxxxxx>> wrote:
Please look for error messages in your browser console and your Tomcat log.

Regards,
Knut

On Apr 25, 2017 6:13 AM, "Muhammad Bilal Siddqui" <m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>> wrote:
HI,

I have set up DHIS2 on my server successfully all is working fine with demo DB then I connect different empty db and also try in demo db but i am not able to add Organisation unit. it gives me following error.
failed_to_save_organisation_unit

Any thoughts what went wrong. Am using chrome browser
DHIS2 Version 2.26
PostgresSQL Version 9.4.10



--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp




--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp




--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>








--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>








--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>








--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>








--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>








--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
--
Regards
Muhammad Bilal Siddiqui

MicroMerger (Pvt.) Ltd.
Office No-104 Cubator 1ne
CIIT, Park Road, Chak Shehzad
Islamabad.
Pakistan 44000

C : +923325694928  P : +92518444777
E : m.bilalsiddqui@xxxxxxxxxxxxxxx<mailto:m.bilalsiddqui@xxxxxxxxxxxxxxx>  W : www.micromerger.com<http://www.micromerger.com/>
[http://www.micromerger.com/images/logo.png]
This e-mail and any files transmitted with it are confidential to the intended recipient and may be privileged. If you are not the intended recipient, please immediately notify the sender. Whilst we have used Anti-Virus software to alert us to the presence of computer viruses, we cannot guarantee that this email and any files transmitted with it are free from them.
N : Think before print do you really need this on paper. thanks

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp


PNG image

PNG image

PNG image


References