calendarserver doesn't start, needs twisted-calendarserver rebuild

Bug #697044 reported by Jane Atkinson
48
This bug affects 6 people
Affects Status Importance Assigned to Milestone
twisted-calendarserver (Ubuntu)
Fix Released
Undecided
Unassigned
Natty
Fix Released
Medium
Brian Murray

Bug Description

Calendarserver refuses to start from /etc/init.d/calendarserver

The file /etc/default/calendarserver file has been edited to remove the comment sign. This works in earlier distros.

I can't find any logs or error messages other than:

ja@ja-desktop:~$ sudo /etc/init.d/calendarserver start
 * Starting calendarserver caldavd exec python /usr/lib/twisted-calendarserver/bin/twistd caldav
                                                                         [fail]

The behaviour occurs when I try to start it manually, or on boot-up.

also
calendarserver_export fails to start with:
ImportError: No module named twisted.web2.static

the problem is that the embeded web2 is only installed for python2.6
twisted-calendarserver needs to be rebuilt to pick up python2.7

TESTCASE:
apt-get install calendarserver python-twisted-core
python /usr/lib/twisted-calendarserver/bin/twistd caldav && echo "success"
expected output: success
failure output:
...
ImportError: No module named web2

ImportError: No module named twisted.scripts.twistd

TESTCASE2:
apt-get install calendarserver
calendarserver_export
expected output:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//CALENDARSERVER.ORG//NONSGML Version 1//EN
END:VCALENDAR

failure output:
Traceback (most recent call last):
  File "/usr/bin/calendarserver_export", line 38, in <module>
    from calendarserver.tools.export import main
  File "/usr/lib/twisted-calendarserver/lib/python2.7/site-packages/calendarserver/tools/export.py", line 39, in <module>
    from twistedcaldav.config import ConfigurationError
  File "/usr/lib/twisted-calendarserver/lib/python2.7/site-packages/twistedcaldav/__init__.py", line 36, in <module>
    from twisted.web2.static import File, loadMimeTypes
ImportError: No module named twisted.web2.static

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: calendarserver 2.4.dfsg-3
ProcVersionSignature: Ubuntu 2.6.37-11.25-generic 2.6.37-rc7
Uname: Linux 2.6.37-11-generic i686
Architecture: i386
Date: Tue Jan 4 13:51:11 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20101221.1)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_NZ:en
 LANG=en_NZ.UTF-8
 LC_MESSAGES=en_NZ.utf8
 SHELL=/bin/bash
SourcePackage: calendarserver

Revision history for this message
Jane Atkinson (irihapeti) wrote :
Revision history for this message
Mr. Sev Amari (klmsh) wrote :

Hi,

as far as i could examine, this behaviour occurs when calling

     exec python /usr/lib/twisted-calendarserver/bin/twistd caldav

But in /usr/lib/twisted-calendarserver/lib/python2.7 is no web2-module.

(~$python --version
  >Python 2.7.1+)

hope these information are helpfull when solving the problem.

.....................................................................................................................
Here are my actions and what i discovered:

Starting from command-line:

      ~$ /etc/init.d/calendarserver start

@line 44 (of file /etc/init.d/calendarserver) the following command is called

     /usr/bin/caldavd

-------------------
There, a "for-loop" is executed over python versions

     "" "2.6" "2.5"

This causes eventually the invokation of

      exec python /usr/lib/twisted-calendarserver/bin/twistd caldav
-------------------

There, in /usr/lib/twisted-calendarserver/bin/twistd, i wrapped a try-catch statement around the last two lines

      from twisted.scripts.twistd import run
      run()

-------------------
This exception-handling brings up the following exception:

Handling run-time error: No module named web2

Filename = /usr/lib/twisted-calendarserver/bin/twistd / Error Line # = 28
Filename = /usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py / Error Line # = 27
Filename = /usr/lib/python2.7/dist-packages/twisted/application/app.py / Error Line # = 626
Filename = /usr/lib/python2.7/dist-packages/twisted/application/app.py / Error Line # = 606
Filename = /usr/lib/python2.7/dist-packages/twisted/python/usage.py / Error Line # = 226
Filename = /usr/lib/python2.7/dist-packages/twisted/application/app.py / Error Line # = 617
Filename = /usr/lib/twisted-calendarserver/lib/python2.7/site-packages/twisted/plugins/caldav.py / Error Line # = 13
Filename = /usr/lib/python2.7/dist-packages/twisted/python/reflect.py / Error Line # = 351
Filename = /usr/lib/python2.7/dist-packages/twisted/python/reflect.py / Error Line # = 339
Filename = /usr/lib/twisted-calendarserver/lib/python2.7/site-packages/calendarserver/sidecar/task.py / Error Line # = 24
Filename = /usr/lib/twisted-calendarserver/lib/python2.7/site-packages/calendarserver/provision/root.py / Error Line # = 25

.................................................................
.................................................................

platform: x86_64
release: 11.04
kernel: 2.6.38-8-generic
calendarserver: 2.4.dfsg-6

Revision history for this message
Tomas Cassidy (tomas-cassidy) wrote :

I can confirm this bug on Ubuntu 11.04 with calendarserver 2.4.dfsg-6

tags: added: regression-release
Changed in calendarserver (Ubuntu):
status: New → Confirmed
Revision history for this message
Tomas Cassidy (tomas-cassidy) wrote :

The problem here is that python2.7 files have been included in the main calendarserver package, while previously the python2.6 files existed in python-twisted-calendarserver. The web2 files from python-twisted-calendarserver have not been upgraded to python 2.7 since Ubuntu switched from python 2.6 to python 2.7.

Revision history for this message
Tomas Cassidy (tomas-cassidy) wrote :

It looks like the main issue has been reported as bug #712214.

tags: added: python27
Revision history for this message
Julian Taylor (jtaylor) wrote :

an rebuild of twisted-calendarserver so it picks up python2.7 should suffice to solve both bugs

description: updated
tags: added: oneiric
summary: - Natty: calendarserver doesn't start
+ calendarserver doesn't start, needs twisted-calendarserver
Julian Taylor (jtaylor)
description: updated
description: updated
summary: - calendarserver doesn't start, needs twisted-calendarserver
+ calendarserver doesn't start, needs twisted-calendarserver rebuild
Julian Taylor (jtaylor)
description: updated
Michael Bienia (geser)
affects: calendarserver (Ubuntu) → twisted-calendarserver (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package twisted-calendarserver - 8.2.0.svn27622-2ubuntu1

---------------
twisted-calendarserver (8.2.0.svn27622-2ubuntu1) oneiric; urgency=low

  * rebuild for python 2.7 support (LP: #697044)
  * set used interpreter for executables to /usr/bin/python
 -- Julian Taylor <email address hidden> Tue, 09 Aug 2011 13:19:43 +0200

Changed in twisted-calendarserver (Ubuntu):
status: Confirmed → Fix Released
tags: added: testcase
Revision history for this message
Brian Murray (brian-murray) wrote :

I found this in the sponsorship queue today while patch piloting and saw the open Natty task so I added the patch to Natty and uploaded the fix to natty-proposed.

Changed in twisted-calendarserver (Ubuntu Natty):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → Medium
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Jane, or anyone else affected,

Accepted twisted-calendarserver into natty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in twisted-calendarserver (Ubuntu Natty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Jane Atkinson (irihapeti) wrote :

Enabled Natty-proposed and then installed CalendarServer.

Started CalendarServer successfully and then was able to access the server admin interface via Firefox.

As far as I'm concerned, the problem is solved.

description: updated
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package twisted-calendarserver - 8.2.0.svn27622-2ubuntu0.1

---------------
twisted-calendarserver (8.2.0.svn27622-2ubuntu0.1) natty-proposed; urgency=low

  * rebuild for python 2.7 support (LP: #697044)
  * set used interpreter for executables to /usr/bin/python
 -- Julian Taylor <email address hidden> Tue, 09 Aug 2011 13:19:43 +0200

Changed in twisted-calendarserver (Ubuntu Natty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.