lists.arthurdejong.org
RSS feed

pynslcd problems

[Date Prev][Date Next] [Thread Prev][Thread Next]

pynslcd problems



Hi

Looking for a simpler ldap caching solution for my laptop than running a full
fledged slapd mirror, I decided to give pynslcd a try. What I found was that
you werern't kidding when you called it experimental ;-)

First of, the 0.8.10 tarball is missing cache.py, making pynslcd fail to
start. Even when building from svn, cache.py isn't installed by make install,
for the same result. Both these problems can be fixed by adding cache.py to
pynslcd_PYTHON in pynslcd/Makefile.am and re-running autogen.sh.
Patch attached.

Secondly after getting pynslcd to start, it still wouldn't work, but craches
with the following message in syslog:
Jul  6 12:26:08 ilyena pynslcd[4790]: version 0.8.10 starting
Jul  6 12:26:08 ilyena pynslcd[4790]: accepting connections
Jul  6 12:26:11 ilyena pynslcd[4790]: exception in worker
Jul  6 12:26:11 ilyena pynslcd[4790]: Traceback (most recent call last):
Jul  6 12:26:11 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
241, in worker
Jul  6 12:26:11 ilyena pynslcd[4790]:     acceptconnection(session)
Jul  6 12:26:11 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
224, in acceptconnection
Jul  6 12:26:11 ilyena pynslcd[4790]:     handler(fp, session, uid)()
Jul  6 12:26:11 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 232, in __call__
Jul  6 12:26:11 ilyena pynslcd[4790]:     self.handle_request(parameters)
Jul  6 12:26:11 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 219, in handle_request
Jul  6 12:26:11 ilyena pynslcd[4790]:     for values in 
self.cache.retrieve(parameters):
Jul  6 12:26:11 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/group.py", line 81, in retrieve
Jul  6 12:26:11 ilyena pynslcd[4790]:     q = 
itertools.groupby(query.execute(self.con),
Jul  6 12:26:11 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/cache.py", line 217, in execute
Jul  6 12:26:11 ilyena pynslcd[4790]:     return c.execute(query, 
self.parameters)
Jul  6 12:26:11 ilyena pynslcd[4790]: OperationalError: no such table: 
group_cache
Jul  6 12:26:27 ilyena pynslcd[4790]: exception in worker
Jul  6 12:26:27 ilyena pynslcd[4790]: Traceback (most recent call last):
Jul  6 12:26:27 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
241, in worker
Jul  6 12:26:27 ilyena pynslcd[4790]:     acceptconnection(session)
Jul  6 12:26:27 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
224, in acceptconnection
Jul  6 12:26:27 ilyena pynslcd[4790]:     handler(fp, session, uid)()
Jul  6 12:26:27 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 232, in __call__
Jul  6 12:26:27 ilyena pynslcd[4790]:     self.handle_request(parameters)
Jul  6 12:26:27 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 219, in handle_request
Jul  6 12:26:27 ilyena pynslcd[4790]:     for values in 
self.cache.retrieve(parameters):
Jul  6 12:26:27 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/group.py", line 81, in retrieve
Jul  6 12:26:27 ilyena pynslcd[4790]:     q = 
itertools.groupby(query.execute(self.con),
Jul  6 12:26:27 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/cache.py", line 217, in execute
Jul  6 12:26:27 ilyena pynslcd[4790]:     return c.execute(query, 
self.parameters)
Jul  6 12:26:27 ilyena pynslcd[4790]: OperationalError: no such table: 
group_cache
Jul  6 12:26:33 ilyena pynslcd[4790]: exception in worker
Jul  6 12:26:33 ilyena pynslcd[4790]: Traceback (most recent call last):
Jul  6 12:26:33 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
241, in worker
Jul  6 12:26:33 ilyena pynslcd[4790]:     acceptconnection(session)
Jul  6 12:26:33 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
224, in acceptconnection
Jul  6 12:26:33 ilyena pynslcd[4790]:     handler(fp, session, uid)()
Jul  6 12:26:33 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 232, in __call__
Jul  6 12:26:33 ilyena pynslcd[4790]:     self.handle_request(parameters)
Jul  6 12:26:33 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 219, in handle_request
Jul  6 12:26:33 ilyena pynslcd[4790]:     for values in 
self.cache.retrieve(parameters):
Jul  6 12:26:33 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/group.py", line 81, in retrieve
Jul  6 12:26:33 ilyena pynslcd[4790]:     q = 
itertools.groupby(query.execute(self.con),
Jul  6 12:26:33 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/cache.py", line 217, in execute
Jul  6 12:26:33 ilyena pynslcd[4790]:     return c.execute(query, 
self.parameters)
Jul  6 12:26:33 ilyena pynslcd[4790]: OperationalError: no such table: 
group_cache
Jul  6 12:31:46 ilyena pynslcd[4790]: exception in worker
Jul  6 12:31:46 ilyena pynslcd[4790]: Traceback (most recent call last):
Jul  6 12:31:46 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
241, in worker
Jul  6 12:31:46 ilyena pynslcd[4790]:     acceptconnection(session)
Jul  6 12:31:46 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
224, in acceptconnection
Jul  6 12:31:46 ilyena pynslcd[4790]:     handler(fp, session, uid)()
Jul  6 12:31:46 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 232, in __call__
Jul  6 12:31:46 ilyena pynslcd[4790]:     self.handle_request(parameters)
Jul  6 12:31:46 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 219, in handle_request
Jul  6 12:31:46 ilyena pynslcd[4790]:     for values in 
self.cache.retrieve(parameters):
Jul  6 12:31:46 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/group.py", line 81, in retrieve
Jul  6 12:31:46 ilyena pynslcd[4790]:     q = 
itertools.groupby(query.execute(self.con),
Jul  6 12:31:46 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/cache.py", line 217, in execute
Jul  6 12:31:46 ilyena pynslcd[4790]:     return c.execute(query, 
self.parameters)
Jul  6 12:31:46 ilyena pynslcd[4790]: OperationalError: no such table: 
group_cache
Jul  6 12:31:50 ilyena pynslcd[4790]: exception in worker
Jul  6 12:31:50 ilyena pynslcd[4790]: Traceback (most recent call last):
Jul  6 12:31:50 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
241, in worker
Jul  6 12:31:50 ilyena pynslcd[4790]:     acceptconnection(session)
Jul  6 12:31:50 ilyena pynslcd[4790]:   File "/usr/local/sbin/pynslcd", line 
224, in acceptconnection
Jul  6 12:31:50 ilyena pynslcd[4790]:     handler(fp, session, uid)()
Jul  6 12:31:50 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 232, in __call__
Jul  6 12:31:50 ilyena pynslcd[4790]:     self.handle_request(parameters)
Jul  6 12:31:50 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/common.py", line 219, in handle_request
Jul  6 12:31:50 ilyena pynslcd[4790]:     for values in 
self.cache.retrieve(parameters):
Jul  6 12:31:50 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/group.py", line 81, in retrieve
Jul  6 12:31:50 ilyena pynslcd[4790]:     q = 
itertools.groupby(query.execute(self.con),
Jul  6 12:31:50 ilyena pynslcd[4790]:   File 
"/usr/local/share/pynslcd/cache.py", line 217, in execute
Jul  6 12:31:50 ilyena pynslcd[4790]:     return c.execute(query, 
self.parameters)

However, inspecting /var/run/nslcd/cache.sqlite using the sqlite3 command-line
tool shows that the table group_cache does indeed exist, thoug it is empty.
Not being an expert at either python nor sqlite I was unable to fix this issue
:-(

FYI, I'm running Debian Wheezy on amd64, with libpam-ldapd libnss-ldapd
libpam-ldapd:i386 libnss-ldapd:i386 nslcd installed from sid (to get
0.8.10-1). I'm not using nscd. Pynscd was configured with ./configure --prefix
/usr/local --disable-nss --disable-pam --disable-nslcd --enable-pynslcd
and started using the debian init script for nslcd with NSLCD_BIN changed to
point to /usr/local/sbin/pynslcd. Also attaching my nslcd.conf, which btw works
just fine with stock nslcd.

Please tell me if there is anything else I can do to help fix this problem.

Best regards
Jon Severinsson

Attachment: nss-pam-ldapd.cache.patch
Description: Text Data

# /etc/nslcd.conf
# nslcd configuration file. See nslcd.conf(5)
# for details.

# The number of threads (and thus ldap connections) to use.
threads 3

# The user and group nslcd should run as.
uid nslcd
gid nslcd

# The location at which the LDAP server(s) should be reachable.
uri ldaps://ldap.severinsson.net/
uri ldaps://ldap2.severinsson.net

# The search base that will be used for all queries.
base dc=severinsson,dc=net

# The search scope.
#scope sub

# The LDAP protocol version to use.
#ldap_version 3

# The DN to bind with for normal lookups.
#binddn cn=annonymous,dc=example,dc=net
#bindpw secret

# The DN used for password modifications by root.
rootpwmoddn uid=root,ou=Users,dc=severinsson,dc=net

# SSL options
#ssl off
tls_reqcert demand
tls_cacertfile /etc/ssl/certs/ca-certificates.crt
-- 
To unsubscribe send an email to
nss-pam-ldapd-users-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-users/