Failed processing event in feed [http://localhost:8050/openmrs/ws/atomfeed/lab/69] org.bahmni.webclients.WebClientsException: Bad response code of 500java.lang.RuntimeException: org.bahmni.webclients.WebClientsException: Bad response code of 500 at org.bahmni.feed.openelis.feed.transaction.support.AtomFeedHibernateTransactionManager.executeWithTransaction(AtomFeedHibernateTransactionManager.java:51) at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:68) at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73) at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57) at org.quartz.core.JobRunShell.run(JobRunShell.java:207) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560) Caused by: org.bahmni.webclients.WebClientsException: Bad response code of 500 at org.bahmni.webclients.HttpClient.checkSanityOfResponse(HttpClient.java:76) at org.bahmni.webclients.HttpClient.get(HttpClient.java:57) at org.bahmni.webclients.HttpClient.get(HttpClient.java:69) at org.bahmni.feed.openelis.feed.event.LabFeedEventWorker.process(LabFeedEventWorker.java:66) at org.ict4h.atomfeed.client.service.AtomFeedClient$EventProcessor.doInTransaction(AtomFeedClient.java:168) at org.ict4h.atomfeed.transaction.AFTransactionWorkWithoutResult.execute(AFTransactionWorkWithoutResult.java:6) at org.bahmni.feed.openelis.feed.transaction.support.AtomFeedHibernateTransactionManager.executeWithTransaction(AtomFeedHibernateTransactionManager.java:42) … 5 more
@vijayakls Which version of Bahmni are you running?
There might be some errors authenticating with OpenMRS.
Can you open /var/log/bahmni-lab/bahmni-lab.log and confirm if you are seeing error messages like this.
2017-03-18 14:25:00,307 ERROR [ELIS][OpenMRSEncounterFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
2017-03-18 14:24:45,217 ERROR [ELIS][OpenMRSEncounterFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
2017-03-18 14:25:00,307 ERROR [ELIS][OpenMRSEncounterFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
2017-03-18 14:25:00,328 ERROR [ELIS][OpenMRSPatientFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
2017-03-18 14:25:15,217 ERROR [ELIS][OpenMRSEncounterFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
2017-03-18 14:25:15,217 ERROR [ELIS][OpenMRSPatientFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
I am running 0.88 and having the same problem. This is the second time it happened, so looks like there is some serious issue with atom feed. The log is similar to the problem reported above:
2017-03-20 23:51:00,199 ERROR [ELIS][OpenMRSPatientFeedReaderJob] org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:83)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.processEvents(OpenELISFeedReaderJob.java:73)
at org.bahmni.feed.openelis.feed.job.OpenELISFeedReaderJob.execute(OpenELISFeedReaderJob.java:57)
at org.quartz.core.JobRunShell.run(JobRunShell.java:207)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:560)
Caused by: org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: Last Read entry not found in feed.
at org.ict4h.atomfeed.client.service.FeedEnumerator.setInitialEntries(FeedEnumerator.java:61)
at org.ict4h.atomfeed.client.service.FeedEnumerator.initializeEnumeration(FeedEnumerator.java:39)
at org.ict4h.atomfeed.client.service.FeedEnumerator.(FeedEnumerator.java:27)
at org.ict4h.atomfeed.client.service.AtomFeedClient.processEvents(AtomFeedClient.java:57)
… 4 more
Is there some kind of workaround, like lab admin forcing a pull from openmrs?
Probably not a good solution if you are dealing with a production server, but you can try clearing markers in OpenELIS DB. (…login to postgresql using psql -Uclinlims and run delete from markers;.)
But as you suggest, a better solution would be to dig deeper and find what is causing the issue in the first place. The error suggests that there is value from the markers table that is being used to read event entries in the OpenMRS DB and that value is pointing to an non-existent entry.
…maybe start by checking the markers in the OpenELIS DB ( select last_read_entry_id from markers;) and see if they all point to existing event records on the OpenMRS side. (…something like: select * from event_records where uuid like "%fa12a3bd-a1f6-4999-9495-d908e16ec9bf%";). -The uuid parts in the last_read_entry_id column of the markers table on the OpenELIS side should be found in the uuid column of the event_records table on the OpenMRS side.
I guess this is an issue with the data dump provided by default with the Bahmni Installation. If you are using clean and fresh database then this wouldn’t have happened.
We will confirm and fix our data dump soon.
@gsluthra@binduak