Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Cannot connect to calendar or addressbook server HTTPChannel unhandled error

Experiencing the dread OS X server 3.2.1 upgrade death. I reinitialized the postgres DB and it finally started, but Calendar and Addressbook appear corrupted. I've given up on trying to recover data, I just want the two services reinitialized.


I tried moving /Library/Server/Calendar and Contacts/ out of the way and restarting. That seemed to help, but I still can't connect to it, including on the web port directly.


The error I see in /var/log/caldavd/error.log is: (And no, I don't know Python well enough to trace through the program from this error):


2014-09-19 18:21:14-0700 [-] [caldav-1] [HTTPChannel,3,192.168.1.250] Unhandled Error

2014-09-19 18:21:14-0700 [-] [caldav-1] Traceback (most recent call last):

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/context.py", line 81, in callWithContext

2014-09-19 18:21:14-0700 [-] [caldav-1] return func(*args,**kw)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/internet/fswatch.py", line 69, in _doWriteOrReadOrVNodeEvent

2014-09-19 18:21:14-0700 [-] [caldav-1] origDoWriteOrRead(selectable, fd, event)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/kqreactor.py", line 291, in _doWriteOrRead

2014-09-19 18:21:14-0700 [-] [caldav-1] self._disconnectSelectable(selectable, why, inRead)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/posixbase.py", line 258, in _disconnectSelectable

2014-09-19 18:21:14-0700 [-] [caldav-1] selectable.readConnectionLost(f)

2014-09-19 18:21:14-0700 [-] [caldav-1] --- <exception caught here> ---

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/tcp.py", line 262, in readConnectionLost

2014-09-19 18:21:14-0700 [-] [caldav-1] p.readConnectionLost()

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/web2/channel/http.py", line 919, in readConnectionLost

2014-09-19 18:21:14-0700 [-] [caldav-1] self.transport.loseConnection()

2014-09-19 18:21:14-0700 [-] [caldav-1] exceptions.AttributeError: 'NoneType' object has no attribute 'loseConnection'

2014-09-19 18:21:14-0700 [-] [caldav-1]

2014-09-19 18:21:14-0700 [-] [caldav-1] [HTTPChannel,3,192.168.1.250] Unhandled Error

2014-09-19 18:21:14-0700 [-] [caldav-1] Traceback (most recent call last):

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/application/app.py", line 323, in runReactorWithLogging

2014-09-19 18:21:14-0700 [-] [caldav-1] reactor.run()

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/base.py", line 1169, in run

2014-09-19 18:21:14-0700 [-] [caldav-1] self.mainLoop()

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/base.py", line 1181, in mainLoop

2014-09-19 18:21:14-0700 [-] [caldav-1] self.doIteration(t)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/kqreactor.py", line 256, in doKEvent

2014-09-19 18:21:14-0700 [-] [caldav-1] log.callWithLogger(selectable, _drdw, selectable, fd, event)

2014-09-19 18:21:14-0700 [-] [caldav-1] --- <exception caught here> ---

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/log.py", line 84, in callWithLogger

2014-09-19 18:21:14-0700 [-] [caldav-1] return callWithContext({"system": lp}, func, *args, **kw)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/log.py", line 69, in callWithContext

2014-09-19 18:21:14-0700 [-] [caldav-1] return context.call({ILogContext: newCtx}, func, *args, **kw)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/context.py", line 118, in callWithContext

2014-09-19 18:21:14-0700 [-] [caldav-1] return self.currentContext().callWithContext(ctx, func, *args, **kw)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/python/context.py", line 81, in callWithContext

2014-09-19 18:21:14-0700 [-] [caldav-1] return func(*args,**kw)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/internet/fswatch.py", line 69, in _doWriteOrReadOrVNodeEvent

2014-09-19 18:21:14-0700 [-] [caldav-1] origDoWriteOrRead(selectable, fd, event)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/kqreactor.py", line 291, in _doWriteOrRead

2014-09-19 18:21:14-0700 [-] [caldav-1] self._disconnectSelectable(selectable, why, inRead)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/posixbase.py", line 258, in _disconnectSelectable

2014-09-19 18:21:14-0700 [-] [caldav-1] selectable.readConnectionLost(f)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/tcp.py", line 265, in readConnectionLost

2014-09-19 18:21:14-0700 [-] [caldav-1] self.connectionLost(failure.Failure())

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/twi sted/internet/tcp.py", line 287, in connectionLost

2014-09-19 18:21:14-0700 [-] [caldav-1] protocol.connectionLost(reason)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/web2/channel/http.py", line 927, in connectionLost

2014-09-19 18:21:14-0700 [-] [caldav-1] self.factory.removeConnectedChannel(self)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/web2/metafd.py", line 161, in removeConnectedChannel

2014-09-19 18:21:14-0700 [-] [caldav-1] HTTPFactory.removeConnectedChannel(self, channel)

2014-09-19 18:21:14-0700 [-] [caldav-1] File "/Applications/Server.app/Contents/ServerRoot/usr/share/caldavd/lib/python/twex t/web2/channel/http.py", line 1004, in removeConnectedChannel

2014-09-19 18:21:14-0700 [-] [caldav-1] self.connectedChannels.remove(channel)

2014-09-19 18:21:14-0700 [-] [caldav-1] exceptions.KeyError: <twext.web2.channel.http.HTTPChannel object at 0x107b2cb10>

2014-09-19 18:21:14-0700 [-] [caldav-1]


Mac mini, OS X Mavericks (10.9.5), OS X Server 3.2.1

Posted on Sep 19, 2014 8:43 PM

Reply
6 replies

Sep 21, 2014 4:14 AM in response to mylnir

Hi,

same here. After updating, calendar and contacts didn't work (which is by the way the sole reason why I have this server. Thanks to the attempts to force users into iCloud a few months ago)


I got a "CalDAVAccountRefreshQueueableOperation" error. I tried this


How to fix iCAL-Server Error: CalDAVAccountRefreshQueueableOperation


...but it didn't work, because the calendar was stuck on "Starting..."

So today I also rolled the server-app back with the TimeMachine. Starting server afterwards took forever - it looked like the upgrading-window ("server on this mac is updating") and the progress-bar didn't move for an hour or something. But then it moved, I got a weired error message, that something went wrong ("while updating service data an error occured"), but at least now it's running again.


Hope they fix this soon... For the future, I think I will go back to my old habit when I was a windows user and wait with upgrading running systems. 😟

😟

Sep 21, 2014 7:49 AM in response to Chris@Work

What I ended up doing.


First, make a backup of your data. Either your client cached data (export for import), or something.


As root:

mv "/Library/Server/" "/Library/Server.off"

mv "/Application/Server.app" "/Application/Server.off/"


From the desktop GUI, note as services are disabled. That's okay.


Then as root:


mv "/Application/Server.off" "/Application/Server.app"


From the desktop GUI, redo the setup. Then from the client where you saved your data, reimport it to reload the data. Some data can be restored directly from the /Library/Server.off directory (like zone files for named).


I consider this the pure brute force method. Note, certificates are stored in a different directory structure and are thus not impacted.

Sep 24, 2014 4:32 PM in response to _morgen__

There's a whole thread about postgres DB failures and how to unstick it. Initializing postgres is literally an initdb command, not something done lightly, unless one is willing to lose all data. In my case, I was in full "forget trying to back out, just get the application up fresh so that data can be restored by other means" mode.


The migration log is actually closer to 45KB in size.

Sep 25, 2014 3:21 AM in response to mylnir

Apple Software QA is really going down. These types of bugs should NEVER HAPPEN on server apps. The last IOS8 / Iphone 6 story is also a good indication of what happens at APPLE currently. I am really concerned about that. Good software quality / stability was always a strong selling point for Apple products and if this goes away i will too. We have been forced to move to OSX Server for various reasons and this is unacceptable. Please APPLE FIX THIS and use some of your cash pile to hire some good QA ingenieurs...

Cannot connect to calendar or addressbook server HTTPChannel unhandled error

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