[CalendarServer-users] problems running as a daemon....
Jeremy Paul Carroll
jem at woodpeckeraudio.com
Sat Jun 27 08:08:23 PDT 2009
Hi... I am having problems running the server as a daemon process...
it works fine when running in the foreground (i.e. using "./run")
Here is what happens...
$ ./run -d
Building PyXML...
Building PyKerberos...
Building PyOpenDirectory...
Building select26...
Building PyDirector...
Using python as Python
Starting server...
exec python //Twisted/bin/twistd caldav -f /calendarserver/conf/
caldavd-dev.plist -o ProcessType=Combined
/calendarserver/calendarserver/tap/caldav.py:48: DeprecationWarning:
mktap and related support modules are deprecated as of Twisted 8.0.
Use Twisted Application Plugins with the 'twistd' command directly, as
described in 'Writing a Twisted Application Plugin for twistd' chapter
of the Developer Guide.
from twisted.scripts.mktap import getid
Traceback (most recent call last):
File "//Twisted/bin/twistd", line 19, in <module>
run()
File "//Twisted/twisted/scripts/twistd.py", line 27, in run
app.run(runApp, ServerOptions)
File "//Twisted/twisted/application/app.py", line 694, in run
runApp(config)
File "//Twisted/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
File "//Twisted/twisted/application/app.py", line 423, in run
self.logger.start(None)
File "//Twisted/twisted/application/app.py", line 251, in start
observer = self._getLogObserver()
File "//Twisted/twisted/scripts/_twistd_unix.py", line 140, in
_getLogObserver
logFile = logfile.LogFile.fromFullPath(self._logfilename)
File "//Twisted/twisted/python/logfile.py", line 47, in fromFullPath
os.path.dirname(logPath), *args, **kwargs)
File "//Twisted/twisted/python/logfile.py", line 147, in __init__
BaseLogFile.__init__(self, name, directory, defaultMode)
File "//Twisted/twisted/python/logfile.py", line 39, in __init__
self._openFile()
File "//Twisted/twisted/python/logfile.py", line 152, in _openFile
BaseLogFile._openFile(self)
File "//Twisted/twisted/python/logfile.py", line 63, in _openFile
self._file = file(self.path, "r+", 1)
IOError: [Errno 13] Permission denied: '/calendarserver/logs/error.log'
launchctl bsexec failed: No such file or directory
I'm sure it's probably something fairly simple - I have tried removing
the entries from the "run" script as detailed in http://tobyrush.blogspot.com/2007/11/dummies-guide-to-darwin-calendar-server.html
, but that doesn't seem to make a difference.
One thing that does concern me is the header comments in the 'run'
script, which are as follows:
# WARNING: This script is intended for use by developers working on
# the Calendar Server code base. It is not intended for use in a
# deployment configuration.
#
# DO NOT use this script as a system startup tool (eg. in /etc/init.d,
# /Library/StartupItems, launchd plists, etc.)
#
# For those uses, install the server properly (eg. with "./run -i
# /tmp/foo && cd /tmp/foo && pax -pe -rvw . /") and use the caldavd
# executable to start the server.
##
This is very different to all the other instructions I have found
detailing how to get it running....
Hopefully some kind soul will be able to shed some light.
P.S While I am not a newby with Unix, I am very rusty....
Cheers!!
Jem.
More information about the calendarserver-users
mailing list