What's wrong with metadata sync? "httpStatus":"Internal Server Error","httpStatusCode":500,"status":"ERROR","message":"no transaction is in progress"

  • INFO 2020-06-28T18:13:12,850 ‘system-process’ update org.hisp.dhis.scheduling.JobConfiguration, r-15] 元数据同步, uid: Nd2CGh0KZqJ (AuditLogUtil.java [taskSchedule
    )
  • INFO 2020-06-28T18:13:12,856 Scheduler initiated execution of job: JobConfiguration{uid='Nd2CGh0 0 3 , name=‘元数据同步’, jobType=META_DATA_SYNC, cronExpression=‘0
    ? * *’, delay=‘null’, jobParameters=org.hisp.dhis.scheduling.parameters.jackson.MetadataSyncJobParametersDeserializer$CustomJobParameters@44ebc3c9, enabled=true, inMemoryJob=false, lastRuntimeExecution=‘00:00:00.019’, userUid=‘null’, leaderOnlyJob=false, jobStatus=RUNNING, nextExecutionTime=2020-06-29 03:00:00.0, lastExecutedStatus=FAILED, lastExecuted=2020-06-28 00:00:00.02} (DefaultSchedulingManager.java [http-nio-20008-exec-4])
  • INFO 2020-06-28T18:13:12,870 Metadata Sync cron Job started (MetadataSyncJob.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:12,877 Now trying. Current count: 1 (MetadataRetryContext.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,176 Status: [Available: true, message: Authentication was successful, HTTP status: 200 OK] (SyncUtils.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,177 Starting DataValueSynchronization job. (DataValueSynchronization.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,177 Starting DataValueSynchronization job: 00:00:00.000 (Clock.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,182 DataValues last changed before Sun Jun 28 08:00:00 CST 2020 will not be synchronized. (DataValueSynchronization.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,182 Skipping synchronization, no new or updated DataValues (DataValueSynchronization.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,347 Status: [Available: true, message: Authentication was successful, HTTP status: 200 OK] (SyncUtils.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,347 Starting Event programs data synchronization job.: 00:00:00.000 (Clock.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,358 Simple Local Cache instance created for region:‘dataElementCache’ (SimpleCacheBuilder.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,748 Events last changed before Sun Jun 28 08:00:00 CST 2020 will not be synchronized. (EventSynchronization.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,750 144 anonymous Events to synchronize were found. (EventSynchronization.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,750 Remote server URL for Event programs POST synchronization: http://****/brs//api/events?strategy=SYNC (EventSynchronization.java [taskScheduler-15])
  • INFO 2020-06-28T18:13:13,750 Event programs data synchronization job has 1 pages to synchronize. With page size: 200 (EventSynchronization.java [taskScheduler-15]) * INFO 2020-06-28T18:13:14,197 Synchronizing page 1 with page size 200 (EventSynchronization.java [taskScheduler-15])
  • ERROR 2020-06-28T18:13:14,675 Internal error happened during event data push: {“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”} (SyncUtils.java [taskScheduler-15])
    org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:172) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.hisp.dhis.dxf2.sync.SyncUtils.runSyncRequest(SyncUtils.java:140) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.SyncUtils.sendSyncRequest(SyncUtils.java:107) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.sendSyncRequest(EventSynchronization.java:177) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizePage(EventSynchronization.java:142) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.DataSynchronization.runSyncWithPaging(DataSynchronization.java:53) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizeData(EventSynchronization.java:98) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.sync.MetadataSyncPreProcessor.handleEventProgramsDataPush(MetadataSyncPreProcessor.java:132) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.runSyncTask(MetadataSyncJob.java:175) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.lambda$execute$0(MetadataSyncJob.java:137) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.execute(MetadataSyncJob.java:133) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:173) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:103) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$internalExecuteJobConfiguration$4(DefaultSchedulingManager.java:282) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
  • ERROR 2020-06-28T18:13:15,073 Internal error happened during event data push: {“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”} (SyncUtils.java [taskScheduler-15])
    org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:172) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.hisp.dhis.dxf2.sync.SyncUtils.runSyncRequest(SyncUtils.java:140) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.SyncUtils.sendSyncRequest(SyncUtils.java:107) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.sendSyncRequest(EventSynchronization.java:177) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizePage(EventSynchronization.java:142) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.DataSynchronization.runSyncWithPaging(DataSynchronization.java:53) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizeData(EventSynchronization.java:98) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.sync.MetadataSyncPreProcessor.handleEventProgramsDataPush(MetadataSyncPreProcessor.java:132) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.runSyncTask(MetadataSyncJob.java:175) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.lambda$execute$0(MetadataSyncJob.java:137) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.execute(MetadataSyncJob.java:133) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:173) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:103) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$internalExecuteJobConfiguration$4(DefaultSchedulingManager.java:282) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

May be can you share detailed steps you did. Whether this was happening only once? or everytime?

dhis2.34,
from orginal dhis2 server: database dump, restore in other db server , start new dhis2 instance

then set url,user,password of remote sync server in new dhis2 instance. create a schedule task of metadata sync. run it manually, got this.

Shall we do the following steps and see how it goes:

  1. shutdown tomcat
  2. check tomcat is completely shutdown using ps -aef | grep tomcat if not use kill -15 <pid>
  3. truncate catalina.out log file.
  4. start tomcat again
  5. do the metaysync again
  6. If problem persist can you share the complete log file

01-Jul-2020 14:07:27.572 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄[“http-nio-20008”]
01-Jul-2020 14:07:27.583 信息 [main] org.apache.catalina.startup.Catalina.start [38,806]毫秒后服务器启动

  • INFO 2020-07-01T14:08:25,929 Login attempt: admin (TwoFactorAuthenticationProvider.java [http-nio-20008-exec-4])
  • WARN 2020-07-01T14:08:26,137 Authentication event AuthenticationSuccessEvent: admin; ip: 61.157.75.24 sessionId: 9ba01eed70b5e0bac070e9b60656e419002fa142c3936787023be8361bcd9b20 (AuthenticationLoggerListener.java [http-nio-20008-exec-4])
  • WARN 2020-07-01T14:08:26,139 Authentication event SessionFixationProtectionEvent: admin; ip: 61.157.75.24 sessionId: 9ba01eed70b5e0bac070e9b60656e419002fa142c3936787023be8361bcd9b20 (AuthenticationLoggerListener.java [http-nio-20008-exec-4])
  • WARN 2020-07-01T14:08:26,144 Authentication event InteractiveAuthenticationSuccessEvent: admin; ip: 61.157.75.24 sessionId: 9ba01eed70b5e0bac070e9b60656e419002fa142c3936787023be8361bcd9b20 (AuthenticationLoggerListener.java [http-nio-20008-exec-4])
  • INFO 2020-07-01T14:08:37,959 Scheduler initiated execution of job: JobConfiguration{uid=‘Nd2CGh0KZqJ’, name=‘元数据同步’, jobType=META_DATA_SYNC, cronExpression=‘0 0 3 ? * *’, delay=‘null’, jobParameters=org.hisp.dhis.scheduling.parameters.jackson.MetadataSyncJobParametersDeserializer$CustomJobParameters@1a2bb644, enabled=true, inMemoryJob=false, lastRuntimeExecution=‘00:00:03.677’, userUid=‘null’, leaderOnlyJob=false, jobStatus=SCHEDULED, nextExecutionTime=2020-07-02 03:00:00.0, lastExecutedStatus=COMPLETED, lastExecuted=2020-07-01 03:00:03.677} (DefaultSchedulingManager.java [http-nio-20008-exec-5])
  • INFO 2020-07-01T14:08:37,983 ‘system-process’ update org.hisp.dhis.scheduling.JobConfiguration, name: 元数据同步, uid: Nd2CGh0KZqJ (AuditLogUtil.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,008 Metadata Sync cron Job started (MetadataSyncJob.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,016 Now trying. Current count: 1 (MetadataRetryContext.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,311 Status: [Available: true, message: Authentication was successful, HTTP status: 200 OK] (SyncUtils.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,311 Starting DataValueSynchronization job. (DataValueSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,315 Starting DataValueSynchronization job: 00:00:00.000 (Clock.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,326 DataValues last changed before Sun Jun 28 08:00:00 CST 2020 will not be synchronized. (DataValueSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,326 Skipping synchronization, no new or updated DataValues (DataValueSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,552 Status: [Available: true, message: Authentication was successful, HTTP status: 200 OK] (SyncUtils.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,552 Starting Event programs data synchronization job.: 00:00:00.000 (Clock.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,562 Simple Local Cache instance created for region:‘dataElementCache’ (SimpleCacheBuilder.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,897 Events last changed before Sun Jun 28 08:00:00 CST 2020 will not be synchronized. (EventSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,899 202 anonymous Events to synchronize were found. (EventSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,900 Remote server URL for Event programs POST synchronization: http://xxxxxx:10010/brs//api/events?strategy=SYNC (EventSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:38,900 Event programs data synchronization job has 3 pages to synchronize. With page size: 100 (EventSynchronization.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:39,327 Synchronizing page 1 with page size 100 (EventSynchronization.java [taskScheduler-1])
  • ERROR 2020-07-01T14:08:39,818 Internal error happened during event data push: {“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”} (SyncUtils.java [taskScheduler-1])
    org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:172) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.hisp.dhis.dxf2.sync.SyncUtils.runSyncRequest(SyncUtils.java:140) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.SyncUtils.sendSyncRequest(SyncUtils.java:107) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.sendSyncRequest(EventSynchronization.java:177) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizePage(EventSynchronization.java:142) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.DataSynchronization.runSyncWithPaging(DataSynchronization.java:53) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizeData(EventSynchronization.java:98) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.sync.MetadataSyncPreProcessor.handleEventProgramsDataPush(MetadataSyncPreProcessor.java:132) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.runSyncTask(MetadataSyncJob.java:175) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.lambda$execute$0(MetadataSyncJob.java:137) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.execute(MetadataSyncJob.java:133) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:173) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:103) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$internalExecuteJobConfiguration$4(DefaultSchedulingManager.java:282) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
  • ERROR 2020-07-01T14:08:40,336 Internal error happened during event data push: {“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”} (SyncUtils.java [taskScheduler-1])
    org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:172) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.hisp.dhis.dxf2.sync.SyncUtils.runSyncRequest(SyncUtils.java:140) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.SyncUtils.sendSyncRequest(SyncUtils.java:107) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.sendSyncRequest(EventSynchronization.java:177) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizePage(EventSynchronization.java:142) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.DataSynchronization.runSyncWithPaging(DataSynchronization.java:53) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizeData(EventSynchronization.java:98) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.sync.MetadataSyncPreProcessor.handleEventProgramsDataPush(MetadataSyncPreProcessor.java:132) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.runSyncTask(MetadataSyncJob.java:175) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.lambda$execute$0(MetadataSyncJob.java:137) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.execute(MetadataSyncJob.java:133) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:173) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:103) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$internalExecuteJobConfiguration$4(DefaultSchedulingManager.java:282) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
  • ERROR 2020-07-01T14:08:40,748 Internal error happened during event data push: {“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”} (SyncUtils.java [taskScheduler-1])
    org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:172) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.hisp.dhis.dxf2.sync.SyncUtils.runSyncRequest(SyncUtils.java:140) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.SyncUtils.sendSyncRequest(SyncUtils.java:107) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.sendSyncRequest(EventSynchronization.java:177) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizePage(EventSynchronization.java:142) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.DataSynchronization.runSyncWithPaging(DataSynchronization.java:53) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizeData(EventSynchronization.java:98) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.sync.MetadataSyncPreProcessor.handleEventProgramsDataPush(MetadataSyncPreProcessor.java:132) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.runSyncTask(MetadataSyncJob.java:175) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.lambda$execute$0(MetadataSyncJob.java:137) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.execute(MetadataSyncJob.java:133) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:173) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:103) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$internalExecuteJobConfiguration$4(DefaultSchedulingManager.java:282) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
  • ERROR 2020-07-01T14:08:41,154 Internal error happened during event data push: {“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”} (SyncUtils.java [taskScheduler-1])
    org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:172) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at org.hisp.dhis.dxf2.sync.SyncUtils.runSyncRequest(SyncUtils.java:140) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.SyncUtils.sendSyncRequest(SyncUtils.java:107) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.sendSyncRequest(EventSynchronization.java:177) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizePage(EventSynchronization.java:142) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.DataSynchronization.runSyncWithPaging(DataSynchronization.java:53) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.sync.EventSynchronization.synchronizeData(EventSynchronization.java:98) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.sync.MetadataSyncPreProcessor.handleEventProgramsDataPush(MetadataSyncPreProcessor.java:132) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.runSyncTask(MetadataSyncJob.java:175) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.lambda$execute$0(MetadataSyncJob.java:137) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:180) ~[spring-retry-1.2.4.RELEASE.jar:?]
    at org.hisp.dhis.dxf2.metadata.jobs.MetadataSyncJob.execute(MetadataSyncJob.java:133) ~[dhis-service-dxf2-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.executeJob(DefaultJobInstance.java:173) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultJobInstance.execute(DefaultJobInstance.java:103) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at org.hisp.dhis.scheduling.DefaultSchedulingManager.lambda$internalExecuteJobConfiguration$4(DefaultSchedulingManager.java:282) ~[dhis-service-core-2.34.1-SNAPSHOT.jar:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) [spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_181]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_181]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
  • INFO 2020-07-01T14:08:41,156 Metadata Sync failed! Sending mail to Admin (MetadataSyncJob.java [taskScheduler-1])
  • INFO 2020-07-01T14:08:41,156 Failure mail will be sent with the following message: Following Exceptions were encountered while the scheduler run for metadata sync
    500 : [{“httpStatus”:“Internal Server Error”,“httpStatusCode”:500,“status”:“ERROR”,“message”:“no transaction is in progress”}] (MetadataSyncPostProcessor.java [taskScheduler-1])s
  • INFO 2020-07-01T14:08:41,165 ‘system-process’ update org.hisp.dhis.scheduling.JobConfiguration, name: 元数据同步, uid: Nd2CGh0KZqJ (AuditLogUtil.java [taskScheduler-1])

I do metadata sync at DHIS 2 Demo - Sierra Leone whith https://play.dhis2.org/2.33.4,
and the new added dataelement “test” and “test1” can’t be synced .

Is here some help?

Hello,sir,
Is there some problem?

Hi everybody,
At WHO we have been working on an application to synchronize metadata (and data) from one to one or multiple other DHIS2 instances containing similar or different metadata. You may want to try it out! It may work more smoothly.

The latest release is described here: MetaData Sync app 2.2.0 now available)

Hope it helps!

3 Likes