We have moved to a new Sailfish OS Forum. Please start new discussions there.
2

calDAV 401 problem

asked 2019-11-06 19:53:57 +0200

cg gravatar image

I have a baikal server running on shared hosting, providing a small number of calendars for personal use. It works fine with Thunderbird on 2 PCs and 2 android tablets. Some times it works on SFOS, but regularly fails with a 401 error - which of course is only to be seen in log output.

The basic question here is: is the 401 error after the report request a SFOS issue or is it the baikal server? The error log from my provider just gives me a timeout message.

sync log output:

[D] unknown:0 - No sync log found for profile: "vk.Posts"
[D] unknown:0 - Sync running for 35
[D] unknown:0 - connection-manager.cpp 165 init Connected to "libsignon-qt1"
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0xf2406860)
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "NeedsUpdate" SignOn::IdentityImpl(0xf2406860)
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "PendingUpdate" SignOn::IdentityImpl(0xf2406860)
[D] unknown:0 - identityimpl.cpp 442 infoUpdated SERVER INFO UPDATED. NeedsUpdate " 57 "
[D] unknown:0 - Authenticated!
[W] unknown:0 - sqlitestorage.cpp: 193 - database "/home/nemo/.local/share/system/privileged/Calendar/mkcal/db" opened
[D] unknown:0 - found notebook: "b794d6df-8cf5-4e0d-99d3-9e1fee63cef6" for remote calendar: "/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - Start quick sync for notebook: "b794d6df-8cf5-4e0d-99d3-9e1fee63cef6" between QDateTime(2019-05-06 17:40:07.640 UTC Qt::TimeSpec(UTC)) to QDateTime(2020-11-06 17:40:07.640 UTC Qt::TimeSpec(UTC)) , sync changes since QDateTime(2019-10-07 20:54:58.000 UTC Qt::TimeSpec(UTC))
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - "Depth : 1"
[D] unknown:0 - "Prefer : return-minimal"
[D] unknown:0 - "Content-Length : 302"
[D] unknown:0 - "Content-Type : application/xml; charset=utf-8"
[D] unknown:0 - "URL = https://user:pass@www.....de/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - "Request : REPORT"
[D] unknown:0 - "<c:calendar-query xmlns:d=\"DAV:\" xmlns:c=\"urn:ietf:params:xml:ns:caldav\"><d:prop><d:getetag /></d:prop><c:filter><c:comp-filter name=\"VCALENDAR\"><c:comp-filter name=\"VEVENT\"> <c:time-range start=\"20190506T174007Z\" end=\"20201106T174007Z\"  /></c:comp-filter></c:comp-filter></c:filter></c:calendar-query>"
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - identityimpl.cpp 381 getInfoReply QMap(("ACL", QVariant(QStringList, ()))("AuthMethods", QVariant(QDBusArgument, ))("Caption", QVariant(QString, "Jolla"))("Id", QVariant(uint, 57))("Owner", QVariant(QStringList, ()))("Realms", QVariant(QStringList, ()))("RefCount", QVariant(int, 0))("StoreSecret", QVariant(bool, true))("Type", QVariant(int, 0))("UserName", QVariant(QString, "chrg"))("UserNameSecret", QVariant(bool, false))("Validated", QVariant(bool, true)))
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0xf2406860)
[D] unknown:0 - New network state: true  New type:  "WCDMA" ( 5 )
[D] unknown:0 - identityimpl.cpp 576 remoteObjectDestroyed
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "NeedsRegistration" SignOn::IdentityImpl(0xf2406860)
[D] unknown:0 - connection-manager.cpp 186 onDisconnected Disconnected from daemon
[D] unknown:0 - async-dbus-proxy.cpp 223 setDisconnected
[D] unknown:0 - async-dbus-proxy.cpp 223 setDisconnected
[D] unknown:0 - Process REPORT response for server path "/aaa/html/dav.php/calendars/chrg/kal2/"
[W] unknown:0 - The "REPORT" operation failed with error: QNetworkReply::NetworkError(InternalServerError) : 401
[W] unknown:0 - "REPORT" request failed. 401 "Network request failed with QNetworkReply::NetworkError: 401"
[D] unknown:0 - no remote changes to downsync and no local changes to upsync - finished!
[D] unknown:0 - Notebook sync finished. Total agents: 1
[W] unknown:0 - Aborting! Notebook synchronisation failed: 401 : "Network request failed with QNetworkReply::NetworkError: 401"
[W] unknown:0 - CalDAV sync failed: 401 "Network request failed with QNetworkReply::NetworkError: 401"
[D] unknown:0 - Session finished: "caldav-sync-35" , status: 3
[D] unknown:0 - aStatus 3
[D] unknown:0 - ProfileManager::syncProfile( "caldav-sync-35" )
[D] unknown:0 - found a valid sync profile with the given name: "caldav-sync-35"
[D] unknown:0 - Stopping the OOP process for  "caldav"
[D] unknown:0 - Process  "/usr/lib/buteo-plugins-qt5//oopp/caldav-client"  finished with exit code 15
[D] unknown:0 - ProfileManager::syncProfile( "caldav-sync-35" )
[D] unknown:0 - found a valid sync profile with the given name: "caldav-sync-35"
[D] unknown:0 - Sync status changed for account "35"

The behaviour has already been on JP1, but is getting worse now on XA2. I've been watching other threads here for quite some time, but could not find a suitable place to add this.

edit retag flag offensive close delete

3 Answers

Sort by » oldest newest most voted
2

answered 2019-11-08 14:58:09 +0200

updated 2019-11-26 14:15:06 +0200

Edit 2019-11-26: @cg, you may try this new RPM file. It's still based on the previous one, but I've added a fallback mechanism if the calendar-query is returning an internal server error. You may see it in the log, when the fetching of etags is failing with error 500, it's printing a warning "Server error, please contact your administrator." and trying again with a porpfind request instead of the calendar-query one. It may actually fails later on, though, because I've not modified the calendar-query request to actually fetch the data. I've done it, only for the etags at the moment, but I prefer to test it step by step, if you don't mind.

You may try this new RPM file. I've modified it, not to request sync window if not specified. You have to comment the two lines defining the previous and next months period of sync in caldav-sync-35.xml.

When syncing, it will not give a period of sync and this may (or not) help with your Baïkal server error, according to the bug I mentioned.

edit flag offensive delete publish link more

Comments

thanks for your quick reaction! I installed the rpm (had to add --force) and changed the two lines to a comment... now the report request looks like:

[D] unknown:0 - "---------------------------------------------------------------------"
[D] CalDavClient::mergeCalendars:423 - Already existing calendar: "/aaa/html/dav.php/calendars/chrg/default/" "Default calendar" ""
[D] CalDavClient::mergeCalendars:423 - Already existing calendar: "/aaa/html/dav.php/calendars/chrg/kal2/" "kal2" ""
[D] unknown:0 - found notebook: "b794d6df-8cf5-4e0d-99d3-9e1fee63cef6" for remote calendar: "/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - Start quick sync for notebook: "b794d6df-8cf5-4e0d-99d3-9e1fee63cef6" between QDateTime( Qt::TimeSpec(LocalTime)) to QDateTime( Qt::TimeSpec(LocalTime)) , sync changes since QDateTime(2019-11-07 15:27:19.000 UTC Qt::TimeSpec(UTC))
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - "Depth : 1"
[D] unknown:0 - "Prefer : return-minimal"
[D] unknown:0 - "Content-Length : 191"
[D] unknown:0 - "Content-Type : application/xml; charset=utf-8"
[D] unknown:0 - "URL = https://user:pass@www......de/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - "Request : REPORT"
[D] unknown:0 - "<c:calendar-query xmlns:d=\"DAV:\" xmlns:c=\"urn:ietf:params:xml:ns:caldav\"><d:prop><d:getetag /></d:prop><c:filter><c:comp-filter name=\"VCALENDAR\"></c:comp-filter></c:filter></c:calendar-query>"

...but fails with the known internal server error. Just for being sure I then removed the comment to limit the report request (again 1 and 2 months) and then it works again.

I understand that the error is maybe not on the SFOS side, but as it works with Thunderbird and Android there needs to be a way to solve it.

cg ( 2019-11-10 00:09:47 +0200 )edit

but as it works with Thunderbird and Android there needs to be a way to solve it.

I totally agree. There is something that they are doing differently. I'll try to read the code of Thunderbird CalDAV plugin in the coming days and see if I can find some differences. It's not an easy job, so it may take a while...

Damien Caliste ( 2019-11-11 14:56:05 +0200 )edit

Maybe a first step / workaround would be:

  • error message in case the sync fails

  • UI controls to set future & past sync months

cg ( 2019-11-25 09:59:50 +0200 )edit

@cg, yes, I would like to go further in that direction. I've discussed with @chris Adams already about creating QML for the Buteo framework (the one inherited from Meego era and dealing with the synchronisation), so we can have UI to interact with the synchronisation process later on (report, see logs, change parameters…).

Damien Caliste ( 2019-11-25 12:18:31 +0200 )edit

@cg, besides, looking at Thunderbird DAV-4-TbSync CalDAV sync source code (https://github.com/jobisoft/DAV-4-TbSync/blob/master/content/includes/sync.js), they are not doing any calendar-queryto get the etags on CalDAV entries or even the entries themselves, as adviced in http://sabre.io/dav/building-a-caldav-client/. It seems to me that they are using plain multiget requests.

From this knowledge, I can try to modify the code of the CalDAV plugin here to use the same scheme. These are invasive changes and it may take time…

Damien Caliste ( 2019-11-25 18:15:01 +0200 )edit
1

answered 2019-11-06 22:50:00 +0200

Sorry, it's not an answer but if you agree, I would like you to test the following RPM. It's a compilation in latest SDK of the master branch of the CalDAV plugin. The only modification is that it should dump the reply content from the server also in case of error. It may help to understand this strange InternalServerError. In fact, Qt is returning this value for a HTTP error 500.

To install it, you can use devel-su rpm -U buteo-sync-plugin-caldav-0.1.56-1.armv7hl.rpm. To restore the official version, use devel-su pkcon install buteo-sync-plugin-caldav.

edit flag offensive delete publish link more

Comments

This is the same issue I think than the one described in https://together.jolla.com/question/215024/kalender-caldav-sabre-katana

Hopefully we can understand the root of the problem :/

Damien Caliste ( 2019-11-06 22:52:00 +0200 )edit
0

answered 2019-11-07 12:46:29 +0200

cg gravatar image

alright, first had to upgrade to SFOS3.2, installed the mentioned rpm, sync output below

one more question: in /etc/buteo/profiles/sync/caldav-sync.xml there are time spans defined to synchronize 6 months from the past until 12 months into the future. If I change these values to maybe 1 and 2 months in order to reduce the amount of data, the server has to deliver the sync log still says it requests 6 and 12 months. Are these values ignored? (I did a reboot after changing them)

D] unknown:0 - Sync running for 35
[D] unknown:0 - connection-manager.cpp 165 init Connected to "libsignon-qt1"
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0xe6106860)
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "NeedsUpdate" SignOn::IdentityImpl(0xe6106860)
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "PendingUpdate" SignOn::IdentityImpl(0xe6106860)
[D] unknown:0 - identityimpl.cpp 442 infoUpdated SERVER INFO UPDATED. NeedsUpdate " 57 "
[D] unknown:0 - Authenticated!
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - "Depth : 1"
[D] unknown:0 - "Prefer : return-minimal"
[D] unknown:0 - "Content-Length : 186"
[D] unknown:0 - "Content-Type : application/xml; charset=utf-8"
[D] unknown:0 - "URL = https://user:pass@www......de/aaa/html/dav.php/calendars/chrg/"
[D] unknown:0 - "Request : PROPFIND"
[D] unknown:0 - "<d:propfind xmlns:d=\"DAV:\" xmlns:a=\"http://apple.com/ns/ical/\"> <d:prop>  <d:resourcetype />  <d:current-user-principal />  <d:displayname />  <a:calendar-color /> </d:prop></d:propfind>"
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - identityimpl.cpp 381 getInfoReply QMap(("ACL", QVariant(QStringList, ()))("AuthMethods", QVariant(QDBusArgument, ))("Caption", QVariant(QString, "Jolla"))("Id", QVariant(uint, 57))("Owner", QVariant(QStringList, ()))("Realms", QVariant(QStringList, ()))("RefCount", QVariant(int, 0))("StoreSecret", QVariant(bool, true))("Type", QVariant(int, 0))("UserName", QVariant(QString, "chrg"))("UserNameSecret", QVariant(bool, false))("Validated", QVariant(bool, true)))
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "Ready" SignOn::IdentityImpl(0xe6106860)
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - Process PROPFIND response.
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - "PROPFIND response status code: 207"
[D] unknown:0 - "PROPFIND response headers:"
[D] unknown:0 - "\tDate : Thu, 07 Nov 2019 10:10:55 GMT"
[D] unknown:0 - "\tServer : Apache/2.4.41 (Unix)"
[D] unknown:0 - "\tX-Powered-By : PHP/7.2.24"
[D] unknown:0 - "\tExpires : Thu, 19 Nov 1981 08:52:00 GMT"
[D] unknown:0 - "\tCache-Control : no-store, no-cache, must-revalidate"
[D] unknown:0 - "\tPragma : no-cache"
[D] unknown:0 - "\tX-Sabre-Version : 3.1.3"
[D] unknown:0 - "\tVary : Brief,Prefer,User-Agent"
[D] unknown:0 - "\tDAV : 1, 3, extended-mkcol, access-control, calendarserver-principal-property-search, calendar-access, calendar-proxy, calendar-auto-schedule, calendar-availability, addressbook"
[D] unknown:0 - "\tContent-Type : application/xml; charset=utf-8"
[D] unknown:0 - "\tSet-Cookie : PHPSESSID=f92aaaec71a7bc3c97041e49b8f2ee34; path=/; HttpOnly"
[D] unknown:0 - "\tKeep-Alive : timeout=3, max=99"
[D] unknown:0 - "\tConnection : Keep-Alive"
[D] unknown:0 - "\tTransfer-Encoding : chunked"
[D] unknown:0 - "PROPFIND response data:<?xml version=\"1.0\"?>"
[D] unknown:0 - "<d:multistatus xmlns:d=\"DAV:\" xmlns:s=\"http://sabredav.org/ns\" xmlns:cal=\"urn:ietf:params:xml:ns:caldav\" xmlns:cs=\"http://calendarserver.org/ns/\" xmlns:card=\"urn:ietf:params:xml:ns:carddav\">"
[D] unknown:0 - " <d:response>"
[D] unknown:0 - "  <d:href>/aaa/html/dav.php/calendars/chrg/</d:href>"
[D] unknown:0 - "  <d:propstat>"
[D] unknown:0 - "   <d:prop>"
[D] unknown:0 - "    <d:resourcetype>"
[D] unknown:0 - "     <d:collection/>"
[D] unknown:0 - "    </d:resourcetype>"
[D] unknown:0 - "    <d:current-user-principal>"
[D] unknown:0 - "     <d:href>/aaa/html/dav.php/principals/chrg/</d:href>"
[D] unknown:0 - "    </d:current-user-principal>"
[D] unknown:0 - "   </d:prop>"
[D] unknown:0 - "   <d:status>HTTP/1.1 200 OK</d:status>"
[D] unknown:0 - "  </d:propstat>"
[D] unknown:0 - " </d:response>"
[D] unknown:0 - " <d:response>"
[D] unknown:0 - "  <d:href>/aaa/html/dav.php/calendars/chrg/default/</d:href>"
[D] unknown:0 - "  <d:propstat>"
[D] unknown:0 - "   <d:prop>"
[D] unknown:0 - "    <d:resourcetype>"
[D] unknown:0 - "     <d:collection/>"
[D] unknown:0 - "     <cal:calendar/>"
[D] unknown:0 - "    </d:resourcetype>"
[D] unknown:0 - "    <d:current-user-principal>"
[D] unknown:0 - "     <d:href>/aaa/html/dav.php/principals/chrg/</d:href>"
[D] unknown:0 - "    </d:current-user-principal>"
[D] unknown:0 - "    <d:displayname>Default calendar</d:displayname>"
[D] unknown:0 - "    <x1:calendar-color xmlns:x1=\"http://apple.com/ns/ical/\"></x1:calendar-color>"
[D] unknown:0 - "   </d:prop>"
[D] unknown:0 - "   <d:status>HTTP/1.1 200 OK</d:status>"
[D] unknown:0 - "  </d:propstat>"
[D] unknown:0 - " </d:response>"
[D] unknown:0 - " <d:response>"
[D] unknown:0 - "  <d:href>/aaa/html/dav.php/calendars/chrg/kal2/</d:href>"
[D] unknown:0 - "  <d:propstat>"
[D] unknown:0 - "   <d:prop>"
[D] unknown:0 - "    <d:resourcetype>"
[D] unknown:0 - "     <d:collection/>"
[D] unknown:0 - "     <cal:calendar/>"
[D] unknown:0 - "    </d:resourcetype>"
[D] unknown:0 - "    <d:current-user-principal>"
[D] unknown:0 - "     <d:href>/aaa/html/dav.php/principals/chrg/</d:href>"
[D] unknown:0 - "    </d:current-user-principal>"
[D] unknown:0 - "    <d:displayname>kal2</d:displayname>"
[D] unknown:0 - "    <x1:calendar-color xmlns:x1=\"http://apple.com/ns/ical/\"></x1:calendar-color>"
[D] unknown:0 - "   </d:prop>"
[D] unknown:0 - "   <d:status>HTTP/1.1 200 OK</d:status>"
[D] unknown:0 - "  </d:propstat>"
[D] unknown:0 - " </d:response>"
[D] unknown:0 - " <d:response>"
[D] unknown:0 - "  <d:href>/aaa/html/dav.php/calendars/chrg/inbox/</d:href>"
[D] unknown:0 - "  <d:propstat>"
[D] unknown:0 - "   <d:prop>"
[D] unknown:0 - "    <d:resourcetype>"
[D] unknown:0 - "     <d:collection/>"
[D] unknown:0 - "     <cal:schedule-inbox/>"
[D] unknown:0 - "    </d:resourcetype>"
[D] unknown:0 - "    <d:current-user-principal>"
[D] unknown:0 - "     <d:href>/aaa/html/dav.php/principals/chrg/</d:href>"
[D] unknown:0 - "    </d:current-user-principal>"
[D] unknown:0 - "   </d:prop>"
[D] unknown:0 - "   <d:status>HTTP/1.1 200 OK</d:status>"
[D] unknown:0 - "  </d:propstat>"
[D] unknown:0 - " </d:response>"
[D] unknown:0 - " <d:response>"
[D] unknown:0 - "  <d:href>/aaa/html/dav.php/calendars/chrg/outbox/</d:href>"
[D] unknown:0 - "  <d:propstat>"
[D] unknown:0 - "   <d:prop>"
[D] unknown:0 - "    <d:resourcetype>"
[D] unknown:0 - "     <d:collection/>"
[D] unknown:0 - "     <cal:schedule-outbox/>"
[D] unknown:0 - "    </d:resourcetype>"
[D] unknown:0 - "    <d:current-user-principal>"
[D] unknown:0 - "     <d:href>/aaa/html/dav.php/principals/chrg/</d:href>"
[D] unknown:0 - "    </d:current-user-principal>"
[D] unknown:0 - "   </d:prop>"
[D] unknown:0 - "   <d:status>HTTP/1.1 200 OK</d:status>"
[D] unknown:0 - "  </d:propstat>"
[D] unknown:0 - " </d:response>"
[D] unknown:0 - "</d:multistatus>"
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - Already existing calendar: "/aaa/html/dav.php/calendars/chrg/default/" "Default calendar" ""
[D] unknown:0 - Already existing calendar: "/aaa/html/dav.php/calendars/chrg/kal2/" "kal2" ""
[D] unknown:0 - found notebook: "b794d6df-8cf5-4e0d-99d3-9e1fee63cef6" for remote calendar: "/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - Start quick sync for notebook: "b794d6df-8cf5-4e0d-99d3-9e1fee63cef6" between QDateTime(2019-05-07 10:10:55.327 UTC Qt::TimeSpec(UTC)) to QDateTime(2020-11-07 10:10:55.327 UTC Qt::TimeSpec(UTC)) , sync changes since QDateTime(2019-10-07 20:54:58.000 UTC Qt::TimeSpec(UTC))
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - "Depth : 1"
[D] unknown:0 - "Prefer : return-minimal"
[D] unknown:0 - "Content-Length : 302"
[D] unknown:0 - "Content-Type : application/xml; charset=utf-8"
[D] unknown:0 - "URL = https://user:pass@www......de/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - "Request : REPORT"
[D] unknown:0 - "<c:calendar-query xmlns:d=\"DAV:\" xmlns:c=\"urn:ietf:params:xml:ns:caldav\"><d:prop><d:getetag /></d:prop><c:filter><c:comp-filter name=\"VCALENDAR\"><c:comp-filter name=\"VEVENT\"> <c:time-range start=\"20190507T101055Z\" end=\"20201107T101055Z\"  /></c:comp-filter></c:comp-filter></c:filter></c:calendar-query>"
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - identityimpl.cpp 576 remoteObjectDestroyed
[D] unknown:0 - identityimpl.cpp 96 updateState Updating state:  "NeedsRegistration" SignOn::IdentityImpl(0xe6106860)
[D] unknown:0 - connection-manager.cpp 186 onDisconnected Disconnected from daemon
[D] unknown:0 - async-dbus-proxy.cpp 223 setDisconnected
[D] unknown:0 - async-dbus-proxy.cpp 223 setDisconnected
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - New network state: true  New type:  "WLAN" ( 2 )
[D] unknown:0 - Process REPORT response for server path "/aaa/html/dav.php/calendars/chrg/kal2/"
[D] unknown:0 - "---------------------------------------------------------------------"
[D] unknown:0 - "REPORT response status code: 500"
[D] unknown:0 - "REPORT response headers:"
[D] unknown:0 - "\tDate : Thu, 07 Nov 2019 10:10:55 GMT"
[D] unknown:0 - "\tServer : Apache/2.4.41 (Unix)"
[D] unknown:0 - "\tContent-Length : 533"
[D] unknown:0 - "\tContent-Type : text/html; charset=iso-8859-1"
[D] unknown:0 - "\tConnection : close"
[D] unknown:0 - "REPORT response data:<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">"
[D] unknown:0 - "<html><head>"
[D] unknown:0 - "<title>500 Internal Server Error</title>"
[D] unknown:0 - "</head><body>"
[D] unknown:0 - "<h1>Internal Server Error</h1>"
[D] unknown:0 - "<p>The server encountered an internal error or"
[D] unknown:0 - "misconfiguration and was unable to complete"
[D] unknown:0 - "your request.</p>"
[D] unknown:0 - "<p>Please contact the server administrator at "
[D] unknown:0 - " service@webmailer.de to inform them of the time this error occurred,"
[D] unknown:0 - " and the actions you performed just before this error.</p>"
[D] unknown:0 - "<p>More information about this error may be available"
[D] unknown:0 - "in the server error log.</p>"
[D] unknown:0 - "</body></html>"
[D] unknown:0 - "---------------------------------------------------------------------"
[W] unknown:0 - The "REPORT" operation failed with error: QNetworkReply::NetworkError(InternalServerError) : 401
[W] unknown:0 - "REPORT" request failed. 401 "Network request failed with QNetworkReply::NetworkError: 401"
[D] unknown:0 - no remote changes to downsync and no local changes to upsync - finished!
[D] unknown:0 - Notebook sync finished. Total agents: 1
[W] unknown:0 - Aborting! Notebook synchronisation failed: 401 : "Network request failed with QNetworkReply::NetworkError: 401"
[W] unknown:0 - CalDAV sync failed: 401 "Network request failed with QNetworkReply::NetworkError: 401"
[D] unknown:0 - Session finished: "caldav-sync-35" , status: 3
[D] unknown:0 - aStatus 3
[D] unknown:0 - ProfileManager::syncProfile( "caldav-sync-35" )
[D] unknown:0 - found a valid sync profile with the given name: "caldav-sync-35"
[D] unknown:0 - Stopping the OOP process for  "caldav"
[D] unknown:0 - Process  "/usr/lib/buteo-plugins-qt5//oopp/caldav-client"  finished with exit code 15
[D] unknown:0 - ProfileManager::syncProfile( "caldav-sync-35" )
edit flag offensive delete publish link more

Comments

Interesting, the reply is definitely an error server-side. Reducing the sync span is a good idea, but the file in /etc is overridden by a local one in ~/.cache/msyncd/sync/caldav-sync-35.xml. There is no other error in the server log beside a timeout ?

Damien Caliste ( 2019-11-07 14:24:01 +0200 )edit

alright, I just changed this account specific config file to 1 month past, 2 months future and now syncing worked. I have a second calendar on this server that showed the same issue, after editing these values it syncs again as well.

The error in the server log just said: no response after 123 sec (idle timeout 120 sec)

I already tried to raise the timeout in php.ini to 600sec, but that did not help. Looks like the report request for the 18 months time span "overloads" the server? Although my calendars are not that large...

cg ( 2019-11-07 17:48:03 +0200 )edit

@cg looking here and there on the Internet, for a server error 500 with Baïkal, I may think that there is a faulty event in your database server-side that is in a given period of time that creates the internal error. Restricting the sync window just makes this faulty event "disappears". See for instance https://github.com/sabre-io/Baikal/issues/695

It would be interesting to request a sync without sync window (since in the bug report, it says that it's working better), but this is not possible currently without touching the code. I may try to create a MR for this…

Damien Caliste ( 2019-11-08 10:56:24 +0200 )edit

In the past when SFOS failed to synchronize I did delete old entries from the calendar (via Thunderbird). This often helped to make it work again. So your explanation seems right to me.

I was just looking for the mentioned repair script, but could not find it.

Also I did check ics-exports of my calendars (using Thunderbird) with https://icalendar.org/validator.html and it says "no errors".

cg ( 2019-11-08 12:56:09 +0200 )edit

@cg thanks for looking deeper into this. The fact that the export is working, from my understanding, is not a full guarantee since the problem may be in the server database itself. In that case, the event will not be exported.

I'm working on a MR to allow to ask sync from unrestricted times to see if it's working better.

Damien Caliste ( 2019-11-08 14:45:47 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2019-11-06 19:53:57 +0200

Seen: 654 times

Last updated: Nov 26 '19