Problem in loading Bahmni reports

Hi I have problem in loading the Bahmni reports “type”:“MRSGeneric”, i can able to generate the report till 15th Dec 2018 after that nothing in the report. If i run the query from back end its working fine, please help us with this.

Odd. Did you pull any update or installed a higher version or done backup restore? have you done any infrastructure change? Can you check the log “/var/log/bahmni-reports/bahmni-reports.log”?

@angshuonline, i didnt make any upgrade on the system. bahmni-reports log

That much log will not be sufficient. Is there anything you have done for the reports user? like changed privileges or roles? Can you try login as superman/admin and checking

we didn’t make any changes in the bahmni users. tried with superman user same issue, “ERPGeneric” reports are working fine.

Can you upload the bahmni-reports.log to pastebin or so? (Please make sure that you don’t have sensitive info in there - like password, username etc)

bahmni report log

Not much help from the log, other than error on the database connection pool. Have yo tried restarting the bahmni-reports service

service bahmni-reports restart

Yes, tried restarting bahmni service.

I am running out of ideas. At this point, whatever little information and the log that I can see, I am assuming its a connection issue.

  • Have you tried doing a custom SQL report? say print local names from OpenMRS.

select name from location;

If you are able to get that report, then we can rule out a database connection issue. If it gives you problem, then we will have to check other logs and possibly try with another user account.

Some of the reports are custom SQL report, i can get the result by running the query directly.

If you mean, you are experiencing the same problem with custom SQL report, then the problem is surely due to connection to database, and not on MRSGeneric report.

Can you check the credentails used for mysql openmrs database in “/opt/bahmni-reports/etc/”? (property: openmrs.username)

Instead of logging using root, trying login using the user and password mentioned in the above file?

also check the grants for the user specified in the properties file (I don’t think thats a problem though)

mysql -uroot -p(password) openmrs

show grants for “openmrs-user”@“localhost”;

If not, then we have to check other parameters on mysql prompt

SHOW VARIABLES LIKE “max_connections”;

#show current connections

show status where variable_name = “Threads_connected”;

1 Like

i can able to login with the credentials which mentioned in the above file openmrs.username= user openmrs.password= pass

please don’t mention passwords in open forum.

I think we will have to further debug/check the logs to figure out whats wrong?

Can you afford to restart mysql service? it will mean that you have to restart the services again.

  • service mysqld stop

  • service mysqld start

  • service openmrs restart

  • service bahmni-reports restart

Hi , i have restarted above mentioned services, still the problem remains the same. As i mentioned above i can still generate the report till 15-12-2018, however the report after 15-12-2018 cannot be generated.

I looked at this issue offline with Kannan, and its resolved.

The key thing to remember is that reports usually run off the slave database so that regular CRUD operations on the master database are not affected by long-running queries. If there is no data from a certain date, and you have been using the system, it points to a mysql replication issue, which was the problem in this case.