Schooltool dies when installing python-schooltool.ldap

Asked by George Bredberg

Hi,

I have a strange problem I seem unable to solve. In the latest test I Installed ubuntu server with ssh
Then I added exim4 relaying to our email server
Then I added ldap support for the system (I can do getent passwd and see all ldap users, did this to test if schooltool auto config from /etc/ldap.conf would work)
I also wanted to test to see if schooltool could auth against pam-ldapd instead since when installing the plugin python-schooltool.ldap kills schooltool. I have schooltool up and running. But when installing mentioned plugin schooltool refuses to start. Service schooltool start says ok, but ps aux| grep schooltool shows that its not running. If I remove the module, then it runs again.
I have a main server that runs ldap, mail, dns and the rest of the stuff needed in a modern network, so all I want with this is to make schooltool to auth against ldap (openldap on debian squeeze fully updated against the repos). Ive been googling around but I cant see anyone having this problem. I installed schooltool from the ppa:schooltool-owners/ppa

Hope someone can help. If we just can get schooltool to auth against ldap I think it would be a great tool for our school.

Regards /George

Question information

Language:
English Edit question
Status:
Expired
For:
SchoolTool Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Gediminas Paulauskas (menesis) said :
#1

Please look at the /var/log/schooltool/paste.log file for exceptions and post them here if there are any.

The file /etc/ldap.conf is created by ldap-auth-config (used by zentyal-users to configure ldap). schooltool.ldap can autoconfigure from this file only. Simply installing slapd will not create that file and you will have to configure integration through the SchoolTool's web interface or schooltool.conf, see http://book.schooltool.org/ldap.html

We have not done much testing of this module, so your experience would be very helpful for us to try and improve integration.

Revision history for this message
George Bredberg (joje47) said :
#2

Hi,
Thanks for your answer.
Yes, Ive read just about everything I could find about ldap auth with schooltool. I tried to set the "do autoconfig from /etc/ldap.conf"and Ive set manual settings according to your docs on http://book.schooltool.org/ldap.html?highlight=ldap. But problem is when schooltool doesnt even start with the module installed, there is not so much you can do. I just hoped that it would start if I found the correct settings. Even totally without ldap settings in schooltool.conf the server refuse to start.

One time (out of many, thanks heaven for vs) I actually managed to install the ldap module for schooltool, without schooltool refusing to start. I dont know of any difference in that test, because I reuse the same ubuntu server vs, with mail and ldap working. When I could login and actually see the settings page for ldap I tried to configure via the webinterface, but in the end I just locked my self out from schooltool. Even login as manager seased to work and I couldnt login as an ldap user

I have even tried to auth via pam.. I know that is doable with moodle, to let pam deal with the ldap-server issues, but Ive not succeded. It could be schooltool just needs some extra package that I dont know of, or its just not possible to do this on schootool. For me it would be a doable solution if the ldap module doesnt work. Any experience with that? Why cant schooltool auth when pam does? (as in getent passwd showing all ldap users on the vs where i installed schooltool).

This is the log you asked for; there are some messages there thats Im not so certain about what it does, but I dont see any errors, do you? Down is the entire log.

Läser konfiguration från /etc/schooltool/standard/schooltool.conf
Läser konfiguration från /etc/schooltool/standard/schooltool.conf
INFO:ZODB.blob:(6357) Blob directory /var/lib/schooltool/blobs does not exist. Selected `bushy` layout.
INFO:ZODB.blob:(6357) Blob directory '/var/lib/schooltool/blobs/' does not exist. Created new directory.
INFO:ZODB.blob:(6357) Blob temporary directory '/var/lib/schooltool/blobs/tmp' does not exist. Created new directory.
INFO:zope.app.generations:main db: evolving in mode EVOLVEMINIMUM
INFO:zope.app.generations:main db/schooltool: running install generation
INFO:zope.app.generations:main db/schooltool.cando: running install generation
INFO:zope.app.generations:main db/schooltool.gradebook: running install generation
INFO:zope.app.generations:main db/schooltool.intervention: running install generation
INFO:zope.app.generations:main db/schooltool.lyceum.journal: running install generation
INFO:zope.app.generations:main db/schooltool.requirement: running install generation

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Robin McCorkell (xenopathic) said :
#4

I am seeing this problem with SchoolTool. Without python-schooltool.ldap installed, SchoolTool starts correctly, but as soon as it is installed it refuses to start. The following was found in /var/log/schooltool/paste.log:

Reading configuration from /etc/schooltool/standard/schooltool.conf
Traceback (most recent call last):
  File "/usr/bin/start-schooltool-instance", line 9, in <module>
    load_entry_point('schooltool==2.6.0.1', 'console_scripts', 'start-schooltool-instance')()
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/run.py", line 132, in main
    paste.script.command.run(['serve', conf_file] + extra_options)
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 104, in run
    invoke(command, command_name, options, args[1:])
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 143, in invoke
    exit_code = runner.run(args)
  File "/usr/lib/python2.7/dist-packages/paste/script/command.py", line 238, in run
    result = self.command()
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 284, in command
    relative_to=base, global_conf=vars)
  File "/usr/lib/python2.7/dist-packages/paste/script/serve.py", line 321, in loadapp
    **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 247, in loadapp
    return loadobj(APP, uri, name=name, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 272, in loadobj
    return context.create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 144, in invoke
    **context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 25, in urlmap_factory
    app = loader.get_app(app_name, global_conf=global_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 350, in get_app
    name=name, global_conf=global_conf).create()
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 710, in create
    return self.object_type.invoke(self)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/loadwsgi.py", line 146, in invoke
    return fix_call(context.object, context.global_conf, **context.local_conf)
  File "/usr/lib/python2.7/dist-packages/paste/deploy/util.py", line 56, in fix_call
    val = callable(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/main.py", line 45, in schooltool_app_factory
    os.path.join(global_conf['here'], config_file))
  File "/usr/lib/python2.7/dist-packages/schooltool/paste/main.py", line 34, in __init__
    db = self.setup(options)
  File "/usr/lib/python2.7/dist-packages/schooltool/app/main.py", line 666, in setup
    self.configure(options)
  File "/usr/lib/python2.7/dist-packages/schooltool/app/main.py", line 501, in configure
    site_zcml=options.config.site_definition)
  File "/usr/lib/python2.7/dist-packages/schooltool/app/main.py", line 446, in configureComponents
    handler(options, context)
  File "/usr/lib/python2.7/dist-packages/schooltool/ldap/config.py", line 288, in handle_configuration
    fallback_login_filter=FALLBACK_LOGIN_FILTER)
  File "/usr/lib/python2.7/dist-packages/schooltool/ldap/config.py", line 163, in parse
    self.after_parse(config_file, cache)
  File "/usr/lib/python2.7/dist-packages/schooltool/ldap/config.py", line 169, in after_parse
    self.set_fallback_query(cache)
  File "/usr/lib/python2.7/dist-packages/schooltool/ldap/config.py", line 200, in set_fallback_query
    cleanup_ldap_filter(cache['fallback_filter'])
KeyError: 'fallback_filter'

I am running Ubuntu 12.04 LTS with the SchoolTool PPA, as the official guide says.