I have spent some good time playing with ldap queries and think I have a good grasp on it.
The application is simple. I am querying a Microsoft server for email address info. Simple.
I have setup slapd to act as a proxy. And I can perform my lookups with no problem, but when I try to turn on pcache options. Slapd gives no configuration errors and exits on startup.
Since it should pull all database info, do I need an initial database?
Where can I generate more errors on the abnormal exit?
Running on fedora, The basics of my config that are working are:
database ldap suffix "dc=office,dc=spotswood,dc=org" rootdn "dc=office,dc=spotswood,dc=org" rootpw maildata uri "ldap://192.168.0.2:389/" # overlay pcache # proxyCache bdb 100000 1 1000 100 # cachesize 20 # proxyAttrset 0 mail postaladdress telephonenumber # proxyTemplate (sn=) 0 3600 # proxyTemplate (&(sn=)(givenName=)) 0 3600 # proxyTemplate (&(departmentNumber=)(secretary=*)) 0 3600
directory /var/lib/ldap
# Indices to maintain for this database index objectClass eq,pres index ou,cn,mail,surname,givenname eq,pres,sub
Again, the above works,
But when I uncomment the cache stuff. Slapd doesn't give errors but doesn't keep running either.
Everything I read on the net references an old document about the concept, but nothing about actual configuration that works with the current release.
Anyone accomplish this? Looking for any help before having to get in source code.
Nathan
Nathan Morrow wrote:
Everything I read on the net references an old document about the concept, but nothing about actual configuration that works with the current release.
Which "current release" are you talking about? You never specified the version of software you're working with. 2.3.39 or 2.4.6 would be "current" right now.
Anyone accomplish this? Looking for any help before having to get in source code.
See test020 in the test suite.
I was running 2.3.34 that is the latest rpm with Fedora 7. I just upgrade all the ldap rpms to 2.3.39. Exact same results.
I get this warning when I start the slapd daemon: Checking configuration files for slapd: [WARNING] bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=office,dc=spotswood,dc=org.
But that is just a performance warning. No other errors logged (that I have found). Slapd just exits.
-----Original Message----- From: Howard Chu [mailto:hyc@symas.com] Sent: Tuesday, November 20, 2007 9:29 AM To: Nathan Morrow Cc: openldap-software@openldap.org Subject: Re: pcache configuration
Nathan Morrow wrote:
Everything I read on the net references an old document about the concept, but nothing about actual configuration that works with the current release.
Which "current release" are you talking about? You never specified the version of software you're working with. 2.3.39 or 2.4.6 would be "current" right now.
Anyone accomplish this? Looking for any help before having to get in source code.
See test020 in the test suite.
--On November 20, 2007 1:20:34 PM -0500 Nathan Morrow nmorrow@spotswood.org wrote:
I was running 2.3.34 that is the latest rpm with Fedora 7. I just upgrade all the ldap rpms to 2.3.39. Exact same results.
I get this warning when I start the slapd daemon: Checking configuration files for slapd: [WARNING] bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=office,dc=spotswood,dc=org.
But that is just a performance warning. No other errors logged (that I have found). Slapd just exits.
Run slapd -d -1
--Quanah
--
Quanah Gibson-Mount Principal Software Engineer Zimbra, Inc -------------------- Zimbra :: the leader in open source messaging and collaboration
Thanks for the tip. It did resolve one little thing. My lack of rootdn, proxycache was exiting one.
Unfortunately fixing that just led me to a segmentation fault:
slapd startup: initiated. backend_startup_one: starting "cn=config" config_back_db_open config_build_entry: "cn=config" config_build_entry: "cn=include{0}" config_build_entry: "cn=include{1}" config_build_entry: "cn=include{2}" config_build_entry: "cn=include{3}" config_build_entry: "cn=include{4}" config_build_entry: "cn=module{0}" config_build_entry: "cn=schema" config_build_entry: "cn={0}core" config_build_entry: "cn={1}cosine" config_build_entry: "cn={2}inetorgperson" config_build_entry: "cn={3}nis" config_build_entry: "cn={4}misc" config_build_entry: "olcDatabase={-1}frontend" config_build_entry: "olcDatabase={0}config" config_build_entry: "olcDatabase={1}ldap" config_build_entry: "olcOverlay={0}pcache" config_build_entry: "olcDatabase=bdb" backend_startup_one: starting "dc=office,dc=spotswood,dc=org" ldap_back_db_open: URI=ldap://192.168.0.5:389 pcache: warning, attr set #0 not configured. pcache: warning, 0 attr sets configured but not referenced. pcache: warning, 1 attr sets not configured. pcache: 0 attr sets not configured but referenced. backend_startup_one: starting "dc=office,dc=spotswood,dc=org" bdb_db_open: dc=office,dc=spotswood,dc=org bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=office,dc=spotswood,dc=org. bdb_db_open: dbenv_open(/var/lib/ldap) slapd starting daemon: added 4r listener=(nil) daemon: added 7r listener=0x808b81c0 daemon: added 8r listener=0x808b8288 daemon: epoll: listen=7 active_threads=0 tvp=zero daemon: epoll: listen=8 active_threads=0 tvp=zero /bin/bash: line 1: 31444 Segmentation fault /usr/sbin/slapd -h "ldap:///" -u ldap -d -1
Nathan Morrow wrote:
Thanks for the tip. It did resolve one little thing. My lack of rootdn,
That's not so little, since proxy cache needs it to work, as documented.
proxycache was exiting one.
Unfortunately fixing that just led me to a segmentation fault:
[snip]
pcache: warning, attr set #0 not configured. pcache: warning, 0 attr sets configured but not referenced. pcache: warning, 1 attr sets not configured. pcache: 0 attr sets not configured but referenced.
This is telling you your pcache configuration is screwed: it references and attribute set that is not defined.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
Since they were listed as warnings I wouldn't have expected slapd to exit. Just not cache anything. But I can understand how it would have no effect.
But I guess I am still lost. BTW, thanks for all the help so far.
The errors say 1 or 1 attribute sets are not configured. Specifically attribute set #0. But after reading the configuration examples in the admin guide. I don't see anything wrong. Have the keywords changed? Below is the configuration that I tested.
proxyCache bdb 100000 1 1000 100 cachesize 20 proxyAttrset 0 mail postaladdress telephonenumber proxyTemplate (sn=) 0 3600 proxyTemplate (&(sn=)(givenName=)) 0 3600 proxyTemplate (&(departmentNumber=)(secretary=*)) 0 3600
takes straight from the sample in the admin guide.
Looks to me as though proxyAttrset #0 is defined. ?
Nathan
-----Original Message----- From: Pierangelo Masarati [mailto:ando@sys-net.it] Sent: Tuesday, November 20, 2007 4:29 PM To: Nathan Morrow Cc: openldap-software@openldap.org Subject: Re: pcache configuration
Nathan Morrow wrote:
Thanks for the tip. It did resolve one little thing. My lack of rootdn,
That's not so little, since proxy cache needs it to work, as documented.
proxycache was exiting one.
Unfortunately fixing that just led me to a segmentation fault:
[snip]
pcache: warning, attr set #0 not configured. pcache: warning, 0 attr sets configured but not referenced. pcache: warning, 1 attr sets not configured. pcache: 0 attr sets not configured but referenced.
This is telling you your pcache configuration is screwed: it references and attribute set that is not defined.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
On Mittwoch, 21. November 2007, Nathan Morrow wrote:
Since they were listed as warnings I wouldn't have expected slapd to exit. Just not cache anything. But I can understand how it would have no effect.
But I guess I am still lost. BTW, thanks for all the help so far.
The errors say 1 or 1 attribute sets are not configured. Specifically attribute set #0. But after reading the configuration examples in the admin guide. I don't see anything wrong. Have the keywords changed? Below is the configuration that I tested.
proxyCache bdb 100000 1 1000 100 cachesize 20 proxyAttrset 0 mail postaladdress telephonenumber proxyTemplate (sn=) 0 3600 proxyTemplate (&(sn=)(givenName=)) 0 3600 proxyTemplate (&(departmentNumber=)(secretary=*)) 0 3600
Do you really have whitespaces in front of the proxyAttrset and proxyTemplate lines? As documented in the slapd.conf(5) manpage line beginning with whitespaces are considered a continuation of the previous line. Remove the whitespace and try again.
takes straight from the sample in the admin guide.
Looks to me as though proxyAttrset #0 is defined. ?
Nathan
Quanah Gibson-Mount wrote:
--On November 20, 2007 1:20:34 PM -0500 Nathan Morrow nmorrow@spotswood.org wrote:
I was running 2.3.34 that is the latest rpm with Fedora 7. I just upgrade all the ldap rpms to 2.3.39. Exact same results.
I get this warning when I start the slapd daemon: Checking configuration files for slapd: [WARNING] bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=office,dc=spotswood,dc=org.
But that is just a performance warning. No other errors logged (that I have found). Slapd just exits.
Run slapd -d -1
slapd -d config should suffice. I thought this was changed quite some time ago: config messages resulting from errors that abort startup should be logged at "none" level (i.e. whenever logging is enabled).
With -d config you should see what's causing the problem, and you could help us fixing this issue once for all.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------
Michael Ströder skrev, on 21-11-2007 13:47:
I was running 2.3.34 that is the latest rpm with Fedora 7.
Just a side note: There have been some issues fixed in slapo-pcache since 2.3.34.
There are very good reasons why Red Hat people choose to stick to rpms rather than straight source tarballs; I'm one of them.
For OP's information, there is a Buchan Milne 2.3.39 SRPM available at http://staff.telkomsa.net/packages/SRPMS/ that will build on FC7, *if* OP reads the head of the spec file and does what it says.
Best,
--Tonni
Tony Earnshaw skrev, on 21-11-2007 16:28:
[...]
For OP's information, there is a Buchan Milne 2.3.39 SRPM available at http://staff.telkomsa.net/packages/SRPMS/ that will build on FC7, *if* OP reads the head of the spec file and does what it says.
Actually, this is a 2.3.38 srpm, sorry.
It builds well with 2.3.39 source if it's first exploded (rpm -ivh) to get the spec file (and the myriads of other things Buchan has put into it), and the the 2.3.39 source is downloaded from an OpenLDAP.org mirror into the SOURCES directory and the spec file edited to reflect the new version.
It's worth noting that this ia a *far* better offering than that which Fedora (or for that matter Red Hat) supplies, for many reasons that have ofttimes been proffered on this list.
--Tonni
openldap-software@openldap.org