etesync / etesync-dav

This is a CalDAV and CardDAV adapter for EteSync
https://www.etesync.com
GNU General Public License v3.0
285 stars 45 forks source link

Synchronization errors from CalDavSynchronizer when used with Outlook and EteSync.dav #298

Open NJCLous opened 12 months ago

NJCLous commented 12 months ago

Hi Tom,

I use EteSync to synchronize contacts, calendar and task from a Windows 11 laptop to an Android 13 mobile. On the laptop I run Outlook (automatically updated to the latest version) with CalDavSynchronizer 4.4.1. All was well until a couple of days ago when CalDavSynchronizer started showing "Synchronization Reports" containing the following error message:

"CalDavSynchronizer.DataAccess.WebDavClientException: Response status code does not indicate success: '500' ('Internal Server Error'). Message: A server error occurred. Please contact the administrator."

Similar error messages occur for calendar, contacts and tasks but they are intermittent.

I opened the CalDavSynchronizer profiles and used the "Test or discover settings" buttons to check the connection to the local EteSync server. Sometimes I get "Connection test successful", but intermittently the connection doesn't work and I get "Response status code does not indicate success: '500' ('Internal Server Error'). Message: A server error occurred. Please contact the administrator".

I can access EteSync DAV Management (0.31.2) via my browser. EteSync.dav is running locally.

When I visit https://pim.etesync.com/wizard I get a warning "Important - Network request failed" with a button marked "Retry" which leads to the same warning. When I click the hamburger menu top-left and choose "Collections" I get a rotating disc for a long while but eventually my collections do show up - although sometimes they don't and I need to refresh the page a couple of times.

An example of a full CalDavSynchronizer report is included below.

Can you please investigate? Your help is much appreciated!

Thanks and best regards,

Niels

Sample CalDavSynchronizer report:

CalDavSynchronizer.DataAccess.WebDavClientException: Response status code does not indicate success: '500' ('Internal Server Error'). Message: A server error occurred. Please contact the administrator. at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.d10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.d9.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.d7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.DataAccess.CardDavDataAccess.d17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at CalDavSynchronizer.DataAccess.CardDavDataAccess.d17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.Implementation.Contacts.CardDavEntityRepository`3.d5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.Implementation.Contacts.LoggingCardDavRepositoryDecorator.d6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GenSync.EntityRepositories.VersionAwareToStateAwareEntityRepositoryAdapter`4.d5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GenSync.EntityRepositories.Decorators.StateAwareEntityRepositoryRunInBackgroundDecorator4.<GetFullRepositoryState>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GenSync.Synchronization.Synchronizer11.d27.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at GenSync.Synchronization.ContextCreatingSynchronizerDecorator`7.d3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at CalDavSynchronizer.Scheduling.SynchronizationProfileRunner.d__22.MoveNext()

NJCLous commented 12 months ago

Hi again...

I've been trying to work out what's wrong.

First, I wondered if my Outlook pst file was corrupted. Scanpst.exe, the Windows tool to sort this out, reported a few minor errors. I ran scanpst.exe repeatedly until the pst file was completely OK.

The "server error 500" messages from CalDavSynchronizer, when trying to sync with the EteSync local server, persisted.

I though perhaps the EteSync database on my laptop was corrupted. I stopped etesync.dav and deleted all database files from C:\Users\\AppData\Local\Etesync. I then restarted etesync.dav, re-added myself as a user, and set up the CalDavSynchronizer connection details again. This recreated the database files.

Aver several attempts (with intermittent "server error 500" messages) I managed to get my Tasks and Contacts to sync locally. Trying to sync the Outlook Calendar with EteSync locally brings up a pop-up "Processing chunk #1 - executing 100 operations". My Outlook calendar has over 900 entries and the whole attempt took well over an hour before breaking off. Checking the logs showed that several hundred events had synched, but then the "server error 500" messages started and further chunks weren't processed.

Could it be that the EteSync server is overloaded, causing time-outs and error messages?

Help urgently required - for now I can't sync between my laptop and my phone.

Thanks and best regards,

Niels

NJCLous commented 12 months ago

I've now also tried removing my account from pim.etesync.com as well as from my phone and laptop, then started setup from scratch - but the "server error 500" messages persist.

tx3eh8IUD1 commented 12 months ago

I get similar errors, with a completely fresh setup:

CalDavSynchronizer.DataAccess.WebDavClientException: Response status code does not indicate success: '500' ('Internal Server Error'). Message:
A server error occurred.  Please contact the administrator.
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<EnsureSuccessStatusCode>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<ExecuteWebDavRequest>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.HttpClientBasedClient.WebDavClient.<ExecuteWebDavRequestAndReturnResponseHeaders>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.DataAccess.CardDavDataAccess.<CreateNewEntity>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.Implementation.Contacts.CardDavEntityRepository`3.<Create>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at CalDavSynchronizer.Implementation.Contacts.LoggingCardDavRepositoryDecorator.<Create>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at GenSync.EntityRepositories.BatchEntityRepositoryAdapter`4.<PerformOperations>d__3.MoveNext()
NJCLous commented 11 months ago

Good news - my "server error 500" messages started getting less frequent a day or two ago, until Contacts and Tasks synchronised without errors every time and only Calendar kept failing. I deleted all my collections from the EteSync server and built them up again from scratch, just to be sure. I case of my Calendar, which has just under 1000 items, this took almost 24 hours so I guessed there was still a bottleneck at a server somewhere - but it worked. Things are now back to normal. Fingers crossed - and thanks if anyone at EteSync sorted something out behind the scenes!

I'll close this issue this weekend unless tx3eh8IUD1 still has the same problem.

NJCLous commented 6 months ago

Hi Tom,

I'm afraid this issue has returned - I get error messages as described in this thread each time EteSync tries to synchronise. Can you please check if all is as it should be at your end? I run Windows 11 with all latest updates and haven't changed any EteSync settings - so I would expect normal synchronisation.

Thanks and best wishes,

Niels

NJCLous commented 6 months ago

I just noticed I can't login to https://pim.etesync.com/login either - I get an error message "Network request failed". Logging in to http://localhost:37358/.web/login/ results in "Temporary server error". This is very annoying! Is there anywhere where I can see the EteSync server status, or any connection/database issues?

ImranR98 commented 6 months ago

I just noticed I can't login to https://pim.etesync.com/login either - I get an error message "Network request failed". Logging in to http://localhost:37358/.web/login/ results in "Temporary server error".

Same here. Is the service down?

NJCLous commented 6 months ago

I was hoping to reset my account to try and resolve the sync errors - but trying to log in via https://www.etesync.com/ leads to an error page "502 Bad Gateway". I can sign in to the old EteSync 1.0 dashboard - which encourages using the 2.0 dashboard which is inaccessible.

Checking the CalDavSynchronizer "Status" in the Outlook plugin I can see that contacts and tasks do synchronise, but not the calendar.

Any help is much appreciated!

tasn commented 6 months ago

Yes, the 502 is unrelated, we are fixing this.