Sorry I don’t have the solution - I am just glad to see that you managed to install the module in a 0.92 vagrant-based Bahmni instance. Which installation guide are you using? I am following this one and I am not succeding. The installation package is not openable and yum complains that it’s not a valid rpm.
Did you end up finding a solution to the errors?
Best regards
Khobatha Setetemela
National University of Lesotho
Yes i was able to set up the module. I also noticed there is an issue with the installation package but you can sort that out by building the package from this link and then follow these steps.
Thank you much for the response - highly appreciated.
I eventually managed to install the package by building it from scratch.
I then followed the configuration steps on the link you shared.
However, when I attempt to load the module, it fails with a “Down for maintenance” error message. I have restarted the service several times and checked my configuration settings multiple times to no avail. I even removed the package and re-installed and re-configured but it still doesn’t load the module home page as I see it did for you.
I am attaching (please see below) the following screenshot for your information:
Maintenance error screen
dhis-integration.yml
extension.json
May I kindly ask you to show me your similar settings?
Please share the complete error log in “cd /var/log/dhis-integration”. Also, Please check the path to your repors url (In your dhis-intergration.yml) again you might have missed something on that.
Other considerations:
Make sure that you have the “dhis-integration.jar” and not “dhis-integration-1.0-SNAPSHOT.jar” in your " /opt/dhis-integration/bin/" folder. For some reasons it doesn’t work with the Snapshot.
Make sure that you are using a secure URL to access the dhis2-module. i.e a valid ssl.
Let me know also if you have already created the root folders i.e “/dhis-integration-data” and “/dhis-integration/”
I have done as your advised but I am still not succeeding. Infact, I autoremoved the package and started everything from scratch but it still lands at the same problem (maintenance page).
I am sorry to overwhelm you with many screenshots. Please see a picture of my configuration in the attached screenshots:
I have confirmed that I have a “dhis-integration.jar” in the bin folder
I am using secure URLs to access the dhis2-module
I have attempted to make sure my settings in the .yml file are correct
I have checked the httpd server log files and they suggest that the service is not available (please see attached screenshot)
I am not sure what I am missing.
NB:
-My instance is in vagrant
-I am using Bahmni v0.92
-The host OS is Ubuntu 18.04
Did you have to manually deploy the dhis-integration webapp in the root folder (/dhis-integration) or it was automatically deployed during installation? That is, copy the web page files into the folder? I manually copied the web pages from the repo into the root folder and this way, the service’s web UI loads successfully (see screenshot below) but quickly logs out with a “not authenticated” error message.
I am testing the service on a local instance that lacks a valid ssl certificate. However, all the URLs I am using to access the external DHIS2 server are https. Do you think this could be part of the problem?
I haven’t setup this module myself, but looking at your httpd logs, it seems your use of “localhost.localdomain” aren’t being resolved correctly. Maybe you can change the dhis-integration.yml configs to use “192.168.33.53” (your local machine IP) to try.
Please check the urls mentioned in dhis-integration.yml are all actually accessible from the machine running this service (maybe use curl, or telnet, etc to validate).
@khobatha you may need to use a secure domain name to send the data to your dhis2-instance. Please make sure that both the server and your instance are secured.
Also please share the content on the dhis-integration.yml (hide the passwords).
Both the DHIS2 server and my instance are secured. The server uses a standard ssl certificate and my instance uses a self-signed certificate.
The domain resolution issues were addressed. Plugin is now able to make connection to Bahmni services.
I have attached the following for your reference:
screenshot showing nature of the error ( MissingFormatArgumentException: looks exactly like what you once reported here)
dhis-integration.yml
dhis.log
NB: It seems like a formatting issue to me. Makes me think it has something to do with the incompatibility of calendars. My local instance is using the standard Gregorian calendar and the dhis-integration plugin is pre-built to use the Nepali calendar.
In your case there is some DB exception that is occuring, but the code is throwing a String.format( ) %s exception on this line (DatabaseDriver.java: 112):
If you see this line, the code on it is incorrect - because the format method bracket has been closed before the exception string was passed, and therefore format() method is throwing an error:
throw new DHISIntegratorException(String.format(Messages.SQL_EXECUTION_EXCEPTION), e);
This exception will get thrown (format error) ANY TIME someone has a DB exception, and the original exception won’t be visible.
I would request you to modify this line of code with this:
e.printStackTrace();
throw new DHISIntegratorException ("DB Exception occurred "+ e.getMessage(), e);
Rebuild the jar, and redeploy. Then you should be able to see the DB exception which is actually being caused.
Note: I think Possible team should also fix this minor bug because it will help people in future in debugging the issue when a DB exception arises. This error exists in next line of code also. Wherever String.format has been called with %s without a supporting parameter.
Hi @laxman - Thank you. I just checked: I am using a “superman” account with the following privileges. I still can’t commit anything to DHIS2 and the log file does not show any error messages.