I am on 2.3.33 and I am trying to fix it so that people with an old base of o=gpc,c=us will automatically be given the results from the base dc=employee,dc=gpc,dc=edu. From the slapd-relay doc., I first tried:
database relay suffix "o=gpc,c=us" relay "dc=employee,dc=gpc,dc=edu"
and tried a lookup with the command:
ldapsearch -b o=gpc,c=us uid=someone cn
and I get:
result: 53 Server is unwilling to perform
If I change the config. file to:
database relay suffix "o=gpc,c=us" overlay rwm suffixmessage "dc=employee,dc=gpc,dc=edu"
and try the same command, the slapd process disappears and no core file is found (I did a find on the whole system for anything with '*core*' in it. The output to the terminal is:
ldap_result: Can't contact LDAP server (-1)
and the logs have:
Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH base="o=gpc,c=us" scope=2 d eref=0 filter="(uid=someone)" Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH attr=cn
When I start slapd back up, it says in the logs:
Jan 26 09:42:55 mldap slapd[19149]: bdb_db_open: unclean shutdown detected; atte mpting recovery.
and works fine otherwise. I can stop and restart and the warning does not appear again - as expected (unless of course I do the same experiment again).
I am sort of new to the linux (RHEL4) environment, so I am not really sure where I should go from here. On tru64, I can attach to a process, slapd in this case, I am not sure how to do that in linux.
The two examples I used above came from the slapd-relay man page, as far as I can tell, with just what they had. Thanks for any help!
I am sort of new to the linux (RHEL4) environment, so I am not really sure where I should go from here. On tru64, I can attach to a process, slapd in this case, I am not sure how to do that in linux.
At least in the case where slapd is unexpectedly exiting, you can install gdb on your system. Find the pid of slapd on your system, then run gdb, then "attach <PID>" at the gdb prompt. gdb will then tell you if slapd is catching a signal (which seems to be your working hypothesis). There are some basic instructions on generating a usable stack trace in the OpenLDAP FAQ-O-Matic.
If gdb reports that you are indeed seg faulting, it might be worth installing valgrind and seeing if that produces anything enlightening. Feel free to discuss your progress here, but you should formally report any issues you find via the ITS.
Thanks! I see both programs on the system and I will try this later today and look into filing a report. Thanks!
-----Original Message----- From: Aaron Richton [mailto:richton@nbcs.rutgers.edu] Sent: Friday, January 26, 2007 1:22 PM To: Douglas B. Jones Cc: openldap-software@openldap.org Subject: Re: slapd-relay
I am sort of new to the linux (RHEL4) environment, so I am not really sure where I should go from here. On tru64, I can attach to a process, slapd in this case, I am not sure how to do that in linux.
At least in the case where slapd is unexpectedly exiting, you can install gdb on your system. Find the pid of slapd on your system, then run gdb, then "attach <PID>" at the gdb prompt. gdb will then tell you if slapd is catching a signal (which seems to be your working hypothesis). There are some basic instructions on generating a usable stack trace in the OpenLDAP FAQ-O-Matic.
If gdb reports that you are indeed seg faulting, it might be worth installing valgrind and seeing if that produces anything enlightening. Feel free to discuss your progress here, but you should formally report any issues you find via the ITS.
Got it working to a degree, I added the word massage (believe it or not, like the instructions said). I still have some more testing and the gdb/valdgind/ITS to do. Thanks!
-----Original Message----- From: openldap-software-bounces+douglas=gpc.edu@openldap.org [mailto:openldap-software-bounces+douglas=gpc.edu@openldap.org]On Behalf Of Douglas B. Jones Sent: Friday, January 26, 2007 10:01 AM To: openldap-software@openldap.org Cc: Douglas B Jones Subject: slapd-relay
I am on 2.3.33 and I am trying to fix it so that people with an old base of o=gpc,c=us will automatically be given the results from the base dc=employee,dc=gpc,dc=edu. From the slapd-relay doc., I first tried:
database relay suffix "o=gpc,c=us" relay "dc=employee,dc=gpc,dc=edu"
and tried a lookup with the command:
ldapsearch -b o=gpc,c=us uid=someone cn
and I get:
result: 53 Server is unwilling to perform
If I change the config. file to:
database relay suffix "o=gpc,c=us" overlay rwm suffixmessage "dc=employee,dc=gpc,dc=edu"
and try the same command, the slapd process disappears and no core file is found (I did a find on the whole system for anything with '*core*' in it. The output to the terminal is:
ldap_result: Can't contact LDAP server (-1)
and the logs have:
Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH base="o=gpc,c=us" scope=2 d eref=0 filter="(uid=someone)" Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH attr=cn
When I start slapd back up, it says in the logs:
Jan 26 09:42:55 mldap slapd[19149]: bdb_db_open: unclean shutdown detected; atte mpting recovery.
and works fine otherwise. I can stop and restart and the warning does not appear again - as expected (unless of course I do the same experiment again).
I am sort of new to the linux (RHEL4) environment, so I am not really sure where I should go from here. On tru64, I can attach to a process, slapd in this case, I am not sure how to do that in linux.
The two examples I used above came from the slapd-relay man page, as far as I can tell, with just what they had. Thanks for any help!
Douglas B. Jones wrote:
I am on 2.3.33 and I am trying to fix it so that people with an old base of o=gpc,c=us will automatically be given the results from the base dc=employee,dc=gpc,dc=edu. From the slapd-relay doc., I first tried:
database relay suffix "o=gpc,c=us" relay "dc=employee,dc=gpc,dc=edu"
slapd-relay doesn't rewrite things for you unless you instruct it to do so, e.g. by adding the "massage" keyword after the relayed naming context, e.g.
database relay suffix "o=gpc,c=us" relay "dc=employee,dc=gpc,dc=edu" massage
as clearly indicated in the documentation.
and tried a lookup with the command:
ldapsearch -b o=gpc,c=us uid=someone cn
and I get:
result: 53 Server is unwilling to perform
If I change the config. file to:
database relay suffix "o=gpc,c=us" overlay rwm suffixmessage "dc=employee,dc=gpc,dc=edu"
"suffixmessage" is an invalid statement (2.4 would throw you out; unfortunately 2.3 only complains if you enable "-d config" and that's it). Try "suffixmassage" instead, as clearly suggested in the documentation.
and try the same command, the slapd process disappears and no core file is found (I did a find on the whole system for anything with '*core*' in it.
You likely need to "ulimit -c unlimited" to remove core size limitations in your shell.
The output to the terminal is:
ldap_result: Can't contact LDAP server (-1)
and the logs have:
Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH base="o=gpc,c=us" scope=2 d eref=0 filter="(uid=someone)" Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH attr=cn
When I start slapd back up, it says in the logs:
Jan 26 09:42:55 mldap slapd[19149]: bdb_db_open: unclean shutdown detected; atte mpting recovery.
and works fine otherwise. I can stop and restart and the warning does not appear again - as expected (unless of course I do the same experiment again).
I am sort of new to the linux (RHEL4) environment, so I am not really sure where I should go from here. On tru64, I can attach to a process, slapd in this case, I am not sure how to do that in linux.
The two examples I used above came from the slapd-relay man page, as far as I can tell, with just what they had. Thanks for any help!
You can't just take a fraction of the examples, ignore essential bits and just complain they don't work. There were two examples in slapd-relay(5), they both work, as tested in test030 (which I hope is passing in your build, and you could have taken as a guideline in configuring your system), and you were able to screw both. The fact they don't get bounced at startup is not directly related to slapd-relay(5) itself, but rather to the way slapd up to 2.3 included handles syntax errors (actually, doesn't handle stale incorrect statements). Fortunately this changed in 2.4 (and we fear the number of complains about incorrect slapd.conf which used to work besides being incorrect, and do not work any more...).
p.
Part of my problem is that I keep seeing message instead of massage. Sorry I am not reading the doc. correctly, my "screw" up. I did look at test0030, and thought I was doing things right. Obviously, I was not reading the word message correctly. Thank you for the hint on the ulimit, should have thought about that (always did on Tru64), just getting use the linux environment and not thinking through to carry the experience from other os's over. Thanks you all for you help, sorry I am still learning ldap have a lot to learn. Once again, thank you all for your help!
-----Original Message----- From: openldap-software-bounces+douglas=gpc.edu@openldap.org [mailto:openldap-software-bounces+douglas=gpc.edu@openldap.org]On Behalf Of Pierangelo Masarati Sent: Friday, January 26, 2007 4:36 PM To: Douglas B. Jones Cc: openldap-software@openldap.org Subject: Re: slapd-relay
Douglas B. Jones wrote:
I am on 2.3.33 and I am trying to fix it so that people with an old base of o=gpc,c=us will automatically be given the results from the base dc=employee,dc=gpc,dc=edu. From the slapd-relay doc., I first tried:
database relay suffix "o=gpc,c=us" relay "dc=employee,dc=gpc,dc=edu"
slapd-relay doesn't rewrite things for you unless you instruct it to do so, e.g. by adding the "massage" keyword after the relayed naming context, e.g.
database relay suffix "o=gpc,c=us" relay "dc=employee,dc=gpc,dc=edu" massage
as clearly indicated in the documentation.
and tried a lookup with the command:
ldapsearch -b o=gpc,c=us uid=someone cn
and I get:
result: 53 Server is unwilling to perform
If I change the config. file to:
database relay suffix "o=gpc,c=us" overlay rwm suffixmessage "dc=employee,dc=gpc,dc=edu"
"suffixmessage" is an invalid statement (2.4 would throw you out; unfortunately 2.3 only complains if you enable "-d config" and that's it). Try "suffixmassage" instead, as clearly suggested in the documentation.
and try the same command, the slapd process disappears and no core file is found (I did a find on the whole system for anything with '*core*' in it.
You likely need to "ulimit -c unlimited" to remove core size limitations in your shell.
The output to the terminal is:
ldap_result: Can't contact LDAP server (-1)
and the logs have:
Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH base="o=gpc,c=us" scope=2 d eref=0 filter="(uid=someone)" Jan 26 09:38:37 mldap slapd[19110]: conn=0 op=1 SRCH attr=cn
When I start slapd back up, it says in the logs:
Jan 26 09:42:55 mldap slapd[19149]: bdb_db_open: unclean shutdown detected; atte mpting recovery.
and works fine otherwise. I can stop and restart and the warning does not appear again - as expected (unless of course I do the same experiment again).
I am sort of new to the linux (RHEL4) environment, so I am not really sure where I should go from here. On tru64, I can attach to a process, slapd in this case, I am not sure how to do that in linux.
The two examples I used above came from the slapd-relay man page, as far as I can tell, with just what they had. Thanks for any help!
You can't just take a fraction of the examples, ignore essential bits and just complain they don't work. There were two examples in slapd-relay(5), they both work, as tested in test030 (which I hope is passing in your build, and you could have taken as a guideline in configuring your system), and you were able to screw both. The fact they don't get bounced at startup is not directly related to slapd-relay(5) itself, but rather to the way slapd up to 2.3 included handles syntax errors (actually, doesn't handle stale incorrect statements). Fortunately this changed in 2.4 (and we fear the number of complains about incorrect slapd.conf which used to work besides being incorrect, and do not work any more...).
p.
openldap-software@openldap.org