# Reports not working

**URL:** <https://talk.openmrs.org/t/reports-not-working/13303>\
**Category:** Bahmni\
**Created:** [September 13, 2017, 5:45pm UTC](https://talk.openmrs.org/t/reports-not-working/13303 "2017-09-13T17:45:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoulouky](https://talk.openmrs.org/user_avatar/talk.openmrs.org/zoulouky/32/1953_2.png) [@zoulouky](https://talk.openmrs.org/u/zoulouky)\
**Post date:** [September 13, 2017, 5:45pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/1 "2017-09-13T17:45:30Z")

</div>

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](https://talk.openmrs.org/uploads/default/original/2X/c/c0f9351a4e04cc2a08ada53b37f6219b41063588.pdf) (351.9 KB)

---

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_449c533f586939b6e5f246632a46421f.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [September 14, 2017, 12:00pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/2 "2017-09-14T12:00:29Z")

</div>

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](https://talk.openmrs.org/t/a-resourcepool-could-not-acquire-a-resource-from-its-primary-factory-or-source-error-when-running-junit-test/2785) 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.

---

<div class="post-metadata">

**Author:** ![zoulouky](https://talk.openmrs.org/user_avatar/talk.openmrs.org/zoulouky/32/1953_2.png) [@zoulouky](https://talk.openmrs.org/u/zoulouky)\
**Post date:** [September 14, 2017, 3:18pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/3 "2017-09-14T15:18:59Z")

</div>

Thanks. I will try that.

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 17, 2017, 7:24am UTC](https://talk.openmrs.org/t/reports-not-working/13303/4 "2017-09-17T07:24:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_449c533f586939b6e5f246632a46421f.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [September 20, 2017, 12:46pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/5 "2017-09-20T12:46:40Z")

</div>

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.

> [@mfugale](#):
>
> My problem is even much bigger because bahmni is in production here.

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

> [@mfugale](#):
>
> Can you help me with other means other than installing again

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)

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 20, 2017, 12:54pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/6 "2017-09-20T12:54:50Z")

</div>

Dear @arjunThanks 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.

---

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_449c533f586939b6e5f246632a46421f.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [September 20, 2017, 1:14pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/7 "2017-09-20T13:14:08Z")

</div>

> [@mfugale](#):
>
> Yes I have tried restaring services to no avail.

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.

> [@mfugale](#):
>
> I have not tried connecting bahmni\_reports database using mysql.Can you kindly guide me in doing that

`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.

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 20, 2017, 1:21pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/8 "2017-09-20T13:21:12Z")

</div>

**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.

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 28, 2017, 3:14pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/9 "2017-09-28T15:14:49Z")

</div>

Dear @arjunIam still getting the same error What should be the problem

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 29, 2017, 4:40am UTC](https://talk.openmrs.org/t/reports-not-working/13303/10 "2017-09-29T04:40:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_449c533f586939b6e5f246632a46421f.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [September 29, 2017, 9:52am UTC](https://talk.openmrs.org/t/reports-not-working/13303/11 "2017-09-29T09:52:29Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 29, 2017, 11:10am UTC](https://talk.openmrs.org/t/reports-not-working/13303/12 "2017-09-29T11:10:28Z")

</div>

ok. I will try to analyse my problem

---

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_449c533f586939b6e5f246632a46421f.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [September 29, 2017, 12:47pm UTC](https://talk.openmrs.org/t/reports-not-working/13303/13 "2017-09-29T12:47:44Z")

</div>

Sure, btw i meant putting those details here.

---

<div class="post-metadata">

**Author:** ![mfugale](https://talk.openmrs.org/letter_avatar/mfugale/32/6_449c533f586939b6e5f246632a46421f.png) [@mfugale](https://talk.openmrs.org/u/mfugale)\
**Post date:** [September 30, 2017, 7:03am UTC](https://talk.openmrs.org/t/reports-not-working/13303/14 "2017-09-30T07:03:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![arjun](https://talk.openmrs.org/letter_avatar/arjun/32/6_449c533f586939b6e5f246632a46421f.png) [@arjun](https://talk.openmrs.org/u/arjun)\
**Post date:** [October 2, 2017, 4:33am UTC](https://talk.openmrs.org/t/reports-not-working/13303/15 "2017-10-02T04:33:48Z")

</div>

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]

> [@mfugale](#):
>
> Yes It was working fine, Since installation. But suddenly it has stopped,

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.

> [@mfugale](#):
>
> NB: @arjun can you share you email please

I have messaged you separately.
