Sync Module fails to start


(Alejandro Ramirez) #1

OK, so a time ago a tried to sync a version of openmrs 1.9.8 and failed.

I’ve been testing sync module 1.3 with that version and successfully achieved syncing. I grabbed an old version of my system on 1.9.8 and dumped the DB, installed the same DB on 2 different computers, set 1 as parent and the other as child, strangely both computer had same uuid in the sync config , modified 1 of the uuid manually. Set it up, cloned data from parent, and successfully syncd all fields that i believed critical.

Here’s the weird part, it all went smooth until the day after when I started both computers to do more through testing, both presented an error message, saying the sync module could not be started. When i went to see the error, this was what was displayed.

Error while trying to start module Error while running sql: INSERT INTO scheduler_task_config (name, description, schedulable_class, start_time, start_time_pattern, repeat_interval, start_on_startup, started, created_by, date_created, changed_by, date_changed, uuid) VALUES (‘Cleanup Old Sync Records’, ‘This task deletes old rows in the sync_record and sync_server_record tables. The default settings work on all servers, but for advanced users, you can change the properties to suit your needs.’, ‘org.openmrs.module.sync.scheduler.CleanupSyncTablesTask’, ‘2009-12-18 17:26:31’, ‘MM/dd/yyyy HH:mm:ss’, ‘604800’, ‘1’, ‘0’, ‘1’, ‘2009-12-18 17:28:39’, null, null, ‘d3122955-00d7-454c-b17f-e3f87206c74b’) . Message: Duplicate entry ‘d3122955-00d7-454c-b17f-e3f87206c74b’ for key ‘scheduler_task_config_uuid_index’

Any thoughts? Thank You.


(Daniel Kayiwa) #2

When you check this table, do you already have this task configuration? Or do you just have another task configuration sharing the same uuid of d3122955-00d7-454c-b17f-e3f87206c74b?


(Euclides Mabota) #3

Hello @aramirez and @dkayiwa, Can you tell me how did you fix this issue? I am having a similar issue.

Thanj you


(Alejandro Ramirez) #4

@emabotta what is your issue? please state environment variables in your post and what you are trying to acomplish.


(Euclides Mabota) #5

Hi, I am using:

  • OpenMRS v 1.11.7
  • Sync Module v 1.3
  • Tomcat 7

Which environment variables are you referring to?

I have one parent server and some 10 child servers. Currently we are experiencing an issue with the synchronization, which we are trying to fix. Since yesterday, after a Tomcat restart, I am not able to start OpenMRS, because the sync module can’t start. With a warning as similar as yours:

  • WARN - ModuleFactory.startModuleInternal(792) |2019-01-25 13:46:30,328| Error while trying to start module: sync org.openmrs.api.db.DAOException: Error while running sql: INSERT INTO scheduler_task_config (name, description, schedulable_class, start_time, start_time_pattern, repeat_interval, start_on_startup, started, created_by, date_created, changed_by, date_changed, uuid) VALUES (‘Cleanup Old Sync Records’, ‘This task deletes old rows in the sync_record and sync_server_record tables. The default settings work on all servers, but for advanced users, you can change the properties to suit your needs.’, ‘org.openmrs.module.sync.scheduler.CleanupSyncTablesTask’, ‘2009-12-18 17:26:31’, ‘MM/dd/yyyy HH:mm:ss’, ‘604800’, ‘1’, ‘0’, ‘1’, ‘2009-12-18 17:28:39’, null, null, ‘d3122955-00d7-454c-b17f-e3f87206c74b’) . Message: Duplicate entry ‘d3122955-00d7-454c-b17f-e3f87206c74b’ for key ‘scheduler_task_config_uuid_index’

@aramirez find here an extended trace of the error!


(Alejandro Ramirez) #7

Theres a duplicate entry in the statement Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry ‘d3122955-00d7-454c-b17f-e3f87206c74b’ for key ‘scheduler_task_config_uuid_index’, try droppping the sync tables and seeif you can enter the server