ERP Sync - JDBC Error

Though Bahmni and ERP are working fine, ERP is not syncing. Series of following errors for all jobs (lab, customer, drug, radiology) seen in /opt/bahmni-erp-connect/log/bahmni-erp-connect.log

org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out. at Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.

Environment: AWS atomfeed-console.noarch 1.0-18 @bahmni bahmni-emr.noarch 0.89-333 @bahmni bahmni-erp.noarch 0.89-53 @bahmni bahmni-erp-connect.noarch 0.89-53 @bahmni bahmni-implementer-interface.noarch 0.89-103 @bahmni bahmni-installer.noarch 0.89-208 @/bahmni-installer-0.89-208.noarch bahmni-openmrs.noarch 0.89-94 @bahmni bahmni-reports.noarch 0.89-65 @bahmni bahmni-web.noarch 0.89-333 @bahmni python-gdata.noarch 2.0.11-1.el6 @bahmni

@nawazshaikh can you post the full log at pastebin?

We are facing the exact same error. Active Passive Setup. ERP Sync and Active Passive Sync was perfectly working. We restored OpenMRS database from another Bahmni server with the same version 0.91 but that server did not have ERP. The moment we restored the OpenMRS database on Active server it also got replicated on Passive.

But the ERP Sync is not working on Active or Passive. The ERP connect log shows

    ERROR [openerp-atomfeed-service] [org.bahmni.feed.openerp.job.SimpleFeedJob] Failed [saleorder.feed.generator.uri] execution. Job [SALEORDER_FEED]
org.ict4h.atomfeed.client.exceptions.AtomFeedClientException: org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is java.sql.SQLException: An attempt by a client to checkout a Connection has timed out.  

    org.ict4h.atomfeed.client.service.AtomFeedClient.processFailedEvents(AtomFeedClient.java:111)
    	at org.bahmni.feed.openerp.job.SimpleFeedJob.processFailedEvents(SimpleFeedJob.java:44)
    	at org.bahmni.feed.openerp.job.OpenERPSaleOrderFeedJob.processFailedEvents(OpenERPSaleOrderFeedJob.java:22)

Looks like restarting bahamni-erp-connect and atomfeed-console resolved the issue

1 Like