How to fix 500 CalDAVAccountRefreshQueueableOperation

Hello


After updating from 10.7 to 10.10 (over 10.9) in basically one step, i encounter an error on my Calendar app.


I figured out that is is just a single entry:


2014-10-28 10:37:53+0100 [-] [caldav-2] [-] [txweb2.server#error] Exception rendering request: <REPORT /calendars/__uids__/C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD/calendar/ (1, 1)>

2014-10-28 10:37:53+0100 [-] [caldav-2] Traceback (most recent call last):

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 423, in errback

2014-10-28 10:37:53+0100 [-] [caldav-2] self._startRunCallbacks(fail)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 490, in _startRunCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] self._runCallbacks()

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 577, in _runCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] current.result = callback(current.result, *args, **kw)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1155, in gotResult

2014-10-28 10:37:53+0100 [-] [caldav-2] _inlineCallbacks(r, g, deferred)

2014-10-28 10:37:53+0100 [-] [caldav-2] --- <exception caught here> ---

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/resource.py", line 327, in renderHTTP

2014-10-28 10:37:53+0100 [-] [caldav-2] response = yield super(CalDAVResource, self).renderHTTP(request)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/txweb2/static.py", line 128, in renderHTTP

2014-10-28 10:37:53+0100 [-] [caldav-2] response = yield super(StaticRenderMixin, self).renderHTTP(request)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/txweb2/resource.py", line 121, in renderHTTP

2014-10-28 10:37:53+0100 [-] [caldav-2] returnValue((yield result))

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/method/report.py", line 137, in http_REPORT

2014-10-28 10:37:53+0100 [-] [caldav-2] result = (yield method(request, doc.root_element))

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/method/report_multiget_common.py", line 295, in multiget_common

2014-10-28 10:37:53+0100 [-] [caldav-2] yield doResponse()

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/method/report_multiget_common.py", line 209, in doResponse

2014-10-28 10:37:53+0100 [-] [caldav-2] isowner=isowner

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/twistedcaldav/method/report_common.py", line 384, in _namedPropertiesForResource

2014-10-28 10:37:53+0100 [-] [caldav-2] calendar = (yield resource.iCalendarForUser())

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = result.throwExceptionIntoGenerator(g)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

2014-10-28 10:37:53+0100 [-] [caldav-2] return g.throw(self.type, self.value, self.tb)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/txdav/caldav/datastore/sql.py", line 3678, in componentForUser

2014-10-28 10:37:53+0100 [-] [caldav-2] caldata = yield self.component()

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1099, in _inlineCallbacks

2014-10-28 10:37:53+0100 [-] [caldav-2] result = g.send(result)

2014-10-28 10:37:53+0100 [-] [caldav-2] File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/txdav/caldav/datastore/sql.py", line 3631, in component

2014-10-28 10:37:53+0100 [-] [caldav-2] e, self._resourceID

2014-10-28 10:37:53+0100 [-] [caldav-2] txdav.common.icommondatastore.InternalDataStoreError: Data corruption detected (Invalid property: X-APPLE-TRAVEL-START;ROUTING=CAR;X-ADDRESS=MYSTREET 1\u20137\\\\n8888 Graz\\\\n\326sterreich;X-TITLE=MYSTREET 1\u20137:geo:47.000000\\,15.000000

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:VCALENDAR

2014-10-28 10:37:53+0100 [-] [caldav-2] VERSION:2.0

2014-10-28 10:37:53+0100 [-] [caldav-2] CALSCALE:GREGORIAN

2014-10-28 10:37:53+0100 [-] [caldav-2] PRODID:-//Apple Inc.//Mac OS X 10.9.5//EN

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:VTIMEZONE

2014-10-28 10:37:53+0100 [-] [caldav-2] TZID:Europe/Vienna

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:DAYLIGHT

2014-10-28 10:37:53+0100 [-] [caldav-2] DTSTART:19810329T020000

2014-10-28 10:37:53+0100 [-] [caldav-2] RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=3

2014-10-28 10:37:53+0100 [-] [caldav-2] TZNAME:MESZ

2014-10-28 10:37:53+0100 [-] [caldav-2] TZOFFSETFROM:+0100

2014-10-28 10:37:53+0100 [-] [caldav-2] TZOFFSETTO:+0200

2014-10-28 10:37:53+0100 [-] [caldav-2] END:DAYLIGHT

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:STANDARD

2014-10-28 10:37:53+0100 [-] [caldav-2] DTSTART:19961027T030000

2014-10-28 10:37:53+0100 [-] [caldav-2] RRULE:FREQ=YEARLY;BYDAY=-1SU;BYMONTH=10

2014-10-28 10:37:53+0100 [-] [caldav-2] TZNAME:MEZ

2014-10-28 10:37:53+0100 [-] [caldav-2] TZOFFSETFROM:+0200

2014-10-28 10:37:53+0100 [-] [caldav-2] TZOFFSETTO:+0100

2014-10-28 10:37:53+0100 [-] [caldav-2] END:STANDARD

2014-10-28 10:37:53+0100 [-] [caldav-2] END:VTIMEZONE

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:VEVENT

2014-10-28 10:37:53+0100 [-] [caldav-2] UID:20B011FD-8208-4917-A1FA-11D7DD19E51F

2014-10-28 10:37:53+0100 [-] [caldav-2] DTSTART;TZID=Europe/Vienna:20141011T150000

2014-10-28 10:37:53+0100 [-] [caldav-2] DTEND;TZID=Europe/Vienna:20141011T200000

2014-10-28 10:37:53+0100 [-] [caldav-2] ATTENDEE;CN=Michael NOLASTNAME;CUTYPE=INDIVIDUAL;EMAIL=michael@NOLASTNAME.at;PARTS

2014-10-28 10:37:53+0100 [-] [caldav-2] TAT=ACCEPTED:urn:uuid:C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD

2014-10-28 10:37:53+0100 [-] [caldav-2] ATTENDEE;CN=Stephanie NOLASTNAME;CUTYPE=INDIVIDUAL;EMAIL=stephanie@NOLASTNAME.at;P

2014-10-28 10:37:53+0100 [-] [caldav-2] ARTSTAT=ACCEPTED;ROLE=REQ-PARTICIPANT;SCHEDULE-STATUS=2.0:urn:uuid:E51D1AC

2014-10-28 10:37:53+0100 [-] [caldav-2] A-AF95-4D37-975D-AB169534E4C9

2014-10-28 10:37:53+0100 [-] [caldav-2] CREATED:20141009T202137Z

2014-10-28 10:37:53+0100 [-] [caldav-2] DTSTAMP:20141011T122512Z

2014-10-28 10:37:53+0100 [-] [caldav-2] LOCATION:Martin NOLASTNAMEs Privat\\nNOSTREET 34\\n8888 Graz

2014-10-28 10:37:53+0100 [-] [caldav-2] ORGANIZER;CN=Michael NOLASTNAME;EMAIL=michael@NOLASTNAME.at:urn:uuid:C7D9C4F4-08C5

2014-10-28 10:37:53+0100 [-] [caldav-2] -41DE-A85C-3AE3250B6FFD

2014-10-28 10:37:53+0100 [-] [caldav-2] SEQUENCE:6

2014-10-28 10:37:53+0100 [-] [caldav-2] SUMMARY:Martin Geburtstagsfeier

2014-10-28 10:37:53+0100 [-] [caldav-2] END:VEVENT

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:X-CALENDARSERVER-PERUSER

2014-10-28 10:37:53+0100 [-] [caldav-2] UID:20B011FD-8208-4917-A1FA-11D7DD19E51F

2014-10-28 10:37:53+0100 [-] [caldav-2] X-CALENDARSERVER-PERUSER-UID:C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:X-CALENDARSERVER-PERINSTANCE

2014-10-28 10:37:53+0100 [-] [caldav-2] TRANSP:OPAQUE

2014-10-28 10:37:53+0100 [-] [caldav-2] X-APPLE-STRUCTURED-LOCATION;X-ADDRESS=NOSTREET 34\\\\n8888 Graz;X-

2014-10-28 10:37:53+0100 [-] [caldav-2] APPLE-RADIUS=100;X-TITLE=Martin NOLASTNAMEs Privat:geo:47.000000\\,15.000000

2014-10-28 10:37:53+0100 [-] [caldav-2] X-APPLE-TRAVEL-DURATION:PT20M

2014-10-28 10:37:53+0100 [-] [caldav-2] X-APPLE-TRAVEL-START;ROUTING=CAR;X-ADDRESS=MYSTREET 1\u20137\\\\n8888 Graz\\\\

2014-10-28 10:37:53+0100 [-] [caldav-2] n\326sterreich;X-TITLE=MYSTREET 1\u20137:geo:47.000000\\,15.000000

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:VALARM

2014-10-28 10:37:53+0100 [-] [caldav-2] ACKNOWLEDGED:20141011T122512Z

2014-10-28 10:37:53+0100 [-] [caldav-2] ACTION:NONE

2014-10-28 10:37:53+0100 [-] [caldav-2] TRIGGER;VALUE=DATE-TIME:19760401T005545Z

2014-10-28 10:37:53+0100 [-] [caldav-2] UID:1784D466-EC6A-4A87-9151-6536F35986D8

2014-10-28 10:37:53+0100 [-] [caldav-2] X-WR-ALARMUID:1784D466-EC6A-4A87-9151-6536F35986D8

2014-10-28 10:37:53+0100 [-] [caldav-2] END:VALARM

2014-10-28 10:37:53+0100 [-] [caldav-2] BEGIN:VALARM

2014-10-28 10:37:53+0100 [-] [caldav-2] ACKNOWLEDGED:20141011T122512Z

2014-10-28 10:37:53+0100 [-] [caldav-2] ACTION:AUDIO

2014-10-28 10:37:53+0100 [-] [caldav-2] ATTACH:Basso

2014-10-28 10:37:53+0100 [-] [caldav-2] TRIGGER;X-APPLE-RELATED-TRAVEL=-PT15M:-PT35M

2014-10-28 10:37:53+0100 [-] [caldav-2] UID:70EE8730-FEDF-46DE-A851-47B4B59311AA

2014-10-28 10:37:53+0100 [-] [caldav-2] X-WR-ALARMUID:70EE8730-FEDF-46DE-A851-47B4B59311AA

2014-10-28 10:37:53+0100 [-] [caldav-2] END:VALARM

2014-10-28 10:37:53+0100 [-] [caldav-2] END:X-CALENDARSERVER-PERINSTANCE

2014-10-28 10:37:53+0100 [-] [caldav-2] END:X-CALENDARSERVER-PERUSER

2014-10-28 10:37:53+0100 [-] [caldav-2] END:VCALENDAR

2014-10-28 10:37:53+0100 [-] [caldav-2] ) in id: 1546

2014-10-28 10:37:53+0100 [-] [caldav-2]


the problem seems to be in this exact line:

2014-10-28 10:37:53+0100 [-] [caldav-2] txdav.common.icommondatastore.InternalDataStoreError: Data corruption detected (Invalid property: X-APPLE-TRAVEL-START;ROUTING=CAR;X-ADDRESS=MYSTREET 1\u20137\\\\n8888 Graz\\\\n\326sterreich;X-TITLE=MYSTREET 1\u20137:geo:47.000000\\,15.000000


I tried to fix this by changing and deleting it, but this did not solve the problem.

My phone by the way does not seem to bother at all.. (iOS 8.1)


How can i get rid of the problem?

I found a thread witch may be has a solution, but I am unable to access a postgres shell (psql)


i can not su to _calendar or _psotgres, and even as root I can not start psql


# psql

psql: could not connect to server: No such file or directory

Is the server running locally and accepting

connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

(this socket does not exists at this path)


Can anybody help me?

I liked the calendarserver


CardDAV seems to work without any problem!

Just CalDAV part is broken.

Mac mini, OS X Server

Posted on Oct 28, 2014 3:19 AM

Reply
14 replies

Oct 28, 2014 8:36 AM in response to Cyrus Daboo

[michael@server:~] sudo /Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/bin/calenda rserver_verify_data --ical --uuid C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD

NOTICE: there is no transaction in progress


---- CalVerify Bad Data Service version: 12 ----


---- Scanning calendar data ----

Number of events to process: 171


---- Verifying each calendar object resource ----


Bad iCalendar data: 8

+------------------------------------------------------------------+------------ --------------------------+------+-----------------+

| Owner | Event UID | RID | Problem |

|------------------------------------------------------------------+------------ --------------------------+------+-----------------|

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | 0207CAC0-60D4-4DFC-A8E3-32429E8F6D15 | 1563 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | 20B011FD-8208-4917-A1FA-11D7DD19E51F | 1546 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | 4C827D20-0011-412B-83A6-68B5EB196697 | 1615 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | C0E6CDF7-77E5-441B-A486-07FF0EA91575 | 1542 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | E4B5ACCF-1814-48E9-B777-42C1296927C4 | 1556 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | EF1D7730-8749-4762-BC9F-5D35686787F2 | 1623 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | F0ABCC81-65F6-482C-AEDC-ED9EDDA27325 | 1549 | Failed to parse |

| <RecordType=user>/michael (C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD) | F2E1FD99-E9A5-4B0F-823E-43838D928306 | 1568 | Failed to parse |

+------------------------------------------------------------------+------------ --------------------------+------+-----------------+


Overall Summary:

+-----------------------------+-------+------+

| Item | Count | % |

|-----------------------------+-------+------|

| Number of events to process | 171 | |

|-----------------------------+-------+------|

| Bad iCalendar data | 8 | 4.7% |

+-----------------------------+-------+------+


Hope this helps 🙂

And thank you for your reply in advance!

Nov 13, 2014 8:22 PM in response to DaywalkerGLXVR6

I have the same problem. In my case, running the calendarserver_verify_data command results in:


Traceback (most recent call last):

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/bin/calend arserver_verify_data", line 8, in <module>

from pkg_resources import load_entry_point

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/pkg_resources.py", line 2716, in <module>

working_set.require(__requires__)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/pkg_resources.py", line 685, in require

needed = self.resolve(parse_requirements(requirements))

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/pkg_resources.py", line 588, in resolve

raise DistributionNotFound(req)

pkg_resources.DistributionNotFound: pytz


In my case I'm considering moving back to Mavericks. I'm currently without a working calendar server and 4 devices that I need to sync together :-/

Feb 6, 2015 8:55 AM in response to Cyrus Daboo

So, it seems that nobody is able to help me I decidet to try again by myself.


I found out that there are a lot of tools shipped with the calendar server, (but the seem not to work as expected)


The idea was to try to delete the old entries to get rid of them. But without success


[root@server:/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer /bin] ./calendarserver_purge_events -d 240

NOTICE: there is no transaction in progress

Error: 'NoneType' object has no attribute 'remove'

Unhandled Error

Traceback (most recent call last):

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 423, in errback

self._startRunCallbacks(fail)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 490, in _startRunCallbacks

self._runCallbacks()

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 577, in _runCallbacks

current.result = callback(current.result, *args, **kw)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1155, in gotResult

_inlineCallbacks(r, g, deferred)

--- <exception caught here> ---

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

result = result.throwExceptionIntoGenerator(g)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

return g.throw(self.type, self.value, self.tb)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/calendarserver/tools/cmdline.py", line 162, in startService

yield self.doWork()

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1097, in _inlineCallbacks

result = result.throwExceptionIntoGenerator(g)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/failure.py", line 389, in throwExceptionIntoGenerator

return g.throw(self.type, self.value, self.tb)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/calendarserver/tools/purge.py", line 438, in doWork

numEventsRemoved = yield txn.removeOldEvents(self.cutoff, batchSize=self.batchSize)

File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/defer.py", line 1099, in _inlineCallbacks

result = g.send(result)

File "/Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/lib/python 2.7/site-packages/txdav/common/datastore/sql.py", line 2327, in removeOldEvents

yield resource.remove(implicitly=False)

exceptions.AttributeError: 'NoneType' object has no attribute 'remove'

Feb 27, 2015 3:30 PM in response to DaywalkerGLXVR6

Awe, that's too bad you lost interest because I found a solution. I guess I'll post the solution here just in case someone happens to be trolling the internet years later looking for a solution to this issue...


The cause of the problem seems to be a corrupted caldav PostgreSQL database. Deleting items from the calendar didn't help because the database would just attempt to restore the corrupted data, resulting in an entry in the error log, like we have seen. I was running commands in the psql utility to check out the integrity of the database, searching contents, and such but I'm not going to bore you with those details because I didn't actually have to modify/delete anything (in the database). I had to get the calendar client to initiate a rebuild of the database and here's how I did it:


1. Export all of your events to an *.ics file using the client (you'll need it later)

2. If you only have 1 calendar in your client, create another one

3. (This was key) --> Because you have more than one calendar listed, you can now re-order them. Ensure that the offending calendar is NOT listed first. Notice how you can right-click and delete it now? You couldn't before because it was listed first, as the primary calendar. Go ahead and delete it.

4. Either close-and-open the client or just wait. You want to give the PostgreSQL database time to rebuild your calendar. But, alas, there shouldn't be anything to rebuild it with. All you should have is that 'fake' calendar you just created (step #2), which doesn't have any events in it.

5. Once you're satisfied there aren't any events being populated, use the client to import that *.ics file you exported (step #1). Yeah, I know it still has the corrupted data in it, but what you just forced the caldav server to do is rebuild the PostgreSQL database.

6. Now comes the fun part: As the calendar database is rebuilding, you should get a series of pop-up messages warning about specific events that are being imported. Be sure to click "Ignore" but make note of what events they are and see if there's anything in common with them. For my case and so many others that I read about online, MeetUp.com seems to be nefarious in causing the corruption; I'm not sure what it is about these auto-generated appointments that causes the issue.

7. If you noted anything in common with the offending events, perform a search of your calendar for said events. You'll have to do this in between all of the pop-up messages. Highlight all of the events that are listed in the search field and delete them all.

8. On your mobile device or client machine, delete then re-add the caldav account.


These steps assume that your PostgreSQL process is actually running in the background. A search online can show you how to check. Hopefully, your database returns to a stable state. I'd be interested in hearing if anyone still has any issue with this specific problem...


Joe

MacBook Pro (Retina, 13-inch, Late 2012)

OS X Yosemite Server (10.10.2)

Mar 6, 2015 3:19 AM in response to joe.stolid

Here is what I did today (not finished yet, but have to go now)


[root@server:/tmp] su -m _calendar

[_calendar@server:/tmp] psql -h /var/run/caldavd/PostgresSocket caldav

(interesting, this directory and the socket does not exists, but it works...)

caldav=# \dt (list al the tables)

and after some searching, i found that the main entries are stored here.

caldav=# \d calendar_object

and i found all my RIDs in this table.

So I decided to give it a try and delete the entries, in this table by hand.

# delete from calendar_object where resource_id = 1546;

DELETE 1

(and so on, with all the others)


For now, no errors are shown in the following command

[root@server:/tmp] /Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/bin/calendarserver_verify_data --ical --uuid C7D9C4F4-08C5-41DE-A85C-3AE3250B6FFD

NOTICE: there is no transaction in progress


---- CalVerify Bad Data Service version: 12 ----


---- Scanning calendar data ----

Number of events to process: 58


---- Verifying each calendar object resource ----


Bad iCalendar data: 0

+-------+-----------+-----+---------+

| Owner | Event UID | RID | Problem |

|-------+-----------+-----+---------|

+-------+-----------+-----+---------+


Overall Summary:

+-----------------------------+-------+------+

| Item | Count | % |

|-----------------------------+-------+------|

| Number of events to process | 58 | |

|-----------------------------+-------+------|

| Bad iCalendar data | 0 | 0.0% |

+-----------------------------+-------+------+


But i don't know is broke anything else with it.

The iPhone seems to be happy with it, but the Calendar.app on my macbook not...


I give you more details, later.

Mar 6, 2015 11:01 AM in response to DaywalkerGLXVR6

Actually this worked out!

And i figured out that my iPhone was also not syncing anymore, because now the Calendar.app on my mac was working without errors, but new entries didn't show up on the iPhone, and vice versa.

So i removed the calendar from the iPhone and re added it, and suddenly an empty calendar with my test entry showed up.

This means, that is lost my old entries (sad but not important) but also that I didn't recognized that he didn't sync AND didn't produce any error output.


(also the folder "/var/run/caldavd/PostgresSocket" does exist, I just had a typo 🙂 )


Hope this will help somebody!

Mar 25, 2015 11:40 AM in response to DaywalkerGLXVR6

I tried this: the Commands and capitalization were slightly different. So here are my notes. OS X 10.2 Sever V4.0.3

You can list all UUID for the ical server which will give you the UUIDs

sudo calendarserver_manage_principals --list-principals users

Once you got the list you can check for errors (Here we check for UUID 41DFAB8A-CC7E-4146-B708-AAA74CBA80B)

sudo /Applications/Server.app/Contents/ServerRoot/Library/CalendarServer/bin/calenda rserver_verify_data --ical --uuid 41DFAB8A-CC7E-4146-B708-AAA74CBA80B

Once you found an error note down the rescue_id (RID)


Become root first

sudo -s

Connect directly to postgres

psql -U caldav -h /var/run/caldavd/PostgresSocket caldav

calendar events are stored in calendar_object. This list the schema:

caldav=# \d calendar_object

Now you need to delete a event (Here 11247)

caldav=# DELETE FROM calendar_object WHERE resource_id = 11247;

Once you done you can quit with

caldav=# \q

I hope that helps.

Nov 10, 2015 5:54 AM in response to oak55

Hi all.

I can't delete this darn notification that gives me an error.


I've tried the above solution but can't use the commands as role ' _calendar'


Please advice?


2015-11-09 10:52:40+0100 [-] [caldav-7] [AMP,client] [txweb2.server#error] Exception rendering request: <GET /calendars/__uids__/USERID/notification/31bf2d1d-3c51-4ad8-baf4-d78baf9e4e4c.xm l (1, 1)>




EDIT:

Ok.. I'd like to flush these... reset them. the 63 events to process.

Please advice!


Overall Summary:

+-----------------------------+-------+------+

| Item | Count | % |

|-----------------------------+-------+------|

| Number of events to process | 63 | |

|-----------------------------+-------+------|

| Bad iCalendar data | 0 | 0.0% |

+-----------------------------+-------+------+

Nov 10, 2015 12:16 PM in response to joe.stolid

Thx for the reply.

I managed to get in and work with caldav but I cannot figure out how to get rid of that notification error:

2015-11-09 10:52:40+0100 [-] [caldav-7] [AMP,client] [txweb2.server#error] Exception rendering request: <GET /calendars/__uids__/USERID/notification/31bf2d1d-3c51-4ad8-baf4-d78baf9e4e4c.xm l (1, 1)>

Have no RID errors but the culprit seems to be that one notification... Any ideas?

Can it be found ni 'calendar_object' as well or where should I look?


Thx again.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to fix 500 CalDAVAccountRefreshQueueableOperation

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.