Reports not working

Hi, I have the latest version of Bahmni installed on Digital Ocean. Everything work fine excepts for the reports. Every time I try to run a report, I get the errors described in the attached file…error.pdf (351.9 KB)

Hi zoulouky, The stacktrace you share shows that reports is not able to connect to the database. “A ResourcePool could not acquire a resource from its primary factory or source.”. Since you mention that you are able to access other services fine, i think mysql database should be running fine. Searching for that error trace in this forum took me to another thread “A ResourcePool could not acquire a resource from its primary factory or source” error when running JUnit test where someone has suggested issues in connection url,etc. I am not sure why would that happen if the service is installed and started properly. So, Can you try restarting the bahmni-reports service and if that does not work may be try reinstalling it again? Running bahmni install command should be good enough to try the installation again.

Thanks. I will try that.

Hi @arjun and @zoulouky
I have exactly the same problem. I can’t access reports and I get the same error as attached by @zoulouky,. My problem is even much bigger because bahmni is in production here. Can you help me with other means other than installing again Thank you in advance.

Hi Gift, The stacktrace is common which basically says reports service is not able to connect to database, but the reasons could be different and many.

When you say bahmni is in production, do you mean that the reports were working on prod and they suddenly stopped working? If yes, did you change something prior to getting this issue like username/password or connection pool settings

have you tried restarting the service? Also can you if you are able to connect to bahmni_reports database in mysql using command line. (mysql -uroot -p bahmni_reports)

Dear @arjun Thanks for your reply Yes It was working fine, Since installation. But suddenly it has stopped, The changes we have made are like offbase; I have added new users, and just uploaded logo in OpenERP and OpenELIS

Yes I have tried restaring services to no avail. I have not tried connecting bahmni_reports database using mysql. Can you kindly guide me in doing that, and also alert me on what I shouldn’t touch. Iam really new to bahmni but I like it. Thanks.

Which all services did you try to restart? Did ‘service bahmni-reports restart’ work fine?

Have you done basic checks like memory/disk status when all the services are running? (you can do free -m for memory, and df -h for disk) Another way to check if basic rersources are insufficient is by stopping other services like openerp and openelis and restart reports service to see if then it works fine.

mysql -uroot -p bahmni_reports

Another thing you could try is restarting the mysql service and then restart reports to see if that helps. service mysqld restart

Would suggest doing this while users are not using the system to avoid disruptions.

Which all services did you try to restart? Did ‘service bahmni-reports restart’ work fine?

  • Yes I have done ,service bahmni-reports restart’ and it’s works fine but not able to access the reports

Have you done basic checks like memory/disk status when all the services are running? -No i haven’t checked,I can try using your suggestion as written free -m (for memory) and df -h (for disk), I hope it won’t harm the normal operations

Also I will try to restart mysql service Thanks.

Dear @arjun Iam still getting the same error What should be the problem

@arjun We can use team viewer to solve my problem. Please help me I am so critical with this.

Hi Gift, I am occupied with some other work, i am afraid i won’t be able to spend dedicated time to this as of today, at least. Can you put list of all the commands that you have tried so far in exact sequence to troubleshoot and the outputs that you have got from that? May be mine or other set of eyes from the community will be able to catch something.

ok. I will try to analyse my problem

Sure, btw i meant putting those details here.

Ok. I have managed to get the solution. So in my installation atomfeed-console wasn’t installed and not running. I did the following

  1. Open local.yml file in /opt/bahmni-installer/bahmni-playbooks
  2. added the word ‘localhost’ just under the line [atomfeed-console] and also under the line [bahmni-reports db]
  3. Run bahmni install again And everything went fine.

Thank you all for your valuable contributions

NB: @arjun can you share you email please

Glad to know that you have managed to get this working finally. As i understand the main thing that was missing was the installation of bahmni-reports db. And adding the localhost under bahmni-reports db, did the job for you. Logically i don’t think it has got anything to do with atomfeed-console. Even if you don’t install it, reports would work just fine. Had you checked this like i had mentioned in one of the previous threads, you would have caught it [quote=“arjun, post:7, topic:13303”] mysql -uroot -p bahmni_reports [/quote]

Though i don’t understand this part. If the reports db was not installed i would think that reports should not have worked right from the beginning. Anyway, good that you have got it working.

I have messaged you separately.