Data synchronization error

Hi Development Team,

While I am doing synchronization of data through the application of #469, the CAPI shown below error…

Synchronization was interrupted, please try again.
No connection to the Survey Solutions Supervisor. Please make sure that the website is available.

Screenshot is attached for your reference.

I am not sure that the data was sync successfully with the server or not. Also not found the same data file in my CAPI. Because, there is not folder of Survey Solutions exist in the CAPI device. How do I get the same interview/s data for re-sync?

Need your grateful assistance at the earliest.

Thanks,
Sitanshu

Hello.
This message means that connection was interrupted during synchronization process. If interviews are not present on tablet in completed tab this means that they are sent to a server and you can find them on Headquarters application.

Hi Andrew,

Thanks for provided the solutions. Definitely I will check and get back to you if I did not find the records in the dataset.

Regards,
Sitanshu

Dear Andrew i have exactly the same issue as Sitanshu and another issue is of a complete synchronization of a complete interview it left the tablet but the same interview showed that it has wasn’t started yet and up to now since Thursday i haven’t seen this interview, i was hoping i could have it on the HQ server by now but in vain , please help me out

Alice

Some more information needed. Which version are you using? Is it self hosted on in cloud?

Hi Andrew,

Due to the temporal coincidence and similar symptoms I’ll hijack this thread in the hope of shedding some more light on the issue. We have a local installation of 19.04 (build 24505), backed by Postgres 10.7 on a Windows Server 2016 1607. As we realized only some time later there was an issue in a synchronization on 22 May. The in-Application logs claim that 45 interviews were synced between 18:03 and 18:11, yet, only six of these seem to show up in HQ.

The IIS logs are pretty unsuspicious with lots of posts and HTTP 200 all about the place in that time frame. This explains why the user did not get a failure message in our case. The HQ logs are quite different, though: They show a Hibernate exception over and over again (for the precisely same time frame), all with the same structure:

2019-05-22 17:04:18.9725[Error] UNKNOWN - Interview events by 7dcfdf49-8d5b-42a2-8d54-9fd16475789a processing failed. Reason: 'One or more handlers failed when publishing 81 events. First event source id: 7dcfdf498d5b42a28d549fd16475789a.' [System.AggregateException: One or more handlers failed when publishing 81 events. First event source id: 7dcfdf498d5b42a28d549fd16475789a. ---> Ncqrs.Domain.EventHandlerException: EventHandlerException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [14.07629492, 38.26066708] i: 7dcfdf498d5b42a28d549fd16475789a q: 050dcfa9-d1f5-dedf-ef4c-fd235a589498$, of entity: WB.Core.BoundedContexts.Headquarters.Views.Interview.InterviewGps
   bei NHibernate.Event.Default.AbstractSaveEventListener.PerformSave(Object entity, Object id, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   bei NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
   bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event)
   bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
   bei NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
   bei NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
   bei WB.Core.BoundedContexts.Headquarters.EventHandler.InterviewGeoLocationAnswersDenormalizer.Update(InterviewSummary state, IPublishedEvent`1 event)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   bei WB.Core.Infrastructure.EventHandlers.AbstractCompositeFunctionalEventHandler`2.ApplyEventOnEntity(IPublishableEvent evt, Type eventType, TEntity currentState)
   bei WB.Core.Infrastructure.EventHandlers.AbstractFunctionalEventHandler`2.Handle(IPublishableEvent evt, IReadSideStorage`1 storage)
   bei WB.Core.Infrastructure.EventHandlers.AbstractFunctionalEventHandler`2.Handle(IEnumerable`1 publishableEvents, Guid eventSourceId)
   bei WB.Core.Infrastructure.Implementation.EventDispatcher.NcqrCompatibleEventDispatcher.Publish(IEnumerable`1 eventMessages)
   --- Ende der internen Ausnahmestapelüberwachung ---
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei WB.Core.Infrastructure.Implementation.EventDispatcher.NcqrCompatibleEventDispatcher.Publish(IEnumerable`1 eventMessages)
   bei WB.Core.Infrastructure.CommandBus.Implementation.CommandService.ExecuteEventSourcedCommand(ICommand command, String origin, Type aggregateType, Guid aggregateId, IEnumerable`1 validators, IEnumerable`1 preProcessors, IEnumerable`1 postProcessors, Action`2 commandHandler, CancellationToken cancellationToken)
   bei WB.Core.Infrastructure.CommandBus.Implementation.CommandService.<>c__DisplayClass19_0.<ExecuteImpl>b__0()
   bei WB.Core.GenericSubdomains.Portable.NamedLocker.RunWithLock(String name, Action body)
   bei WB.Core.Infrastructure.CommandBus.Implementation.CommandService.ExecuteImpl(ICommand command, String origin, CancellationToken cancellationToken)
   bei WB.Core.Infrastructure.CommandBus.Implementation.CommandService.Execute(ICommand command, String origin)
   bei WB.Core.BoundedContexts.Headquarters.Implementation.Synchronization.InterviewPackagesService.<>c__DisplayClass22_0.<ProcessPackage>b__0(IServiceLocator serviceLocator)
   bei WB.Core.BoundedContexts.Headquarters.Implementation.UnitOfWorkInScopeExecutor.ExecuteActionInScope(Action`1 action)
   bei WB.Core.BoundedContexts.Headquarters.Implementation.Synchronization.InterviewPackagesService.ProcessPackage(InterviewPackage interview)
---> (Interne Ausnahme #0) Ncqrs.Domain.EventHandlerException: EventHandlerException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> NHibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session: [14.07629492, 38.26066708] i: 7dcfdf498d5b42a28d549fd16475789a q: 050dcfa9-d1f5-dedf-ef4c-fd235a589498$, of entity: WB.Core.BoundedContexts.Headquarters.Views.Interview.InterviewGps
   bei NHibernate.Event.Default.AbstractSaveEventListener.PerformSave(Object entity, Object id, IEntityPersister persister, Boolean useIdentityColumn, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   bei NHibernate.Event.Default.AbstractSaveEventListener.SaveWithGeneratedId(Object entity, String entityName, Object anything, IEventSource source, Boolean requiresImmediateIdAccess)
   bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.SaveWithGeneratedOrRequestedId(SaveOrUpdateEvent event)
   bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.EntityIsTransient(SaveOrUpdateEvent event)
   bei NHibernate.Event.Default.DefaultSaveOrUpdateEventListener.OnSaveOrUpdate(SaveOrUpdateEvent event)
   bei NHibernate.Impl.SessionImpl.FireSaveOrUpdate(SaveOrUpdateEvent event)
   bei NHibernate.Impl.SessionImpl.SaveOrUpdate(Object obj)
   bei WB.Core.BoundedContexts.Headquarters.EventHandler.InterviewGeoLocationAnswersDenormalizer.Update(InterviewSummary state, IPublishedEvent`1 event)
   --- Ende der internen Ausnahmestapelüberwachung ---
   bei System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   bei System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   bei WB.Core.Infrastructure.EventHandlers.AbstractCompositeFunctionalEventHandler`2.ApplyEventOnEntity(IPublishableEvent evt, Type eventType, TEntity currentState)
   bei WB.Core.Infrastructure.EventHandlers.AbstractFunctionalEventHandler`2.Handle(IPublishableEvent evt, IReadSideStorage`1 storage)
   bei WB.Core.Infrastructure.EventHandlers.AbstractFunctionalEventHandler`2.Handle(IEnumerable`1 publishableEvents, Guid eventSourceId)
   bei WB.Core.Infrastructure.Implementation.EventDispatcher.NcqrCompatibleEventDispatcher.Publish(IEnumerable`1 eventMessages)
   --- Ende der internen Ausnahmestapelüberwachung ---<---

So, that’s a duplicate key here. I am planning to do an update to 19.05 in the hope that the bug is fixed there can you confirm that?) but was wondering if there would be any chance of getting those interviews processed and properly imported. It should be possible, I guess, since they should be present in the event store, but I’d need a hint to be able to trigger the reprocessing.

Hope this helps others as well.
Best,
Thorsten

Hi Andrew or the team,

Any ideas about the above? After the upgrade to 19.06 I’d at least like to re-try processing what is in the event store.

Best, Thorsten

After upgrading to 19.06 you will be able to reprocess broken interview. If you need details on how to do it, please contact support channel.