Error while Building Sync2 module

@dkayiwa I am having the same issue as @sharif and I wanted to drop this old RA standalone and download a fresh one. I downloaded a fresh one but when I run the jar to start the server I get an error that the jar is corrupted.

@sharif I had a similar error but what I did is set the localInstanceId to “sync2” as you can see in this wiki resource and that worked just fine. You can change that in the load configuration for the sync module

1 Like

@odorajonathan @dkayiwa i downloaded the Atom Feed module and compiled it but am getting the error when i upload it in the RA

@gcliff Are you using the standalone? It’s easier to use the standalone for this than the RefApp. Although am not sure what the error means

cc @dkayiwa

Yeah @odorajonathan am using standalone 2.9

@dkayiwa my parent sync config is this and my child sync config is this . what should be the " localInstanceId" ?

@gcliff you will need to use copy and paste method format when actually uploading those modules, just pick any of the two assume you have picked sync2, then go to RA you want to upload go to modules-> then upload them.

Whatever name that you want. As long as you will pass it on in the parent’s whitelist config

1 Like

For those who are saying that you are getting errors, it would take a magician to help you without sharing the server side log.

1 Like

@dkayiwa could u share the sync2 configs ur using to successfully sync for ur child and parent instances…

Hello @dkayiwa after loading the sync2 module and the atom feed 1.0.13 SNAPSHOT, the atomfeed loads successfully but the sync2 fails and I get this error. Using atom feed 1.0.13 SNAPSHOT, could it be a problem?

@irenyak1 and @reagan did you read my previous comment?

1 Like

@dkayiwa my errors are here https://pastebin.com/jPi1kSuV

POST request for "http://localhost:8081/openmrs-standalone/ws/rest/sync2" resulted in 401 (Unauthorized)

Means that you have not correctly set the parent user name and password. Or simply that your child instance id is not in the whitelist of the parent.

these are the parent credentials set in the child instance which are also similar to the parent instance settings since i kept everything default… the child instance id is set in the whitelist of the parent as shown in my earlier configs i uploaded

Hello @dkayiwa I have done the following though still blocked.

  1. I have setup the two instances and are successfully running

  2. edited the sync2 config as here Parent and Child

  3. Checked on the sync2 settings, they are similar for both parent and child as here (I did not change a thing)

  4. Registered a patient in the parent instance

  5. Successfully loaded the sync2 and atom feed modules in both the parent and child instances

  6. Restarted both instances

  7. While in the child instance, I tried **Manual Pull from Parent ** and I got this error

  8. Audit log for both parent and child instances is similar like here

  9. Atom feed config for parent and child. I did not edit anything in these two files.

  10. Question: What could be causing the connection error? My internet is up and running super fast.

@dkayiwa Child server side log and parent server sidelog

@irenyak1 change your urls from ‘openmrs’ to ‘openmrs-standalone’

For instance ‘http://localhost:8081/openmrs’ becomes ‘http://localhost:8081/openmrs-standalone

1 Like

Following the discussion, I have managed to stage two instances (parent and child) which seem to be communicating perfecting. Am now trying to more children to see how it goes

@dkayiwa thank you very much. I was able to sync successfully however, this is what I get in the Audit log, it is failure

. When I check in one of the details of sync this is what i get This is the detail of the sync here