OPENMRS_DB_SERVER unknown host error when running any report in Bahmni v0.78

I’ve set up bahmni 0.78 with vagrant. Every report only gives back an empty page. In the logfile I see this errors:

java.net.UnknownHostException: $OPENMRS_DB_SERVER

and

2016-01-26 09:20:24,667 INFO  [bahmnireports][org.bahmni.webclients.openmrs.OpenMRSLoginAuthenticator] Executing request: GET http://$OPENMRS_DB_SERVER:8080/openmrs/ws/rest/v1/session HTTP/1.1
2016-01-26 09:20:25,172 ERROR [bahmnireports][org.bahmni.reports.util.ConceptUtil] org.bahmni.webclients.WebClientsException: java.net.UnknownHostException: $OPENMRS_DB_SERVER: Name or service not known
2016-01-26 09:20:25,172 ERROR [bahmnireports][org.bahmni.reports.web.MainReportController] Error running report
java.lang.RuntimeException: org.bahmni.reports.util.ConceptDataTypeException: java.net.UnknownHostException: $OPENMRS_DB_SERVER: Name or service not known

But in /opt/bahmni-reports/etc/bahmni-reports.conf the variable OPENMRS_DB_SERVER is set to “localhost” also tried to “export” the variable in that config file, without any luch

Hi @arturneumann Thanks for pointing us to an issue. This is a defect and I fixed it now. It will take sometime for us to push these changes in bintray. Meanwhile, what you can just update the file /opt/bahmni-reports/etc/bahmni-reports.properties as per the commit here

Thank you.

@bharatak – does this also mean we need to publish a new vagrant box on atlas?

Regards Gurpreet

@gsluthra Once the updated bahmni-reports RPM is available on bintray, people can remove and install the RPM using the following commands

yum remove -y bahmni-reports yum install -y bahmni-reports.

Having said that, we will publish the new Vagrant box with the updated bahmni-reports rpm available by default.

Thank you @bharatak it does work now. But now we have 2 places to configure the values. bahmni-reports.properties & bahmni-reports.conf The .conf file is used in ./etc/run-liquibase.sh & ./bin/bahmni-reports Do you want me to try to change this shell scripts so they also would use .properties file and make a PR?

:worried:

Hi guys, I have configured Bahmni in Centos successfully but I cannot preview even a single report. I keep getting Apache 404 error. I checked the logs and this is what i got

Mar 06, 2016 8:32:03 PM org.apache.coyote.AbstractProtocol startINFO: Starting ProtocolHandler [“http-nio-8083”]2016-03-06 20:36:52,944 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name 'dispatcher’2016-03-06 20:37:06,672 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/reports] in DispatcherServlet with name 'dispatcher’2016-03-06 20:37:11,175 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name 'dispatcher’2016-03-06 20:37:21,364 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name 'dispatcher’2016-03-06 20:37:30,560 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name 'dispatcher’2016-03-06 20:37:41,588 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name 'dispatcher’2016-03-06 20:38:33,296 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name 'dispatcher’2016-03-06 20:39:14,732 WARN [bahmnireports][org.springframework.web.servlet.PageNotFound] No mapping found for HTTP request with URI [/bahmnireports/null] in DispatcherServlet with name ‘dispatcher’

I reinstalled bahmni reports several times with no luck

will appreciate any helpThanks

Its been a long. Just wanted to check back if you were able to get Bahmni reports to run or not. If not, can you try on the latest version of Bahmni?