[CalendarServer-users] Running caldavd directly and repository
configuration
Etienne Samson
samson.etienne at gmail.com
Mon Feb 4 09:16:50 PST 2008
Hi !
First, I've been able to run caldavd directly, WITHOUT running it
using the ./run script (I'm saying this because it's the number one
complain I have seen while looking for a solution). So, here are the
steps :
- Get the caldav source code using svn (following instructions on this
page). Quick note, (because I was stung by this) you'll have to
checkout it inside an empty directory (I did my initial checkout in my
Sources/System directory, and ./run -s failed with a really wierd
error message while DLing PyXML because I already had a PyXML folder
in System).
- Run ./run -s, so that it downloads all required dependencies (and
builds them).
- Next, you'll need to do a "python ./setup.py install" in each
dependency directory (PyXML, pydirector, PyOpenDirectory, PyKerberos,
Twisted, vobject). (sudo might be needed for some of them).
Also, caldavd uses the web2 package from twisted, which is not
installed by default, so you'll need to do an additionnal "python ./
twisted/web2/topfiles/setup.py install" while you're in the Twisted
directory.
- Go back to the CalendarServer directory, and issue "python ./
setup.py install". This will install caldavd to /usr/local/bin.
- Now create /etc/caldavd, and add the required config files
(caldavd.plist, accounts.xml, ...). You should be up and running.
- I guess running it inside launchd is easy from there, but I still
haven't managed to. I'm getting "Python: can't open file '': [Errno 2]
No such file or directory" which I have no clue about what it mean, so
I have abandoned trying using launchd for now.
Now, here is the problem I'm having :
When I try to connect to the repository using iCal on 10.5.1, I'm
getting a stacktrace from caldavd (See 1 at the end of mail). It seems
to indicate an error, but as I don't have any documentation on the
inner guts of the repository, I don't know what to do. I tried mkdir-
ing the missing directory (I'm not even sure it's a directory), it
works, but iCal fails saying "500 Internal Error", and I have the
stacktrace 2 in caldavd log.
Right now I have created in /Library/CalendarServer :
principals/
__uids__/
myuser/
... + the missing UIDs that make iCal fail to connect.
calendars/
Thanks in advance !
Etienne Samson
Stacktrace 1 :
2008-02-04 17:33:23+0100 [-] [caldav-8009] [AMP,client] Provisioning
file: <DirectoryPrincipalTypeProvisioningResource: /Library/
CalendarServer/principals/users>
2008-02-04 17:33:23+0100 [-] [caldav-8009] [AMP,client] Provisioning
file: <DirectoryPrincipalTypeProvisioningResource: /Library/
CalendarServer/principals/users>
2008-02-04 17:33:23+0100 [-] [caldav-8009] [AMP,client] Provisioning
file: (users) admin
2008-02-04 17:33:23+0100 [-] [caldav-8009] [AMP,client] Exception
rendering:
2008-02-04 17:33:23+0100 [-] [caldav-8009] [AMP,client] Unhandled Error
2008-02-04 17:33:23+0100 [-] [caldav-8009] Traceback (most recent
call last):
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/server.py", line 314, in _getChild
2008-02-04 17:33:23+0100 [-] [caldav-8009] result =
res.locateChild(self, path)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/resource.py", line 64, in
locateChild
2008-02-04 17:33:23+0100 [-] [caldav-8009] d.addCallback(lambda
_: super(AutoProvisioningResourceMixIn, self).locateChild(request,
segments))
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 191, in addCallback
2008-02-04 17:33:23+0100 [-] [caldav-8009] callbackKeywords=kw)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 182, in addCallbacks
2008-02-04 17:33:23+0100 [-] [caldav-8009] self._runCallbacks()
2008-02-04 17:33:23+0100 [-] [caldav-8009] --- <exception caught
here> ---
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 317, in _runCallbacks
2008-02-04 17:33:23+0100 [-] [caldav-8009] self.result =
callback(self.result, *args, **kw)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/resource.py", line 64, in
<lambda>
2008-02-04 17:33:23+0100 [-] [caldav-8009] d.addCallback(lambda
_: super(AutoProvisioningResourceMixIn, self).locateChild(request,
segments))
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/dav/static.py", line 169, in locateChild
2008-02-04 17:33:23+0100 [-] [caldav-8009] child =
self.getChild(segments[0])
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 254, in
getChild
2008-02-04 17:33:23+0100 [-] [caldav-8009] return
self.principalForShortName(self.recordType, name)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 85, in
principalForShortName
2008-02-04 17:33:23+0100 [-] [caldav-8009] return
self.principalForRecord(self.directory.recordWithShortName(recordType,
name))
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 99, in
principalForRecord
2008-02-04 17:33:23+0100 [-] [caldav-8009] return
self.principalForGUID(record.guid)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 91, in
principalForGUID
2008-02-04 17:33:23+0100 [-] [caldav-8009] return
self.principalForUID(guid)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 236, in
principalForUID
2008-02-04 17:33:23+0100 [-] [caldav-8009] return
self.parent.principalForUID(uid)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 123, in
principalForUID
2008-02-04 17:33:23+0100 [-] [caldav-8009] return
self.getChild(uidsResourceName).getChild(uid)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 320, in
getChild
2008-02-04 17:33:23+0100 [-] [caldav-8009] primaryPrincipal =
DirectoryCalendarPrincipalResource(self.fp.child(name).path, self,
record)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 371, in
__init__
2008-02-04 17:33:23+0100 [-] [caldav-8009] self.provision()
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/static.py", line 396, in provision
2008-02-04 17:33:23+0100 [-] [caldav-8009] self.provisionFile()
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twistedcaldav/directory/principal.py", line 380, in
provisionFile
2008-02-04 17:33:23+0100 [-] [caldav-8009]
self.writeDeadProperty(RecordTypeProperty(self.record.recordType))
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/dav/resource.py", line 497, in
writeDeadProperty
2008-02-04 17:33:23+0100 [-] [caldav-8009]
self.deadProperties().set(property)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/dav/xattrprops.py", line 125, in set
2008-02-04 17:33:23+0100 [-] [caldav-8009]
self.attrs[self._encode(property.qname())] = compress(property.toxml())
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/System/Library/
Frameworks/Python.framework/Versions/2.5/Extras/lib/python/xattr/
__init__.py", line 115, in __setitem__
2008-02-04 17:33:23+0100 [-] [caldav-8009] self.set(item, value)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/System/Library/
Frameworks/Python.framework/Versions/2.5/Extras/lib/python/xattr/
__init__.py", line 81, in set
2008-02-04 17:33:23+0100 [-] [caldav-8009] self._set(name, value,
0, options | self.options)
2008-02-04 17:33:23+0100 [-] [caldav-8009] File "/System/Library/
Frameworks/Python.framework/Versions/2.5/Extras/lib/python/xattr/
__init__.py", line 16, in _func
2008-02-04 17:33:23+0100 [-] [caldav-8009] return func(first,
*args)
2008-02-04 17:33:23+0100 [-] [caldav-8009] exceptions.IOError: [Errno
2] No such file or directory: '/Library/CalendarServer/principals/
__uids__/6b82b3ca-576a-5298-bfa9-572d3e5a131b'
Stacktrace 2:
2008-02-04 18:05:57+0100 [-] [caldav-8009] [AMP,client] Exception
rendering:
2008-02-04 18:05:57+0100 [-] [caldav-8009] [AMP,client] Unhandled Error
2008-02-04 18:05:57+0100 [-] [caldav-8009] Traceback (most recent
call last):
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/static.py", line 124, in renderHTTP
2008-02-04 18:05:57+0100 [-] [caldav-8009] d =
maybeDeferred(super(StaticRenderMixin, self).renderHTTP, request)
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 107, in maybeDeferred
2008-02-04 18:05:57+0100 [-] [caldav-8009] result = f(*args, **kw)
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/resource.py", line 88, in renderHTTP
2008-02-04 18:05:57+0100 [-] [caldav-8009] return method(request)
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 677, in
unwindGenerator
2008-02-04 18:05:57+0100 [-] [caldav-8009] return
_deferGenerator(f(*args, **kwargs), Deferred())
2008-02-04 18:05:57+0100 [-] [caldav-8009] --- <exception caught
here> ---
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 576, in
_deferGenerator
2008-02-04 18:05:57+0100 [-] [caldav-8009] result = g.next()
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/web2/dav/method/propfind.py", line 55, in
http_PROPFIND
2008-02-04 18:05:57+0100 [-] [caldav-8009] x.getResult()
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/internet/defer.py", line 555, in getResult
2008-02-04 18:05:57+0100 [-] [caldav-8009]
self.result.raiseException()
2008-02-04 18:05:57+0100 [-] [caldav-8009] File "/Library/Python/
2.5/site-packages/twisted/python/failure.py", line 303, in
raiseException
2008-02-04 18:05:57+0100 [-] [caldav-8009] raise self.type,
self.value, self.tb
2008-02-04 18:05:57+0100 [-] [caldav-8009] sqlite3.OperationalError:
unable to open database file
More information about the calendarserver-users
mailing list