Hello, I am trying to get calendar server to run on a CentOS Linux server. I am getting a crash with the run script. The logs are attached. I see the errors... [...] File "/home/caldav/src/calendar-server/pysqlite-2.3.2/build/lib.linux-i686-2.5/pysqlite2/dbapi2.py", line 27, in <module> from pysqlite2._sqlite import * exceptions.ImportError: No module named _sqlite [...] and... [...] File "/home/caldav/src/calendar-server/Twisted/twisted/python/components.py", line 87, in registerAdapter raise ValueError("an adapter (%s) was already registered." % (factory, )) exceptions.ValueError: an adapter (twisted.internet.protocol.ProtocolToConsumerAdapter) was already registered. [...] ...early on. Are those the culprits? Best regards, Kervin Traceback (most recent call last): File "/home/caldav/src/calendar-server/Twisted/twisted/application/app.py", line 354, in parseOptions usage.Options.parseOptions(self, options) File "/home/caldav/src/calendar-server/Twisted/twisted/python/usage.py", line 184, in parseOptions for (cmd, short, parser, doc) in self.subCommands: File "/home/caldav/src/calendar-server/Twisted/twisted/application/app.py", line 364, in subCommands for plug in plugins: File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 186, in getPlugins allDropins = getCache(package) --- <exception caught here> --- File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 151, in getCache provider = pluginModule.load() File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 378, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 614, in moduleLoader return self._moduleLoader(modname) File "/home/caldav/src/calendar-server/Twisted/twisted/python/reflect.py", line 361, in namedAny topLevelPackage = __import__(trialname) File "/home/caldav/src/calendar-server/CalendarServer/twisted/plugins/caldav.py", line 1, in <module> from twistedcaldav.tap import CalDAVServiceMaker File "/home/caldav/src/calendar-server/CalendarServer/twistedcaldav/tap.py", line 49, in <module> from twistedcaldav.directory.digest import QopDigestCredentialFactory File "/home/caldav/src/calendar-server/CalendarServer/twistedcaldav/directory/digest.py", line 19, in <module> from twistedcaldav.sql import AbstractSQLDatabase File "/home/caldav/src/calendar-server/CalendarServer/twistedcaldav/sql.py", line 32, in <module> from pysqlite2 import dbapi2 as sqlite File "/home/caldav/src/calendar-server/pysqlite-2.3.2/build/lib.linux-i686-2.5/pysqlite2/dbapi2.py", line 27, in <module> from pysqlite2._sqlite import * exceptions.ImportError: No module named _sqlite Traceback (most recent call last): File "/home/caldav/src/calendar-server/Twisted/twisted/application/app.py", line 354, in parseOptions usage.Options.parseOptions(self, options) File "/home/caldav/src/calendar-server/Twisted/twisted/python/usage.py", line 184, in parseOptions for (cmd, short, parser, doc) in self.subCommands: File "/home/caldav/src/calendar-server/Twisted/twisted/application/app.py", line 364, in subCommands for plug in plugins: File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 186, in getPlugins allDropins = getCache(package) --- <exception caught here> --- File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 151, in getCache provider = pluginModule.load() File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 378, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 614, in moduleLoader return self._moduleLoader(modname) File "/home/caldav/src/calendar-server/Twisted/twisted/python/reflect.py", line 361, in namedAny topLevelPackage = __import__(trialname) File "/home/caldav/src/calendar-server/Twisted/twisted/plugins/twisted_lore.py", line 4, in <module> from twisted.lore.scripts.lore import IProcessor File "/home/caldav/src/calendar-server/Twisted/twisted/lore/scripts/lore.py", line 8, in <module> from twisted.lore import process, indexer, numberer, htmlbook File "/home/caldav/src/calendar-server/Twisted/twisted/lore/process.py", line 7, in <module> import tree #todo: get rid of this later File "/home/caldav/src/calendar-server/Twisted/twisted/lore/tree.py", line 8, in <module> from twisted.web import microdom, domhelpers File "/home/caldav/src/calendar-server/Twisted/twisted/web/microdom.py", line 30, in <module> from twisted.web.sux import XMLParser, ParseError File "/home/caldav/src/calendar-server/Twisted/twisted/web/sux.py", line 23, in <module> from twisted.internet.protocol import Protocol, FileWrapper File "/home/caldav/src/calendar-server/Twisted/twisted/internet/protocol.py", line 394, in <module> interfaces.IConsumer) File "/home/caldav/src/calendar-server/Twisted/twisted/python/components.py", line 87, in registerAdapter raise ValueError("an adapter (%s) was already registered." % (factory, )) exceptions.ValueError: an adapter (twisted.internet.protocol.ProtocolToConsumerAdapter) was already registered. Traceback (most recent call last): File "/home/caldav/src/calendar-server/Twisted/twisted/python/usage.py", line 373, in __str__ return self.getSynopsis() + '\n' + self.getUsage(width=None) File "/home/caldav/src/calendar-server/Twisted/twisted/python/usage.py", line 407, in getUsage for (cmd, short, parser, desc) in self.subCommands: File "/home/caldav/src/calendar-server/Twisted/twisted/application/app.py", line 364, in subCommands for plug in plugins: File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 186, in getPlugins allDropins = getCache(package) --- <exception caught here> --- File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 151, in getCache provider = pluginModule.load() File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 378, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 614, in moduleLoader return self._moduleLoader(modname) File "/home/caldav/src/calendar-server/Twisted/twisted/python/reflect.py", line 361, in namedAny topLevelPackage = __import__(trialname) File "/home/caldav/src/calendar-server/CalendarServer/twisted/plugins/caldav.py", line 1, in <module> from twistedcaldav.tap import CalDAVServiceMaker File "/home/caldav/src/calendar-server/CalendarServer/twistedcaldav/tap.py", line 39, in <module> from twisted.web2.channel import http File "/home/caldav/src/calendar-server/Twisted/twisted/web2/channel/__init__.py", line 9, in <module> from twisted.web2.channel.http import HTTPFactory File "/home/caldav/src/calendar-server/Twisted/twisted/web2/channel/http.py", line 8, in <module> from twisted.protocols import policies, basic File "/home/caldav/src/calendar-server/Twisted/twisted/protocols/policies.py", line 16, in <module> from twisted.internet.protocol import ServerFactory, Protocol, ClientFactory File "/home/caldav/src/calendar-server/Twisted/twisted/internet/protocol.py", line 394, in <module> interfaces.IConsumer) File "/home/caldav/src/calendar-server/Twisted/twisted/python/components.py", line 87, in registerAdapter raise ValueError("an adapter (%s) was already registered." % (factory, )) exceptions.ValueError: an adapter (twisted.internet.protocol.ProtocolToConsumerAdapter) was already registered. Traceback (most recent call last): File "/home/caldav/src/calendar-server/Twisted/twisted/python/usage.py", line 373, in __str__ return self.getSynopsis() + '\n' + self.getUsage(width=None) File "/home/caldav/src/calendar-server/Twisted/twisted/python/usage.py", line 407, in getUsage for (cmd, short, parser, desc) in self.subCommands: File "/home/caldav/src/calendar-server/Twisted/twisted/application/app.py", line 364, in subCommands for plug in plugins: File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 186, in getPlugins allDropins = getCache(package) --- <exception caught here> --- File "/home/caldav/src/calendar-server/Twisted/twisted/plugin.py", line 151, in getCache provider = pluginModule.load() File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 378, in load return self.pathEntry.pythonPath.moduleLoader(self.name) File "/home/caldav/src/calendar-server/Twisted/twisted/python/modules.py", line 614, in moduleLoader return self._moduleLoader(modname) File "/home/caldav/src/calendar-server/Twisted/twisted/python/reflect.py", line 361, in namedAny topLevelPackage = __import__(trialname) File "/home/caldav/src/calendar-server/Twisted/twisted/plugins/twisted_lore.py", line 4, in <module> from twisted.lore.scripts.lore import IProcessor File "/home/caldav/src/calendar-server/Twisted/twisted/lore/scripts/lore.py", line 8, in <module> from twisted.lore import process, indexer, numberer, htmlbook File "/home/caldav/src/calendar-server/Twisted/twisted/lore/process.py", line 7, in <module> import tree #todo: get rid of this later File "/home/caldav/src/calendar-server/Twisted/twisted/lore/tree.py", line 8, in <module> from twisted.web import microdom, domhelpers File "/home/caldav/src/calendar-server/Twisted/twisted/web/microdom.py", line 30, in <module> from twisted.web.sux import XMLParser, ParseError File "/home/caldav/src/calendar-server/Twisted/twisted/web/sux.py", line 23, in <module> from twisted.internet.protocol import Protocol, FileWrapper File "/home/caldav/src/calendar-server/Twisted/twisted/internet/protocol.py", line 394, in <module> interfaces.IConsumer) File "/home/caldav/src/calendar-server/Twisted/twisted/python/components.py", line 87, in registerAdapter raise ValueError("an adapter (%s) was already registered." % (factory, )) exceptions.ValueError: an adapter (twisted.internet.protocol.ProtocolToConsumerAdapter) was already registered. Usage: twistd [options] Options: --savestats save the Stats object rather than the text output of the profiler. -o, --no_save do not save state on shutdown -e, --encrypted The specified tap/aos/xml file is encrypted. --nothotshot Don't use the 'hotshot' profiler even if it's available. -n, --nodaemon don't daemonize -q, --quiet No-op for backwards compatability. --originalname Don't try to change the process name --syslog Log to syslog, not to file --euid Set only effective user-id rather than real user-id. (This option has no effect unless the server is running as root, in which case it means not to shed all privileges after binding ports, retaining the option to regain privileges in cases such as spawning processes. Use with caution.) -l, --logfile= log to a specified file, - for stdout -p, --profile= Run in profile mode, dumping results to specified file -f, --file= read the given .tap file [default: twistd.tap] -y, --python= read an application from within a Python file (implies -o) -x, --xml= Read an application from a .tax file (Marmalade format). -s, --source= Read an application from a .tas file (AOT format). -d, --rundir= Change to a supplied directory before running [default: .] --report-profile= E-mail address to use when reporting dynamic execution profiler stats. This should not be combined with other profiling options. This will only take effect if the application to be run has an application name. --prefix= use the given prefix when syslogging [default: twisted] --pidfile= Name of the pidfile [default: twistd.pid] --chroot= Chroot to a supplied directory before running -u, --uid= The uid to run as. -g, --gid= The gid to run as. --help-reactors Display a list of possibly available reactor names. --version Print version information and exit. --spew Print an insanely verbose log of everything that happens. Useful when debugging freezes or locks in complex code. -b, --debug run the application in the Python Debugger (implies nodaemon), sending SIGUSR2 will drop into debugger -r, --reactor= Which reactor to use (see --help-reactors for a list of possibilities) --help Display this help and exit. Commands: web2 An HTTP/1.1 web server that can serve from a filesystem or application resource. ftp An FTP server. telnet A simple, telnet-based remote debugging service. socks A SOCKSv4 proxy service. manhole-old An interactive remote debugger service. portforward A simple port-forwarder. web A general-purpose web server which can serve from a filesystem or application resource. inetd An inetd(8) replacement. news A news server. words A modern words server toc An AIM TOC service. dns A domain name server. mail An email service manhole An interactive remote debugger service accessible via telnet and ssh and providing syntax coloring and basic line editing functionality. conch A Conch SSH service. /home/caldav/src/calendar-server/Twisted/bin/twistd: Unknown command: caldav
Hello,
I am trying to get calendar server to run on a CentOS Linux server. I am getting a crash with the run script. The logs are attached.
I see the errors...
[...] File "/home/caldav/src/calendar-server/pysqlite-2.3.2/build/lib.linux-i686-2.5/pysqlite2/dbapi2.py", line 27, in <module> from pysqlite2._sqlite import * exceptions.ImportError: No module named _sqlite [...]
This probably means sqlite build went wrong. Follow Rem1 in my Linux Howto (joined).
and...
[...] File "/home/caldav/src/calendar-server/Twisted/twisted/python/components.py", line 87, in registerAdapter raise ValueError("an adapter (%s) was already registered." % (factory, )) exceptions.ValueError: an adapter (twisted.internet.protocol.ProtocolToConsumerAdapter) was already registered. [...]
Fot this, i don't know. Hopelessly, it's a side effect of previous error.
...early on. Are those the culprits?
Best regards, Kervin _______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/calendarserver-users
Hello, Thanks a lot that help. Eventually, I still had to give up since the Linux VPS I used did not have filesystem attributes support :-) Best regards, Kervin --- mwacker@linagora.com wrote:
Hello,
I am trying to get calendar server to run on a CentOS Linux server. I am getting a crash with the run script. The logs are attached.
I see the errors...
[...] File
"/home/caldav/src/calendar-server/pysqlite-2.3.2/build/lib.linux-i686-2.5/pysqlite2/dbapi2.py",
line 27, in <module> from pysqlite2._sqlite import * exceptions.ImportError: No module named _sqlite [...]
This probably means sqlite build went wrong. Follow Rem1 in my Linux Howto (joined).
and...
[...] File
"/home/caldav/src/calendar-server/Twisted/twisted/python/components.py",
line 87, in registerAdapter raise ValueError("an adapter (%s) was already registered." % (factory, )) exceptions.ValueError: an adapter
(twisted.internet.protocol.ProtocolToConsumerAdapter)
was already registered. [...] Fot this, i don't know. Hopelessly, it's a side effect of previous error.
...early on. Are those the culprits?
Best regards, Kervin _______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/calendarserver-users
Build and run Darwin Calendar Server (DCS) on Linux...
... and test it with mozilla-sunbird
Introduction : Here is how i get DCS working. This is probably not the best way to set it, neither the more secure, but i'm just able to connect Sunbird to it, with elementary events management.
I used admin account to simplify tests.
1- Get and build the source
$> svn checkout
http://svn.macosforge.org/repository/calendarserver/CalendarServer/trunk
CalendarServer
The project contains some scripting to download dependencies needed for the server to run :
$>cd CalendarServer $>./run -s
This will download and build DCS dependencies in the same directory where DCS resides
$> ls .. CalendarServer PyKerberos pysqlite-2.3.2 Twisted xattr pydirector-1.0.0 pyOpenSSL-0.6 python-dateutil-1.1 vobject ZopeInterface-3.1.0c1
Rem1 : If something goes wrong during this dependencies build phase, remove the directory where the build error occured and then do "./run -s" again".
Rem2 : if you have python-xattr package installed on your linux distribution, you'd better remove it, because DCS use a particular version (which is downloaded by "./run -s").
2- Configure and run
The most difficult (not so difficult:) thing to do before having DCS running on Linux is to get a File System supporting eXtend ATTRibutes mounted, where to put DCS datas.
2.1 Verify Kernel capabalities about eXtend ATTRibutes.
First, Verify that your Linux Kernel is able to manage such File System. On my Ubuntu box i do it like this :
$> grep XATTR /boot/config-2.6.17-10-generic CONFIG_EXT2_FS_XATTR=y CONFIG_EXT3_FS_XATTR=y CONFIG_REISERFS_FS_XATTR=y # CONFIG_CIFS_XATTR is not set
This means i can mount ext2, ext3 and REISER File System with support of eXtended ATTRibutes.
Rem 1 : On other distribution the checking is done by command like : $> zgrep ATTR /proc/config.gz With the same type of output.
Rem 2 : If your kernel does not support XATTR (CONFIG_..._XATTR=n), you need to get or build one that do. But i will not explain this here.
2.2 Mount an XATTR file system
In this example i'm mounting the /dev/sda3 partition on the /mnt mounting point with support for user eXtended ATTRibutes. $> sudo vi /etc/fstab
Add the line for your partition : /dev/sda3 /mnt/ ext3 user,rw,user_xattr
$> sudo mount /mnt
Add a directory where to put dcs data : $> sudo mkdir /mnt/dcs-data $> sudo chown $USER:$USER /mnt/dcs-data/ Last command will enable caldavd daemon to read/write in his data directory (as soon as it's launched by $USER).
2.3 Configure DCS to put his datas on the right partition
In DCS source directory, copy and edit the developpement config file: $> cp ./conf/caldavd-test.plist ./conf/caldavd-dev.plist $> vi ./conf/caldavd-dev.plist
Look for the string element specifying where to put data : <string>twistedcaldav/test/data/</string> And change it to point to a directory of your XATTR mounting point : <string>/mnt/dcs-data/</string>
3- Run DCS
$> ./run 2007/01/28 14:03 +0200 [-] Log opened. 2007/01/28 14:03 +0200 [-] twistd 2.4.0+r18545 (/usr/bin/python 2.4.4) starting up 2007/01/28 14:03 +0200 [-] reactor class: <class 'twisted.internet.selectreactor.SelectReactor'> 2007/01/28 14:03 +0200 [-] Setting up document root: /mnt/dcs-data 2007/01/28 14:03 +0200 [-] twisted.web2.channel.http.HTTPFactory starting on 8008 2007/01/28 14:03 +0200 [-] Starting factory <twisted.web2.channel.http.HTTPFactory instance at 0xb73d7eac> 2007/01/28 14:03 +0200 [-] twisted.web2.channel.http.HTTPFactory starting on 8443
Rem : I got an error in caldavd shell script on line 46: CalendarServer/bin/caldavd: 46: Syntax error: Bad substitution
I just (badly) commented this line, as i don't understand what's wrong with it.
First Tests : You should be able to access to http://localhost:8008/ with your navigator. When asked for login, use user admin (password admin). You can browse DCS Collections
4- Connect to DCS with mozilla Sunbird
I use SunBird-0.3. Add a calendar, of type Network/CalDAV. Put admin Calendar URL :
http://localhost:8008/calendars/users/admin/calendar/
Enter Login/Password (admin/admin).
Try to add event in this calendar and verify in caldavd logs that everything goes fine without error. You can see new ressources in the
http://localhost:8008/calendars/users/admin/calendar/
collection by browsing it with your navigator. If you open such ressource you'll see the ICS definition of the event.
That's all for now.
Next steps would be use normal user accounts and show different sharing use cases between them, by setting different ACL scheme between them (as soon as i find a proper way to set WebDAV ACLs).
Every comments are wellcomed. Hope other people will succeed with this little howto. If not, use Darwin Calendar User Mailing List. I'll help you (on sparse time).
Maxime Wacker 2007-01-28
_______________________________________________ calendarserver-users mailing list calendarserver-users@lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/calendarserver-users
participants (2)
-
Kervin L. Pierre
-
mwacker@linagora.com