Syncing 'Internal Server Error' Today



  • Hi,

    I've been running DAVdroid with ownCloud 8.2 stable for a while but DAVdroid has just started reporting the below on both the mobile devices which connect. No changes have been made to my ownCloud install recently.

    Can anyone explain why it might be?

    SYNCHRONIZATION INFO
    Synchronization phase: 7
    Account name: usera@example.com
    Authority: com.android.calendar
    
    HTTP REQUEST:
    REPORT /remote.php/caldav/calendars/usera/calendarb_shared_by_userb/
    Content-Length: 328
    Content-Type: application/xml; charset=utf-8
    Depth: 1
    
    <?xml version='1.0' encoding='UTF-8' ?><CAL:calendar-query xmlns="DAV:" xmlns:CAL="urn:ietf:params:xml:ns:caldav"><prop><getetag /></prop><CAL:filter><CAL:comp-filter name="VCALENDAR"><CAL:comp-filter name="VEVENT"><CAL:time-range start="20160312T075701Z" /></CAL:comp-filter></CAL:comp-filter></CAL:filter></CAL:calendar-query>
    
    HTTP RESPONSE:
    http/1.1 500 Internal Server Error
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Connection: close
    Content-Length: 274
    Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *
    Content-Type: application/xml; charset=utf-8
    Date: Fri, 10 Jun 2016 06:57:02 GMT
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Pragma: no-cache
    Server: Apache/2.4.10 (Debian)
    Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
    X-Content-Type-Options: nosniff
    X-Frame-Options: SAMEORIGIN
    X-Robots-Tag: none
    X-Sabre-Version: 2.1.7
    X-XSS-Protection: 1; mode=block
    
    <?xml version="1.0" encoding="utf-8"?>[LF]
    <d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">;[LF]
    <s:sabredav-version>2.1.7</s:sabredav-version>[LF]
    <s:exception>Sabre\VObject\EofException</s:exception>[LF]
    <s:message>End of document reached prematurely</s:message>[LF]
    </d:error>[LF]
    
    
    EXCEPTION:
    at.bitfire.dav4android.exception.HttpException: 500 Internal Server Error
    at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:317)
    at at.bitfire.dav4android.DavResource.checkStatus(DavResource.java:290)
    at at.bitfire.dav4android.DavCalendar.calendarQuery(DavCalendar.java:88)
    at at.bitfire.davdroid.syncadapter.CalendarSyncManager.listRemote(CalendarSyncManager.java:118)
    at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.java:160)
    at at.bitfire.davdroid.syncadapter.CalendarsSyncAdapterService$SyncAdapter.onPerformSync(CalendarsSyncAdapterService.java:69)
    at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:272)
    
    SOFTWARE INFORMATION
    DAVdroid version: 1.0.9.1 (101) Thu May 26 21:11:59 GMT+01:00 2016
    Installed from: com.android.vending
    JB Workaround installed: no
    
    CONFIGURATION
    System-wide synchronization: automatically
    Account: usera@example.com
    Address book sync. interval: 240 min
    Calendar sync. interval: 120 min
    OpenTasks sync. interval: 240 min
    
    SQLITE DUMP
    android_metadata
    | locale |
    | en_GB |
    ----------
    settings
    | setting | value |
    ----------
    services
    | _id | accountName | service | principal |
    | 1 | usera@example.com | carddav | <null> |
    | 2 | usera@example.com | caldav | <null> |
    ----------
    sqlite_sequence
    | name | seq |
    | services | 2 |
    | collections | 11 |
    | homesets | 4 |
    ----------
    homesets
    | _id | serviceID | url |
    | 3 | 2 | https://cloud.example.com/remote.php/caldav/calendars/usera/ |
    | 4 | 1 | https://cloud.example.com/remote.php/carddav/addressbooks/usera/ |
    ----------
    collections
    | _id | serviceID | url | readOnly | displayName | description | color | timezone | supportsVEVENT | supportsVTODO | sync |
    | 6 | 2 | https://cloud.example.com/remote.php/caldav/calendars/usera/contact_birthdays/ | 0 | Contact birthdays | <null> | -3355444 | <null> | 1 | 0 | 1 |
    | 7 | 2 | https://cloud.example.com/remote.php/caldav/calendars/usera/calendarc_shared_by_userc/ | 0 | userc | <null> | -32768 | <null> | 1 | 1 | 1 |
    | 8 | 2 | https://cloud.example.com/remote.php/caldav/calendars/usera/calendarb_shared_by_userb/ | 0 | userb | <null> | -39246 | <null> | 1 | 1 | 1 |
    | 9 | 2 | https://cloud.example.com/remote.php/caldav/calendars/usera/usera/ | 0 | usera | <null> | -10046721 | <null> | 1 | 1 | 1 |
    | 10 | 2 | https://cloud.example.com/remote.php/caldav/calendars/usera/personal/ | 0 | Personal | <null> | <null> | <null> | 1 | 1 | 0 |
    | 11 | 1 | https://cloud.example.com/remote.php/carddav/addressbooks/usera/contacts/ | 0 | Contacts | <null> | <null> | <null> | <null> | <null> | 1 |
    ----------
    
    SYSTEM INFORMATION
    Android version: 6.0.1 (MTC19T)
    Device: LGE Nexus 5X (bullhead)
    

  • developer

    Hello,

    OwnCloud is known to send "500 Internal Server Error" for various reasons. Did have a look at the links provided on https://davdroid.bitfire.at/configuration/owncloud/?

    Because this seems to be a server problem, you may get more qualified help in the OwnCloud community.



  • Hello,
    I have the same problem since a few days. Before sync was running without problems. (Shared webhost - all-inkl.com germany)
    You have found a solutuion for this problem right now?
    cheers riotweb



  • Same happened with old owncloud 7.0.

    workarround:

    1. export the calendar in owncloud as an ics-file
    2. delete the calendar in owncloud
    3. uploud ics-file to owncloud
    4. import the calendar
    5. share the calendar

    davdroid v 1.1.1.2 syncing again

    btw: ownloud log showed this error-message in its log file, I guess, a previous sync might have been incomplete:
    {"app":"remote","message":"Invalid VObject. Document ended prematurely.","level":4,"time":"2016-07-19T04:04:16+00:00"} {"app":"PHP","message":"Session has been closed - no further changes to the session as allowed at \/usr\/share\/owncloud\/lib\/private\/session\/memory.php#80","level":3,"time":"2016-07-19T04:04:16+00:00"}



  • Thanks,

    I'm sure that exporting, recreating the calendar then importing the ics would have worked - if I could export the calendar, but I couldn't, which lead me to here:

    https://github.com/owncloudarchive/calendar/issues/861

    Looks like one calendar entry got corrupt at some point and deleting that fixed the sync issue and allowed me to export again.

    I ran the following commands on the DB:

    SELECT * FROM oc_clndr_objects WHERE calendardata NOT LIKE '%END:VCALENDAR%';

    Which showed one entry (which, as far as I could, tell was nothing important). So I then ran:

    DELETE FROM oc_clndr_objects WHERE calendardata NOT LIKE '%END:VCALENDAR%';

    Happy days : )

    Thanks



  • Should have said, I actually did:

    Maintenance mode on
    Backed up DB
    Deleted corrupt calendar entry
    Maintenance mode off

    (In case anyone needs to do the same - always take a backup and always do it while in maintenance mode)


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.