Issue 6465 - startup error after converting to slapd-config
Summary: startup error after converting to slapd-config
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.21
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-29 09:35 UTC by gerard.ranke@kmt.hku.nl
Modified: 2014-08-01 21:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description gerard.ranke@kmt.hku.nl 2010-01-29 09:35:59 UTC
Full_Name: Gerard Ranke
Version: 2.4.21
OS: IRIX 6.5.30
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (192.87.216.230)


We run openLDAP 2.4.21 on one master plus 7 slaves. Some time ago ( I believe we
were on 2.4.19 at the time ), I converted one of the slaves to slapd-config from
slapd.conf to get myself acquainted with it, and that went without problems.
Now, if I try the conversion with slaptest -f slapd.conf -F slapd.d, the
conversion works ok, but slapd won't start, and gives this error:

Jan 18 15:30:20 7E:example-slave slapd[1741992]: _sasl_plugin_load failed on
sasl_auxprop_plug_init for plugin: ldapdb
Jan 18 15:30:20 7U:example-slave slapd[1741992]: olcSyncrepl: value #0:
<olcSyncrepl> invalid URL
Jan 18 15:30:20 7U:example-slave slapd[1741992]: config error processing
olcDatabase={1}hdb,cn=config: <olcSyncrepl> invalid URL
Jan 18 15:30:20 7U:example-slave slapd[1741992]: slapd stopped.
Jan 18 15:30:20 7U:example-slave slapd[1741992]: connections_destroy: nothing to
destroy.

I noticed that the olcSyncrepl in olcDatabase={1}hdb,cn=config changed from:

olcSyncrepl: rid=001 provider=ldap://masterldap.example.com:389
bindmethod=simple timeout
 =0 network-timeout=0 binddn="cn=syncuser,dc=example,dc=com"
credentials="xxxxxxxxx
 " starttls=critical filter="(objectClass=*)" searchbase="dc=example,dc=com"
scope=
 sub attrs="*,+" schemachecking=off type=refreshAndPersist retry="5 5 10 +"

for the older openldap version, to:

olcSyncrepl: rid=001 provider=ldap://masterldap.example.com:389 uri=""
bindmethod=simple
 timeout=0 network-timeout=0 binddn="cn=syncuser,dc=example,dc=com"
credentials="xxxxxxxxx" starttls=critical
tls_cert="/usr/ssl/certs/examplewildcard.cert
 " tls_key="/usr/ssl/certs/examplewildcard.key" tls_cacert="/usr
 /ssl/certs/cacert_root.crt" tls_reqcert=demand tls_crlcheck=none filter="(obj
 ectClass=*)" searchbase="dc=example,dc=com" scope=sub attrs="*,+"
schemachecking=o
 ff type=refreshAndPersist retry="5 5 10 +"

for 2.4.21.
Notice the ' uri="" ' in the last version.

Fortunately, if I remove the empty uri assignment from the ldif file, slapd
starts normally. 

I also noticed the slaves which I converted earlier ( so which had the first
olcSyncrepl 'format' above ) didn't replicate properly ( contextcsn also lagging
behind ). I shut down slapd on these machines, cleaned out slapd.d, converted
again, removed the 'uri=""' and restarted. After that, the replication caught up
by itself.
Thanks for your attention for this!
Comment 1 Ralf 2010-02-02 05:05:43 UTC
This got introduced by the fix for ITS#6419. I am currently working on a fix.
Comment 2 Ralf 2010-02-02 05:06:03 UTC
moved from Incoming to Software Bugs
Comment 3 Ralf 2010-02-02 05:45:28 UTC
A fix is in HEAD now (servers/slapd/config.c rev 1.513) please test.
Comment 4 Ralf 2010-02-02 05:45:49 UTC
changed notes
changed state Open to Test
Comment 5 gerard.ranke@kmt.hku.nl 2010-02-02 14:23:54 UTC
Ralf Haferkamp wrote:
> A fix is in HEAD now (servers/slapd/config.c rev 1.513) please test.

Thanks! Hopefully I can compile & test tomorrow, I'll let you know.
Best,

gerard

Comment 6 gerard.ranke@kmt.hku.nl 2010-02-03 12:09:04 UTC
Hi Ralf,

Ralf Haferkamp wrote:
> A fix is in HEAD now (servers/slapd/config.c rev 1.513) please test.

I'm afraid I need a little guidance here. To test the fix, I replaced 
the config.c from 2.4.21 with rev 1.513, but I got the errors below. I'm 
guessing I'm being naive to think this would work, and that I need to 
d'l the complete HEAD to compile, but how would I do that? Cvs needs a 
module name, and I tried 'HEAD' and 'OPENLDAP_REL_ENG_2_4' but these 
names couldn't be found. I couldn't find anything else in the devel faq 
and website that seems like a candidate for a module name, so could you 
please give me some pointers? Many thanks in advance,

gerard



cc-1020 c99: ERROR File = config.c, Line = 1222
   The identifier "slap_keepalive" is undefined.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                 ^

cc-1020 c99: ERROR File = config.c, Line = 1222
   The identifier "sk" is undefined.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                                 ^

cc-1029 c99: ERROR File = config.c, Line = 1222
   An expression is expected at this point.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                                                       ^

cc-1065 c99: ERROR File = config.c, Line = 1222
   A semicolon is expected at this point.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                                                        ^

cc-1020 c99: ERROR File = config.c, Line = 1238
   The identifier "slap_keepalive" is undefined.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                 ^

cc-1020 c99: ERROR File = config.c, Line = 1238
   The identifier "sk" is undefined.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                                 ^

cc-1029 c99: ERROR File = config.c, Line = 1238
   An expression is expected at this point.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                                                       ^

cc-1065 c99: ERROR File = config.c, Line = 1238
   A semicolon is expected at this point.

                 slap_keepalive *sk = (slap_keepalive *)bc;
                                                        ^

cc-1065 c99: ERROR File = config.c, Line = 1239
   A semicolon is expected at this point.

                 slap_keepalive sk2;
                                ^

cc-1020 c99: ERROR File = config.c, Line = 1242
   The identifier "sk2" is undefined.

                         sk2.sk_idle = 0;
                         ^

cc-1020 c99: ERROR File = config.c, Line = 1246
   The identifier "sk2" is undefined.

                         sk2.sk_idle = strtol( s, &next, 10 );
                         ^

cc-1020 c99: ERROR File = config.c, Line = 1259
   The identifier "sk2" is undefined.

                         sk2.sk_probes = 0;
                         ^

cc-1020 c99: ERROR File = config.c, Line = 1263
   The identifier "sk2" is undefined.

                         sk2.sk_probes = strtol( s, &next, 10 );
                         ^

cc-1020 c99: ERROR File = config.c, Line = 1276
   The identifier "sk2" is undefined.

                         sk2.sk_interval = 0;
                         ^

cc-1020 c99: ERROR File = config.c, Line = 1280
   The identifier "sk2" is undefined.

                         sk2.sk_interval = strtol( s, &next, 10 );
                         ^

cc-1020 c99: ERROR File = config.c, Line = 1290
   The identifier "sk2" is undefined.

                 *sk = sk2;
                       ^

cc-1565 c99: ERROR File = config.c, Line = 1336
   The struct "slap_bindconf" has no field "sb_keepalive".

         { BER_BVC("keepalive="), offsetof(slap_bindconf, sb_keepalive), 
'x', 0, (slap_verbmasks *)slap_keepalive_parse },
                                  ^
( warnings skipped... )

cc-1565 c99: ERROR File = config.c, Line = 1889
   The struct "slap_bindconf" has no field "sb_keepalive".

         if ( sb->sb_keepalive.sk_idle ) {
                  ^

cc-1565 c99: ERROR File = config.c, Line = 1890
   The struct "slap_bindconf" has no field "sb_keepalive".

                 ldap_set_option( ld, LDAP_OPT_X_KEEPALIVE_IDLE, 
&sb->sb_keepalive.sk_idle );
                                                                      ^

cc-1565 c99: ERROR File = config.c, Line = 1893
   The struct "slap_bindconf" has no field "sb_keepalive".

         if ( sb->sb_keepalive.sk_probes ) {
                  ^

cc-1565 c99: ERROR File = config.c, Line = 1894
   The struct "slap_bindconf" has no field "sb_keepalive".

                 ldap_set_option( ld, LDAP_OPT_X_KEEPALIVE_PROBES, 
&sb->sb_keepalive.sk_probes );
                                                                        ^

cc-1565 c99: ERROR File = config.c, Line = 1897
   The struct "slap_bindconf" has no field "sb_keepalive".

         if ( sb->sb_keepalive.sk_interval ) {
                  ^

cc-1565 c99: ERROR File = config.c, Line = 1898
   The struct "slap_bindconf" has no field "sb_keepalive".

                 ldap_set_option( ld, LDAP_OPT_X_KEEPALIVE_INTERVAL, 
&sb->sb_keepalive.sk_interval );

Comment 7 Ralf 2010-02-03 19:29:17 UTC
Am Mittwoch 03 Februar 2010 13:10:04 schrieb gerard.ranke@kmt.hku.nl:
> Hi Ralf,
> 
> Ralf Haferkamp wrote:
> > A fix is in HEAD now (servers/slapd/config.c rev 1.513) please test.
> 
> I'm afraid I need a little guidance here. To test the fix, I replaced
> the config.c from 2.4.21 with rev 1.513, but I got the errors below.
> I'm guessing I'm being naive to think this would work, and that I
> need to d'l the complete HEAD to compile, but how would I do that?
Either that. Or you could get the diff from 1.512 to 1.153 from cvs and 
apply that on your 2.4.21 tree. 

> Cvs needs a module name, and I tried 'HEAD' and
> 'OPENLDAP_REL_ENG_2_4' but these names couldn't be found. I couldn't
> find anything else in the devel faq and website that seems like a
> candidate for a module name, so could you please give me some
> pointers?
You can find instruction howto checkout OpenLDAP from cvs here:

http://www.openldap.org/software/repo.html#AnonCVS

Further up on that page you will also find a table listing valid modules 
(you want "ldap").

-- 
Ralf

Comment 8 gerard.ranke@kmt.hku.nl 2010-02-05 12:54:19 UTC
Problem solved! olcSyncrepl now reads:

olcSyncrepl: rid=001 provider=ldap://masterldap.example.com:389 bindmethod=simple timeout
  =0 network-timeout=0 binddn="cn=dsyncuser,dc=example,dc=com" credentials="xxxxxxx
  " starttls=critical tls_cert="/usr/ssl/certs/examplewildcard.cert" tl
  s_key="/usr/ssl/certs/examplewildcard.key" tls_cacert="/usr/
  ssl/certs/cacert_root.crt" tls_reqcert=demand tls_crlcheck=none filter="(obje
  ctClass=*)" searchbase="dc=example,dc=com" scope=sub attrs="*,+" schemachecking=of
  f type=refreshAndPersist retry="5 5 10 +"

so the 'uri=""' string is no longer present, and slapd starts normally after converting.
Thanks for the quick fix!
Best,

gerard

Comment 9 Quanah Gibson-Mount 2010-04-14 11:13:49 UTC
changed notes
changed state Test to Release
Comment 10 Quanah Gibson-Mount 2010-04-29 08:34:10 UTC
changed notes
changed state Release to Closed
Comment 11 OpenLDAP project 2014-08-01 21:04:27 UTC
Fixed in HEAD
Fixed in RE24