You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(200) |
Jun
(129) |
Jul
(184) |
Aug
(204) |
Sep
(106) |
Oct
(79) |
Nov
(72) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(83) |
Feb
(123) |
Mar
(84) |
Apr
(184) |
May
(106) |
Jun
(111) |
Jul
(104) |
Aug
(91) |
Sep
(59) |
Oct
(99) |
Nov
(100) |
Dec
(37) |
2002 |
Jan
(148) |
Feb
(88) |
Mar
(85) |
Apr
(151) |
May
(80) |
Jun
(110) |
Jul
(85) |
Aug
(43) |
Sep
(64) |
Oct
(89) |
Nov
(59) |
Dec
(42) |
2003 |
Jan
(129) |
Feb
(104) |
Mar
(162) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Neil M. <ne...@mc...> - 2003-03-31 13:25:56
|
I have 2 ldap servers and a script which tries to connect to the first server. If that server is down i.e the ldap server is not running, I would like to try the second server. I'm not sure how best to do this. If I try to connect to the server and it's down I get the following error after the "Net::LDAP->new" line IO::Socket::INET: connect: Connection refused at /opt/migrate/bin/pwmigrate.pl line 98, <> line 14. Is there standard way to do this? Sorry if this is obvious! Regards /Neil |
From: <wm1...@in...> - 2003-03-29 19:30:56
|
********************** »¨µØ°ª¯Å¦í¦v¥X¯² ********************** ±z¬O§_¬°¸ó°ê¥ø·~¥DºÞ¡B©Î¾nµØ¥~°Ót³d¤H¡B ¦]¬°¤u§@¤Wªº»Ýn¡A·Qn§ä¤@Ó»¨µØ°ª¯Åªº¦í³B¡C ±z¬O§_«D±`«µø¦íªº«~½è¡A«D¦³µÎ¾A¡B§¹¬ü¡B¦w¥þªº¦í®aÀô¹Ò¡A µLªkº¡¨¬±z¹ï¦í¤è±ªº°l¨D¡C ±z¬O§_³ßÅw¦í¦b¸Ö±¡µe·N¤¤¡A«F¥x¡B¼Ó»Õ¡B³½¦ÀÅý±zºÉ²æ«U®ð¡A §óÅý±zªº®a±q¦¹´N¬O½à¤ß®®¥Øªºªº¥N¦Wµü¡H §Úַ̫ܼN¥H¤@³e°í«ùªº¸Û¹ê¡B¶Ô³Ò¡B±M·~t³dªºªA°ÈºA«×¡A ¨Ó§ä´M±z¤ß¥Ø¤¤²z·Qªº®a¡C ®×¨Ò¦CÁ|¦p¤U¡G 89©W°ª¯Å¦í¦v°Ï¡Aªñ«H¸q¥@¶T¡BµØ¯Ç«Â¨q¡B³»¼Ó¡A¼Ó¤¤¼Ó¡AªþÂù¨®¦ì¡C 65©W°ª¯Å¦í¦v¤j¼Ó¡A´°¤Æ«n¸ô®Ç¡Aªþ¥þ·s°ª¯Å®aѹq¾¹³]³Æ¡C 50©W°ª¯Å¦í¦v¤j¼Ó¡A°ê¤÷¬ö©ÀÀ]®Ç¡C 60©W¥þ·s¿W´É°ª¯Å¦í¦v¦W·H¡Aªñ¬G®c¶§©ú¤s¤U¡Aªþ¥þ®M¸ËæC®aÑ¡B¨®¦ì¡A24¤p®Éĵ½Ã¡C 66©W°ª¯Åªá¶é¦W·H¡Aªñ´°¤Æ¥_¸ô¡B¥Á¥ÍªF¸ô¤f¡AÃÀ³N³y´º¡C 110©W°ª¯Å»¨µØ¤j·H¡Aªñ¥@¶T¡Aªþ¥þ®M¸ËæC®aÑ¡B¨®¦ì¡A24¤p®Éĵ½Ã¡C 65©W°ª¯Å»¨µØ¤j·H¡A´°¤Æ«n¸ô¤G¬q¡A¥þ·s¸ËæC®aÑ¡B¨®¦ì¡A24¤p®Éĵ½Ã¡C §¹¬üªºªA°È«~½è¡A¥Ã»·¬O§Ú̾İ«ªº¥Ø¼Ð¡I¡I ·ç°T¤£°Ê²£ ¥~°ÓªA°È³¡ Ápµ¸¤H¡GJ¥ý¥Í ·q¤W TeL¡]¥Nªí¸¹¡^¡G 02-27206933 °J¤ß´Á«Ý±zªºº¡·N¡A¦]¬°±zªºº¡·N´N¬O§Ú̪º¦¨´N¡I¡I¡I¡I |
From: Jos D. <mar...@wo...> - 2003-03-28 12:25:14
|
PCEyOTUyMD4KPGh0bWw+PGJvZHk+PHA+PGI+U3c8ITI5NTIwPmlzcyBHcm88ITI5NTIwPnVwIFNBPC9iPiBpcyBvbmUgb2YgU3dpdHplcmxhbmQncyBsZWFkPCEyOTUyMD5pbmcgcHJpPCEyOTUyMD52YXRlIGFsdGVybjwhMjk1MjA+YXRpdmUgaW52ZTwhMjk1MjA+c3RtZW50IGNvbXBhPCEyOTUyMD5uaWVzIHdoaWNoIGFsbG9jYXRlcyBpdHMgYXNzZXRzCnRvIGEgcmFuZ2Ugb2YgZnU8ITI5NTIwPm5kcwptYWk8ITI5NTIwPm5seSBpbiB0aGUgZmk8ITI5NTIwPmVsZCBvZiBhbHRlcjwhMjk1MjA+bmF0aXZlIGludmVzPCEyOTUyMD50bWVudCBzdHJhdGU8ITI5NTIwPmdpZXMuIEl0cyBhaW0gaXMgdG8gZ2VuZTwhMjk1MjA+cmF0ZSBhYnNvbHV0ZSBkYWk8ITI5NTIwPmx5IGNvbXBvPCEyOTUyMD51bmRlZCByZXR1cm5zIGluIFU8ITI5NTIwPlNEIHRlPCEyOTUyMD5ybXMuIFN3aTwhMjk1MjA+c3MKR3I8ITI5NTIwPm91cCBoYXMgYmVlbgp0cmE8ITI5NTIwPmRpbmcgb24gdGhlIFN3aTwhMjk1MjA+c3MgU3RvPCEyOTUyMD5jayBFeGNoPCEyOTUyMD5hbmdlIHNpbmNlIE5vdmVtYmVyIDE5PCEyOTUyMD45OSBhbmQgb24gRm88ITI5NTIwPnJleCBzaW5jZSBlYTwhMjk1MjA+cmx5IDE5OTcuIFN3PCEyOTUyMD5pc3MgR3I8ITI5NTIwPm91cCBwcm92aTwhMjk1MjA+ZGVzIHByaTwhMjk1MjA+dmF0ZSBhbmQgaW5zdDwhMjk1MjA+aXR1dGlvbmFsCmludjwhMjk1MjA+ZXN0b3JzIHdpdGggYW4gZWFzeQphbmQgZWZmaTwhMjk1MjA+Y2llbnQgd2F5IHRvIGludjwhMjk1MjA+ZXN0IHdpdGggaGlnaCByZXR1PCEyOTUyMD5ybnMuIDxicj48YnI+Cgo1MC01MDAkIDEgPGJyPgo1MDAtMTAwMCQgMSwxIDxicj4KMSwwMDAtMSw1MDAkIDEsMiA8YnI+CjEsNTAwLTIsMDAwJCAxLDMgPGJyPgoyLDAwMC0yLDUwMCQgMSw0IDxicj4KMiw1MDAtMywwMDAkIDEsNSA8YnI+CjMsMDAwLTQsMDAwJCAxLDYgPGJyPgo0LDAwMC01LDAwMCQgMSw3IDxicj4KNSwwMDAtNyw1MDAkIDEsOCA8YnI+CjcsNTAwLTEwLDAwMCQgMSw5IDxicj4KMTAsMDAwLTI1LDAwMCQgMiwwIDxicj4KMjUsMDAwJCBzcGVjaWFsIHJhdGUgPGJyPjxicj4KCjxiPkNsPCEyODc0Nj5pY2sgaGU8ITI4NzQ2PnJlIHRvIHN0PCEyODc0Nj5hcnQgZWFyPCEyODc0Nj5uaW5nOjwvYj4gPGJyPgo8YSBocmVmPSJodHRwOi8vd3d3LiU3MyU3NyU2OSU3MyU3MyUyZCU2NyU3MiU2ZiU3NSU3MC4lNmUlNjUlNzQvIj5odHRwOi8vd3d3LnN3PCEyODc0Nj5pc3MtZ3I8ITI4NzQ2Pm91cC5uZXQgPC9hPjwvcD48L2JvZHk+PC9odG1sPgo8ITI4NzQ2Pgo= |
From: Graham B. <gb...@po...> - 2003-03-27 16:14:45
|
On Thu, Mar 27, 2003 at 11:06:51AM +0100, Peter Marschall wrote: > AFAIK ARGV is no file handle but an array. It is. ARGV is a special handle that is used by <>. <ARGV> is identical to <> Graham. |
From: Graham B. <gb...@po...> - 2003-03-27 16:13:32
|
On Thu, Mar 27, 2003 at 11:58:52AM +1100, Dave Horsfall wrote: > The manpage says that an already-opened filehandle can be passed to > LDAP::LDIF::new(), but this does not appear to be the case. For example, > the following fails: > > my $ldif = Net::LDAP::LDIF->new(ARGV) || die "Cannot open input: $!"; > > Cannot open input: No such file or directory at chk.pl line 19. > > Have I misunderstood something? The docs need to be made more clear that the file handle must be passed by reference. my $ldif = Net::LDAP::LDIF->new(\*ARGV) || die "Cannot open input: $!"; Graham. |
From: Jim H. <ha...@us...> - 2003-03-27 15:28:32
|
Wesley, The coding to poplulate the LDAP directory can be relatively straight forward once you figure out other pieces. First, you need to understand the structure of your LDAP directory and where your users fit in it. Then you need to know where all the data is that you will use for sources. An important issue is how to deal with passwords. You most likely can't find cleartext passwords for existing users. This means that you need to find a way to get new passwords for them. That is the hardest part of what you are trying to do. There are at least 2 strategies: build a password changing mechanism that can bounce against the old password in nis and create a new one in ldap (and preferably also in nis) or you can assign new (LDAP only?) passwords to users and distribute them in some way. You also need to figure out what attributes you need for each user. This one line of code (or similar) is what actually adds a user: my $refs = $ldap->add ($dn, attrs => \@attrs); $dn is built by knowing the structure of you LDAP tree. @attrs can be built by lines like push @attrs, (givenName => $firstname); --Jim Harle On Thu, 27 Mar 2003, Wesley Hof. wrote: > Hi, > > I have a question, I'm planning a migration from a proftpd that uses nis, to > a proftpd that uses LDAP. > > The problem is I don't have a major LDAP knowledge. Is there an example > perlscript available to full the ldap with > usernames/passes/quota/dir so that proftpd finds the needed info? > > Thanks in advance for the replys. > > Wesley. > > > -- > Hey it compiles! Ship it! (M$) > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > |
From: Wesley Hof. <we...@st...> - 2003-03-27 13:37:35
|
Hi, I have a question, I'm planning a migration from a proftpd that uses nis, to a proftpd that uses LDAP. The problem is I don't have a major LDAP knowledge. Is there an example perlscript available to full the ldap with usernames/passes/quota/dir so that proftpd finds the needed info? Thanks in advance for the replys. Wesley. -- Hey it compiles! Ship it! (M$) |
From: Peter M. <pet...@ad...> - 2003-03-27 10:07:07
|
Hi, On Thursday 27 March 2003 01:58, Dave Horsfall wrote: > The manpage says that an already-opened filehandle can be passed to > LDAP::LDIF::new(), but this does not appear to be the case. For exampl= e, > the following fails: > > my $ldif =3D Net::LDAP::LDIF->new(ARGV) || die "Cannot open input: $!"; > > Cannot open input: No such file or directory at chk.pl line 19. AFAIK ARGV is no file handle but an array. Try it with STDIN, STDOUT or a handle opend using open() Peter --=20 Peter Marschall | eMail: pet...@ad... Scheffelstra=DFe 15 | Tel: +49 931 14721 D-97072 W=FCrzburg | PGP: 0BB1 04A3 0FB0 E27F 8018 52BA A286 7B23 9C22 2C83 |
From: Daniel D. <da...@li...> - 2003-03-26 20:49:33
|
Thaks all, that did it. Dan On Wednesday 26 March 2003 01:56 pm, Brad Diggs wrote: > I am having the same problem that you are having. > > Try setting your LANG environment variable to en_US. > > Brad > > On Wed, 2003-03-26 at 13:44, Daniel Davidson wrote: > > For simplicity's sake, I removed the search I was doing and replaced = it > > with values I wanted it to use for gid and uid, so I disabled the sea= rch. > > > > That leaves my entire output as: > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > 30 32 02 01 01 60 2D 02 01 03 04 21 63 6E 3D 6D 02...`-....!cn=3Dm > > 61 6E 61 67 65 72 2C 64 63 3D 6C 69 66 65 2C 64 anager,dc=3Dlife,d > > 63 3D 75 69 75 63 2C 64 63 3D 65 64 75 80 05 67 c=3Duiuc,dc=3Dedu..g > > 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ __ funk > > > > 0000 50: SEQUENCE { > > 0002 1: INTEGER =3D 1 > > 0005 45: [APPLICATION 0] { > > 0007 1: INTEGER =3D 3 > > 000A 33: STRING =3D 'cn=3Dmanager,dc=3Dlife,dc=3Duiuc,dc=3Dedu' > > 002D 5: [CONTEXT 0] > > 002F : 67 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ gfun= k > > 0034 : } > > 0034 : } > > Net::LDAP=3DHASH(0x804c00c) received: > > > > 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ > > > > 0000 12: SEQUENCE { > > 0002 1: INTEGER =3D 1 > > 0005 7: [APPLICATION 1] { > > 0007 1: ENUM =3D 0 > > 000A 0: STRING =3D '' > > 000C 0: STRING =3D '' > > 000E : } > > 000E : } > > Please Enter the Name of the user > > Daniel Davidson > > Please Enter the the users UID > > jobuddah > > Please Enter the user's Password > > df > > Please Enter the Password again > > df > > Please Enter the shell of the user > > [/usr/libexec/openssh/sftp-server] > > > > uid=3Djobuddah,ou=3DPeople,dc=3Dlife,dc=3Duiuc,dc=3Dedu > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > substr outside of string at > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> > > line 5. > > > > Is that any more help? > > > > Dan > > > > ay 26 March 2003 12:53 pm, Graham Barr wrote: > > > Can you turn on debug at the start of the script, not just before > > > the ->add call. It may be the previous request that triggers > > > the problem. > > > > > > Graham. > > > > > > On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > > > > Debug gave me: > > > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > > > > > substr outside of string at > > > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <ST= DIN> > > > > line 5. > > > > > > > > I havent been able to find anything in the logs except for where = I > > > > have stopped and restared slapd. It logs to /var/log somewhere, > > > > right? > > > > > > > > Dan > > > > > > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > > > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote= : > > > > > > Following Grahm's advice, I received the following message. > > > > > > > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > > > > > > > That line is the select on the socket. What do you see with a d= ebug > > > > > trace on ? $ldap->debug(15); > > > > > > > > > > Also, do you have access to the server logs, if so do you see > > > > > anything there. > > > > > > > > > > Graham. > > > > > > > > > > > Know what I am doing wrong yet? > > > > > > > > > > > > Dan > > > > > > > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > > > > On 26/3/03 3:13 pm, Daniel Davidson <danield@life.uiuc.ed= u>=20 wrote: > > > > > > > > > When I remove the [$dn] and replace it with $dn then m= y > > > > > > > > > origional problem of the script hanging without an erro= r > > > > > > > > > happens again. > > > > > > > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > > > > > > > Dan > > > > > > > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first= arg > > > > > > > > to add and not as dn =3D> something. > > > > > > > > > > > > > > > > $ldap->add($dn, > > > > > > > > attrs =3D> [ blah blah ]); > > > > > > > > > > > > > > There is no difference between $ldap->ad($dn,...) and > > > > > > > $ldap->add(dn =3D> $dn,...) > > > > > > > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > > > > > > > Try adding this to your script. > > > > > > > > > > > > > > use Carp; > > > > > > > $SIG{USR2} =3D \&Carp::croak; > > > > > > > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > > > > > > > kill -USR2 $pid > > > > > > > > > > > > > > You should see a stack trace on stderr. > > > > > > > > > > > > > > Although if you are on a windows box I am not sure this wil= l > > > > > > > work. > > > > > > > > > > > > > > Graham. > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > > This SF.net email is sponsored by: > > > > > > > The Definitive IT and Networking Event. Be There! > > > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > > > > > > > ------------------------------------------------------- > > > > > > This SF.net email is sponsored by: > > > > > > The Definitive IT and Networking Event. Be There! > > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > _______________________________________________________________________= _ > > --+-- > > > > Brad Diggs > E-mail: Br...@Di... > Web Site: http://www.DiggsFamily.net > > The Truth is a person named Jesus > (John 14:6). Do you know Him? He > knows you and has a wonderful plan > for your life (John 20:31). > > _______________________________________________________________________= _ |
From: Brad D. <br...@Di...> - 2003-03-26 19:58:12
|
I am having the same problem that you are having. Try setting your LANG environment variable to en_US. Brad On Wed, 2003-03-26 at 13:44, Daniel Davidson wrote: > For simplicity's sake, I removed the search I was doing and replaced it with > values I wanted it to use for gid and uid, so I disabled the search. > > That leaves my entire output as: > Net::LDAP=HASH(0x804c00c) sending: > > 30 32 02 01 01 60 2D 02 01 03 04 21 63 6E 3D 6D 02...`-....!cn=m > 61 6E 61 67 65 72 2C 64 63 3D 6C 69 66 65 2C 64 anager,dc=life,d > 63 3D 75 69 75 63 2C 64 63 3D 65 64 75 80 05 67 c=uiuc,dc=edu..g > 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ __ funk > > 0000 50: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 45: [APPLICATION 0] { > 0007 1: INTEGER = 3 > 000A 33: STRING = 'cn=manager,dc=life,dc=uiuc,dc=edu' > 002D 5: [CONTEXT 0] > 002F : 67 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ gfunk > 0034 : } > 0034 : } > Net::LDAP=HASH(0x804c00c) received: > > 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ > > 0000 12: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 7: [APPLICATION 1] { > 0007 1: ENUM = 0 > 000A 0: STRING = '' > 000C 0: STRING = '' > 000E : } > 000E : } > Please Enter the Name of the user > Daniel Davidson > Please Enter the the users UID > jobuddah > Please Enter the user's Password > df > Please Enter the Password again > df > Please Enter the shell of the user > [/usr/libexec/openssh/sftp-server] > > uid=jobuddah,ou=People,dc=life,dc=uiuc,dc=edu > Net::LDAP=HASH(0x804c00c) sending: > > substr outside of string at > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> line 5. > > Is that any more help? > > Dan > > > ay 26 March 2003 12:53 pm, Graham Barr wrote: > > Can you turn on debug at the start of the script, not just before > > the ->add call. It may be the previous request that triggers > > the problem. > > > > Graham. > > > > On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > > > Debug gave me: > > > Net::LDAP=HASH(0x804c00c) sending: > > > > > > substr outside of string at > > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> > > > line 5. > > > > > > I havent been able to find anything in the logs except for where I have > > > stopped and restared slapd. It logs to /var/log somewhere, right? > > > > > > Dan > > > > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > > > > Following Grahm's advice, I received the following message. > > > > > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > > > > > That line is the select on the socket. What do you see with a debug > > > > trace on ? $ldap->debug(15); > > > > > > > > Also, do you have access to the server logs, if so do you see anything > > > > there. > > > > > > > > Graham. > > > > > > > > > Know what I am doing wrong yet? > > > > > > > > > > Dan > > > > > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > > > > > > When I remove the [$dn] and replace it with $dn then my > > > > > > > > origional problem of the script hanging without an error > > > > > > > > happens again. > > > > > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > > > > > Dan > > > > > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to > > > > > > > add and not as dn => something. > > > > > > > > > > > > > > $ldap->add($dn, > > > > > > > attrs => [ blah blah ]); > > > > > > > > > > > > There is no difference between $ldap->ad($dn,...) and > > > > > > $ldap->add(dn => $dn,...) > > > > > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > > > > > Try adding this to your script. > > > > > > > > > > > > use Carp; > > > > > > $SIG{USR2} = \&Carp::croak; > > > > > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > > > > > kill -USR2 $pid > > > > > > > > > > > > You should see a stack trace on stderr. > > > > > > > > > > > > Although if you are on a windows box I am not sure this will work. > > > > > > > > > > > > Graham. > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > This SF.net email is sponsored by: > > > > > > The Definitive IT and Networking Event. Be There! > > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.net email is sponsored by: > > > > > The Definitive IT and Networking Event. Be There! > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ________________________________________________________________________ | --+-- | | | Brad Diggs E-mail: Br...@Di... Web Site: http://www.DiggsFamily.net The Truth is a person named Jesus (John 14:6). Do you know Him? He knows you and has a wonderful plan for your life (John 20:31). ________________________________________________________________________ |
From: Brad D. <br...@Di...> - 2003-03-26 19:43:43
|
Hello all, I changed the LANG environment variable per the recommendation for the "strange problem" thread and it resolved my problem as well. The following lines from the other thread explain the problem: > A similar sounding problem came up before. Then, Graham's comment: > > > Have you tried it with a pre 5.8 version of perl ? > > > > I have a feeling this is something todo with unicode/utf8 support > > in 5.8 that Convert::ASN1 is not accounting for. > > > > As you are on RH 8.0, what do you have in /etc/sysconfig/i18n > > > > If it mentions UTF-8 try setting your LANG environment variable to en_US > > > > Graham. > So, setting the LANG environment variable to en_US fixed my problem as well. I suspect the same would apply to the "unblessed reference" thread as well. Regards, Brad On Wed, 2003-03-26 at 12:07, Brad Diggs wrote: > Per Graham's recommendations in the "unblessed reference?" thread, I > enabled debug level 15 and got the following output: > > Net::LDAP=HASH(0x8169f70) sending: > > 30 28 02 01 01 60 23 02 01 03 04 14 63 6E 3D 44 0(...`#.....cn=D > 69 72 65 63 74 6F 72 79 20 4D 61 6E 61 67 65 72 irectory Manager > 80 08 61 64 6D 69 6E 31 32 33 __ __ __ __ __ __ ..password > > 0000 40: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 35: [APPLICATION 0] { > 0007 1: INTEGER = 3 > 000A 20: STRING = 'cn=Directory Manager' > 0020 8: [CONTEXT 0] > 0022 : 61 64 6D 69 6E 31 32 33 __ __ __ __ __ __ __ __ > password > 002A : } > 002A : } > Net::LDAP=HASH(0x8169f70) received: > > 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ > > 0000 12: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 7: [APPLICATION 1] { > 0007 1: ENUM = 0 > 000A 0: STRING = '' > 000C 0: STRING = '' > 000E : } > 000E : } > Adding Fname1, LName1, to samsun:389 via cn=Directory Manager:password > DN before update "cn=Fname1 LName1, ou=People, o=diggsfamily" > Net::LDAP=HASH(0x8169f70) sending: > > substr outside of string at > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <PSAFILE> > line 1. > > ------------------------------------------------------ > Doing the same at debug level 12 yields the following: > > > Net::LDAP=HASH(0x8169f70) sending: > 0000 40: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 35: [APPLICATION 0] { > 0007 1: INTEGER = 3 > 000A 20: STRING = 'cn=Directory Manager' > 0020 8: [CONTEXT 0] > 0022 : 61 64 6D 69 6E 31 32 33 __ __ __ __ __ __ __ __ > password > 002A : } > 002A : } > Net::LDAP=HASH(0x8169f70) received: > 0000 12: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 7: [APPLICATION 1] { > 0007 1: ENUM = 0 > 000A 0: STRING = '' > 000C 0: STRING = '' > 000E : } > 000E : } > Adding Fname1, LName1, to samsun:389 via cn=Directory Manager:password > DN before update "cn=Fname1 LName1, ou=People, o=diggsfamily" > Net::LDAP=HASH(0x8169f70) sending: > 0000 194: SEQUENCE { > 0003 1: INTEGER = 2 > 0006 194: [APPLICATION 8] { > 0009 42: STRING > 000B : C2 B2 04 2A 63 6E 3D 46 6E 61 6D 65 31 20 4C 4E > ...*cn=Fname1 LN > 001B : 61 6D 65 31 2C 20 6F 75 3D 50 65 6F 70 6C 65 2C ame1, > ou=People, > 002B : 20 6F 3D 64 69 67 67 73 66 61 __ __ __ __ __ __ > o=diggsfa > 0035 194: SEQUENCE { > 0038 21: SEQUENCE { > 003A 2: STRING > 003C : C2 81 __ __ __ __ __ __ __ __ __ __ __ __ __ __ .. > 003E 15: SET { > 0040 13: STRING > 0042 : 63 6E 31 0F 04 0D 46 6E 61 6D 65 31 20 __ __ __ > cn1...Fname1 > 004F : } > 004F : } > 004F 65: SEQUENCE { > 0051 11: STRING > 0053 : 65 31 30 41 04 0B 6F 62 6A 65 63 __ __ __ __ __ > e10A..objec > 005E 50: SET { > 0060 3: STRING = 'ss1' > 0065 6: STRING > 0067 : 03 74 6F 70 04 06 __ __ __ __ __ __ __ __ __ __ > .top.. > 006D 20: STRING > 006F : 72 73 6F 6E 04 14 6F 72 67 61 6E 69 7A 61 74 69 > rson..organizati > 007F : 6F 6E 61 6C __ __ __ __ __ __ __ __ __ __ __ __ > onal > 0083 13: STRING > 0085 : 72 73 6F 6E 04 0D 69 6E 65 74 4F 72 67 __ __ __ > rson..inetOrg > 0092 : } > 0092 : } > 0092 14: SEQUENCE { > 0094 2: STRING = 'on' > 0098 8: SET { > 009A 6: STRING > 009C : 73 6E 31 08 04 06 __ __ __ __ __ __ __ __ __ __ > sn1... > 00A2 : } > 00A2 : } > 00A2 21: SEQUENCE { > 00A4 9: STRING > 00A6 : 65 31 30 15 04 09 67 69 76 __ __ __ __ __ __ __ > e10...giv > 00AF 8: SET { > 00B1 6: STRING > 00B3 : 6D 65 31 08 04 06 __ __ __ __ __ __ __ __ __ __ > me1... > 00B9 : } > 00B9 : } > DN after update "cn=Fname1 LName1, ou=People, o=diggsfamily" > Error: Add failed -> I/O Error > > ------------------------------------------------------ > > With regards to the directory server log files, the > directory server never receives the LDAP add request. > It sees a successful connect and BIND but no add. > > Brad > > On Wed, 2003-03-26 at 11:22, Brad Diggs wrote: > > Thanks to Graham for the recommendation (although on another thread, > > I added the following to my script, ran it, and then killed it with > > "kill -USR2 <pid>". > > > > use Carp; > > $SIG{USR2} = \&Carp::croak; > > > > The following line was the resulting error returned by my script: > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > Note that this is consistent with what I had assumed from my previous > > note. The LDAP is getting hung up on the asn_read on line 661 of > > LDAP.pm. > > > > Regards, > > Brad > > > > > > On Tue, 2003-03-25 at 21:08, Brad Diggs wrote: > > > Based on the previous note and the following excerpt from the LDAP.pm > > > perl module, I presume that after the bind, the LDAP socket or > > > associated file handler must be getting dropped before I send a > > > request to it. > > > > > > 652 sub _recvresp { > > > 653 my $ldap = shift; > > > 654 my $what = shift; > > > 655 my $sock = $ldap->socket; > > > 656 my $sel = IO::Select->new($sock); > > > 657 my $ready; > > > 658 > > > 659 for( $ready = 1 ; $ready ; $ready = $sel->can_read(0)) { > > > 660 my $pdu; > > > 661 asn_read($sock, $pdu) > > > 662 or return LDAP_OPERATIONS_ERROR; > > > > > > My guess is that the open() function and the asn_read() functions are > > > colliding on the file handler for the LDAP connection socket. Thats > > > just by guess though. > > > > > > What do you think? I sure would like to see the answer because I can't > > > get my data loaded into the directory. > > > > > > Brad > > > > > > On Tue, 2003-03-25 at 15:11, Brad Diggs wrote: > > > > Running with Net::LDAP debug of 12 didn't yield much different than > > > > with 4. However, I ran with perl debugger on and got the following > > > > when I did a Ctrl-c on the hang... > > > > > > > > Convert::ASN1::asn_read(/usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm:198): > > > > 198: READ_ERR: > > > > 199: $@ = "I/O Error $! " . CORE::unpack("H*",$_[1]); > > > > > > > > Should I be led to believe by this that the problem may be in the ASN > > > > code? > > > > > > > > Brad > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ________________________________________________________________________ | --+-- | | | Brad Diggs E-mail: Br...@Di... Web Site: http://www.DiggsFamily.net The Truth is a person named Jesus (John 14:6). Do you know Him? He knows you and has a wonderful plan for your life (John 20:31). ________________________________________________________________________ |
From: Daniel D. <da...@li...> - 2003-03-26 19:40:18
|
For simplicity's sake, I removed the search I was doing and replaced it w= ith=20 values I wanted it to use for gid and uid, so I disabled the search. That leaves my entire output as: Net::LDAP=3DHASH(0x804c00c) sending: 30 32 02 01 01 60 2D 02 01 03 04 21 63 6E 3D 6D 02...`-....!cn=3Dm 61 6E 61 67 65 72 2C 64 63 3D 6C 69 66 65 2C 64 anager,dc=3Dlife,d 63 3D 75 69 75 63 2C 64 63 3D 65 64 75 80 05 67 c=3Duiuc,dc=3Dedu..g 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ __ funk 0000 50: SEQUENCE { 0002 1: INTEGER =3D 1 0005 45: [APPLICATION 0] { 0007 1: INTEGER =3D 3 000A 33: STRING =3D 'cn=3Dmanager,dc=3Dlife,dc=3Duiuc,dc=3Dedu' 002D 5: [CONTEXT 0] 002F : 67 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ gfunk 0034 : } 0034 : } Net::LDAP=3DHASH(0x804c00c) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ 0000 12: SEQUENCE { 0002 1: INTEGER =3D 1 0005 7: [APPLICATION 1] { 0007 1: ENUM =3D 0 000A 0: STRING =3D '' 000C 0: STRING =3D '' 000E : } 000E : } Please Enter the Name of the user Daniel Davidson Please Enter the the users UID jobuddah Please Enter the user's Password df Please Enter the Password again df Please Enter the shell of the user [/usr/libexec/openssh/sftp-server] uid=3Djobuddah,ou=3DPeople,dc=3Dlife,dc=3Duiuc,dc=3Dedu Net::LDAP=3DHASH(0x804c00c) sending: substr outside of string at=20 /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> lin= e 5. Is that any more help? Dan ay 26 March 2003 12:53 pm, Graham Barr wrote: > Can you turn on debug at the start of the script, not just before > the ->add call. It may be the previous request that triggers > the problem. > > Graham. > > On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > > Debug gave me: > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > substr outside of string at > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> > > line 5. > > > > I havent been able to find anything in the logs except for where I ha= ve > > stopped and restared slapd. It logs to /var/log somewhere, right? > > > > Dan > > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > > > Following Grahm's advice, I received the following message. > > > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > > > That line is the select on the socket. What do you see with a debug > > > trace on ? $ldap->debug(15); > > > > > > Also, do you have access to the server logs, if so do you see anyth= ing > > > there. > > > > > > Graham. > > > > > > > Know what I am doing wrong yet? > > > > > > > > Dan > > > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> w= rote: > > > > > > > When I remove the [$dn] and replace it with $dn then my > > > > > > > origional problem of the script hanging without an error > > > > > > > happens again. > > > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > > > Dan > > > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg= to > > > > > > add and not as dn =3D> something. > > > > > > > > > > > > $ldap->add($dn, > > > > > > attrs =3D> [ blah blah ]); > > > > > > > > > > There is no difference between $ldap->ad($dn,...) and > > > > > $ldap->add(dn =3D> $dn,...) > > > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > > > Try adding this to your script. > > > > > > > > > > use Carp; > > > > > $SIG{USR2} =3D \&Carp::croak; > > > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > > > kill -USR2 $pid > > > > > > > > > > You should see a stack trace on stderr. > > > > > > > > > > Although if you are on a windows box I am not sure this will wo= rk. > > > > > > > > > > Graham. > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.net email is sponsored by: > > > > > The Definitive IT and Networking Event. Be There! > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: > > > > The Definitive IT and Networking Event. Be There! > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Graham B. <gb...@po...> - 2003-03-26 18:56:24
|
Can you turn on debug at the start of the script, not just before the ->add call. It may be the previous request that triggers the problem. Graham. On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > Debug gave me: > Net::LDAP=HASH(0x804c00c) sending: > > substr outside of string at > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> line 5. > > I havent been able to find anything in the logs except for where I have > stopped and restared slapd. It logs to /var/log somewhere, right? > > Dan > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > > Following Grahm's advice, I received the following message. > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > That line is the select on the socket. What do you see with a debug trace > > on ? $ldap->debug(15); > > > > Also, do you have access to the server logs, if so do you see anything > > there. > > > > Graham. > > > > > Know what I am doing wrong yet? > > > > > > Dan > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > > > > When I remove the [$dn] and replace it with $dn then my origional > > > > > > problem of the script hanging without an error happens again. > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > Dan > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to add > > > > > and not as dn => something. > > > > > > > > > > $ldap->add($dn, > > > > > attrs => [ blah blah ]); > > > > > > > > There is no difference between $ldap->ad($dn,...) and $ldap->add(dn => > > > > $dn,...) > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > Try adding this to your script. > > > > > > > > use Carp; > > > > $SIG{USR2} = \&Carp::croak; > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > kill -USR2 $pid > > > > > > > > You should see a stack trace on stderr. > > > > > > > > Although if you are on a windows box I am not sure this will work. > > > > > > > > Graham. > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: > > > > The Definitive IT and Networking Event. Be There! > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: > > > The Definitive IT and Networking Event. Be There! > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > |
From: Brad D. <br...@Di...> - 2003-03-26 18:08:47
|
Per Graham's recommendations in the "unblessed reference?" thread, I enabled debug level 15 and got the following output: Net::LDAP=HASH(0x8169f70) sending: 30 28 02 01 01 60 23 02 01 03 04 14 63 6E 3D 44 0(...`#.....cn=D 69 72 65 63 74 6F 72 79 20 4D 61 6E 61 67 65 72 irectory Manager 80 08 61 64 6D 69 6E 31 32 33 __ __ __ __ __ __ ..password 0000 40: SEQUENCE { 0002 1: INTEGER = 1 0005 35: [APPLICATION 0] { 0007 1: INTEGER = 3 000A 20: STRING = 'cn=Directory Manager' 0020 8: [CONTEXT 0] 0022 : 61 64 6D 69 6E 31 32 33 __ __ __ __ __ __ __ __ password 002A : } 002A : } Net::LDAP=HASH(0x8169f70) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ 0000 12: SEQUENCE { 0002 1: INTEGER = 1 0005 7: [APPLICATION 1] { 0007 1: ENUM = 0 000A 0: STRING = '' 000C 0: STRING = '' 000E : } 000E : } Adding Fname1, LName1, to samsun:389 via cn=Directory Manager:password DN before update "cn=Fname1 LName1, ou=People, o=diggsfamily" Net::LDAP=HASH(0x8169f70) sending: substr outside of string at /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <PSAFILE> line 1. ------------------------------------------------------ Doing the same at debug level 12 yields the following: Net::LDAP=HASH(0x8169f70) sending: 0000 40: SEQUENCE { 0002 1: INTEGER = 1 0005 35: [APPLICATION 0] { 0007 1: INTEGER = 3 000A 20: STRING = 'cn=Directory Manager' 0020 8: [CONTEXT 0] 0022 : 61 64 6D 69 6E 31 32 33 __ __ __ __ __ __ __ __ password 002A : } 002A : } Net::LDAP=HASH(0x8169f70) received: 0000 12: SEQUENCE { 0002 1: INTEGER = 1 0005 7: [APPLICATION 1] { 0007 1: ENUM = 0 000A 0: STRING = '' 000C 0: STRING = '' 000E : } 000E : } Adding Fname1, LName1, to samsun:389 via cn=Directory Manager:password DN before update "cn=Fname1 LName1, ou=People, o=diggsfamily" Net::LDAP=HASH(0x8169f70) sending: 0000 194: SEQUENCE { 0003 1: INTEGER = 2 0006 194: [APPLICATION 8] { 0009 42: STRING 000B : C2 B2 04 2A 63 6E 3D 46 6E 61 6D 65 31 20 4C 4E ...*cn=Fname1 LN 001B : 61 6D 65 31 2C 20 6F 75 3D 50 65 6F 70 6C 65 2C ame1, ou=People, 002B : 20 6F 3D 64 69 67 67 73 66 61 __ __ __ __ __ __ o=diggsfa 0035 194: SEQUENCE { 0038 21: SEQUENCE { 003A 2: STRING 003C : C2 81 __ __ __ __ __ __ __ __ __ __ __ __ __ __ .. 003E 15: SET { 0040 13: STRING 0042 : 63 6E 31 0F 04 0D 46 6E 61 6D 65 31 20 __ __ __ cn1...Fname1 004F : } 004F : } 004F 65: SEQUENCE { 0051 11: STRING 0053 : 65 31 30 41 04 0B 6F 62 6A 65 63 __ __ __ __ __ e10A..objec 005E 50: SET { 0060 3: STRING = 'ss1' 0065 6: STRING 0067 : 03 74 6F 70 04 06 __ __ __ __ __ __ __ __ __ __ .top.. 006D 20: STRING 006F : 72 73 6F 6E 04 14 6F 72 67 61 6E 69 7A 61 74 69 rson..organizati 007F : 6F 6E 61 6C __ __ __ __ __ __ __ __ __ __ __ __ onal 0083 13: STRING 0085 : 72 73 6F 6E 04 0D 69 6E 65 74 4F 72 67 __ __ __ rson..inetOrg 0092 : } 0092 : } 0092 14: SEQUENCE { 0094 2: STRING = 'on' 0098 8: SET { 009A 6: STRING 009C : 73 6E 31 08 04 06 __ __ __ __ __ __ __ __ __ __ sn1... 00A2 : } 00A2 : } 00A2 21: SEQUENCE { 00A4 9: STRING 00A6 : 65 31 30 15 04 09 67 69 76 __ __ __ __ __ __ __ e10...giv 00AF 8: SET { 00B1 6: STRING 00B3 : 6D 65 31 08 04 06 __ __ __ __ __ __ __ __ __ __ me1... 00B9 : } 00B9 : } DN after update "cn=Fname1 LName1, ou=People, o=diggsfamily" Error: Add failed -> I/O Error ------------------------------------------------------ With regards to the directory server log files, the directory server never receives the LDAP add request. It sees a successful connect and BIND but no add. Brad On Wed, 2003-03-26 at 11:22, Brad Diggs wrote: > Thanks to Graham for the recommendation (although on another thread, > I added the following to my script, ran it, and then killed it with > "kill -USR2 <pid>". > > use Carp; > $SIG{USR2} = \&Carp::croak; > > The following line was the resulting error returned by my script: > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > Note that this is consistent with what I had assumed from my previous > note. The LDAP is getting hung up on the asn_read on line 661 of > LDAP.pm. > > Regards, > Brad > > > On Tue, 2003-03-25 at 21:08, Brad Diggs wrote: > > Based on the previous note and the following excerpt from the LDAP.pm > > perl module, I presume that after the bind, the LDAP socket or > > associated file handler must be getting dropped before I send a > > request to it. > > > > 652 sub _recvresp { > > 653 my $ldap = shift; > > 654 my $what = shift; > > 655 my $sock = $ldap->socket; > > 656 my $sel = IO::Select->new($sock); > > 657 my $ready; > > 658 > > 659 for( $ready = 1 ; $ready ; $ready = $sel->can_read(0)) { > > 660 my $pdu; > > 661 asn_read($sock, $pdu) > > 662 or return LDAP_OPERATIONS_ERROR; > > > > My guess is that the open() function and the asn_read() functions are > > colliding on the file handler for the LDAP connection socket. Thats > > just by guess though. > > > > What do you think? I sure would like to see the answer because I can't > > get my data loaded into the directory. > > > > Brad > > > > On Tue, 2003-03-25 at 15:11, Brad Diggs wrote: > > > Running with Net::LDAP debug of 12 didn't yield much different than > > > with 4. However, I ran with perl debugger on and got the following > > > when I did a Ctrl-c on the hang... > > > > > > Convert::ASN1::asn_read(/usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm:198): > > > 198: READ_ERR: > > > 199: $@ = "I/O Error $! " . CORE::unpack("H*",$_[1]); > > > > > > Should I be led to believe by this that the problem may be in the ASN > > > code? > > > > > > Brad |
From: Daniel D. <da...@li...> - 2003-03-26 17:43:19
|
Debug gave me: Net::LDAP=3DHASH(0x804c00c) sending: substr outside of string at=20 /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> lin= e 5. I havent been able to find anything in the logs except for where I have=20 stopped and restared slapd. It logs to /var/log somewhere, right? Dan On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > Following Grahm's advice, I received the following message. > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > That line is the select on the socket. What do you see with a debug tra= ce > on ? $ldap->debug(15); > > Also, do you have access to the server logs, if so do you see anything > there. > > Graham. > > > Know what I am doing wrong yet? > > > > Dan > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote= : > > > > > When I remove the [$dn] and replace it with $dn then my origio= nal > > > > > problem of the script hanging without an error happens again. > > > > > > > > > > I'm stumped, > > > > > > > > > > Dan > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to = add > > > > and not as dn =3D> something. > > > > > > > > $ldap->add($dn, > > > > attrs =3D> [ blah blah ]); > > > > > > There is no difference between $ldap->ad($dn,...) and $ldap->add(d= n =3D> > > > $dn,...) > > > > > > It would be interesting to determine where it is hanging. > > > > > > Try adding this to your script. > > > > > > use Carp; > > > $SIG{USR2} =3D \&Carp::croak; > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > kill -USR2 $pid > > > > > > You should see a stack trace on stderr. > > > > > > Although if you are on a windows box I am not sure this will work. > > > > > > Graham. > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: > > > The Definitive IT and Networking Event. Be There! > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: <Sta...@GI...> - 2003-03-26 17:34:53
|
Brad, I've never gotten that particular error, but I have recieved many errors in perl-ldap and ASN1 when I submitted errant arguments due to typos in my code mostly. But my point is you can definately cause some misinteractions between Net::LDAP and Convert::ASN1 with bad values passed. I know that's not what's going on here, but I just thought I'd point out it happens. In fact I had to give up using $ldap->add/$ldap->update syntax stuff cause I could never get it to work on Solaris with per 5.6.1, it would die in Convert::ASN1 somewhere. I jsut remembered this as I was typing... let me dig back a bit and see if I can find my test script so I can see where I got an error. I believe this was back when I was using perl-ldap 0.26...hmmm -Stan Brad Diggs <br...@Di...> To: per...@li... Sent by: cc: per...@li...ur Subject: Re: $ldap->add hangs... ceforge.net 03/25/2003 04:11 PM Running with Net::LDAP debug of 12 didn't yield much different than with 4. However, I ran with perl debugger on and got the following when I did a Ctrl-c on the hang... Convert::ASN1::asn_read(/usr/lib/perl5/site_perl/5.8.0 /Convert/ASN1/IO.pm:198): 198: READ_ERR: 199: $@ = "I/O Error $! " . CORE::unpack("H*",$_[1]); Should I be led to believe by this that the problem may be in the ASN code? Brad ------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Brad D. <br...@Di...> - 2003-03-26 17:23:28
|
Thanks to Graham for the recommendation (although on another thread, I added the following to my script, ran it, and then killed it with "kill -USR2 <pid>". use Carp; $SIG{USR2} = \&Carp::croak; The following line was the resulting error returned by my script: USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 Note that this is consistent with what I had assumed from my previous note. The LDAP is getting hung up on the asn_read on line 661 of LDAP.pm. Regards, Brad On Tue, 2003-03-25 at 21:08, Brad Diggs wrote: > Based on the previous note and the following excerpt from the LDAP.pm > perl module, I presume that after the bind, the LDAP socket or > associated file handler must be getting dropped before I send a > request to it. > > 652 sub _recvresp { > 653 my $ldap = shift; > 654 my $what = shift; > 655 my $sock = $ldap->socket; > 656 my $sel = IO::Select->new($sock); > 657 my $ready; > 658 > 659 for( $ready = 1 ; $ready ; $ready = $sel->can_read(0)) { > 660 my $pdu; > 661 asn_read($sock, $pdu) > 662 or return LDAP_OPERATIONS_ERROR; > > My guess is that the open() function and the asn_read() functions are > colliding on the file handler for the LDAP connection socket. Thats > just by guess though. > > What do you think? I sure would like to see the answer because I can't > get my data loaded into the directory. > > Brad > > On Tue, 2003-03-25 at 15:11, Brad Diggs wrote: > > Running with Net::LDAP debug of 12 didn't yield much different than > > with 4. However, I ran with perl debugger on and got the following > > when I did a Ctrl-c on the hang... > > > > Convert::ASN1::asn_read(/usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/IO.pm:198): > > 198: READ_ERR: > > 199: $@ = "I/O Error $! " . CORE::unpack("H*",$_[1]); > > > > Should I be led to believe by this that the problem may be in the ASN > > code? > > > > Brad |
From: Graham B. <gb...@po...> - 2003-03-26 17:10:07
|
On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > Following Grahm's advice, I received the following message. > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 That line is the select on the socket. What do you see with a debug trace on ? $ldap->debug(15); Also, do you have access to the server logs, if so do you see anything there. Graham. > > Know what I am doing wrong yet? > > Dan > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > > When I remove the [$dn] and replace it with $dn then my origional > > > > problem of the script hanging without an error happens again. > > > > > > > > I'm stumped, > > > > > > > > Dan > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to add and > > > not as dn => something. > > > > > > $ldap->add($dn, > > > attrs => [ blah blah ]); > > > > There is no difference between $ldap->ad($dn,...) and $ldap->add(dn => > > $dn,...) > > > > It would be interesting to determine where it is hanging. > > > > Try adding this to your script. > > > > use Carp; > > $SIG{USR2} = \&Carp::croak; > > > > Then when it hangs, find the pid and in another shell do > > > > kill -USR2 $pid > > > > You should see a stack trace on stderr. > > > > Although if you are on a windows box I am not sure this will work. > > > > Graham. > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Daniel D. <da...@li...> - 2003-03-26 16:48:18
|
Following Grahm's advice, I received the following message. USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 Know what I am doing wrong yet? Dan On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > When I remove the [$dn] and replace it with $dn then my origional > > > problem of the script hanging without an error happens again. > > > > > > I'm stumped, > > > > > > Dan > > > > Oops, to set the entry's DN just pass the DN as the first arg to add = and > > not as dn =3D> something. > > > > $ldap->add($dn, > > attrs =3D> [ blah blah ]); > > There is no difference between $ldap->ad($dn,...) and $ldap->add(dn =3D= > > $dn,...) > > It would be interesting to determine where it is hanging. > > Try adding this to your script. > > use Carp; > $SIG{USR2} =3D \&Carp::croak; > > Then when it hangs, find the pid and in another shell do > > kill -USR2 $pid > > You should see a stack trace on stderr. > > Although if you are on a windows box I am not sure this will work. > > Graham. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Graham B. <gb...@po...> - 2003-03-26 16:19:01
|
On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > When I remove the [$dn] and replace it with $dn then my origional problem of > > the script hanging without an error happens again. > > > > I'm stumped, > > > > Dan > > Oops, to set the entry's DN just pass the DN as the first arg to add and not > as dn => something. > > $ldap->add($dn, > attrs => [ blah blah ]); There is no difference between $ldap->ad($dn,...) and $ldap->add(dn => $dn,...) It would be interesting to determine where it is hanging. Try adding this to your script. use Carp; $SIG{USR2} = \&Carp::croak; Then when it hangs, find the pid and in another shell do kill -USR2 $pid You should see a stack trace on stderr. Although if you are on a windows box I am not sure this will work. Graham. |
From: Chris R. <chr...@ma...> - 2003-03-26 15:32:17
|
On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > When I remove the [$dn] and replace it with $dn then my origional problem of > the script hanging without an error happens again. > > I'm stumped, > > Dan Oops, to set the entry's DN just pass the DN as the first arg to add and not as dn => something. $ldap->add($dn, attrs => [ blah blah ]); I didn't spot this earlier, sorry! Cheers, Chris |
From: Cunningham, C. <ccu...@ma...> - 2003-03-26 15:13:50
|
That did it, thanks! > A similar sounding problem came up before. Then, Graham's comment: > > > Have you tried it with a pre 5.8 version of perl ? > > > > I have a feeling this is something todo with unicode/utf8 support > > in 5.8 that Convert::ASN1 is not accounting for. > > > > As you are on RH 8.0, what do you have in /etc/sysconfig/i18n > > > > If it mentions UTF-8 try setting your LANG environment variable to en_US > > > > Graham. > > provided a solution. > > Cheers, > > Chris > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > |
From: Daniel D. <da...@li...> - 2003-03-26 15:09:10
|
When I remove the [$dn] and replace it with $dn then my origional proble= m of=20 the script hanging without an error happens again. I'm stumped, Dan On Wednesday 26 March 2003 12:56 am, Chris Ridd wrote: > On 25/3/03 8:57 pm, Daniel Davidson <da...@li...> wrote: > > Thanks to the help of Chris, I am at least now getting an error messa= ge. > > > > Can't call method "asn" on unblessed reference at > > /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 354, <STDIN> line 5. > > That's because you used [ $dn ]. > > > My code is nearly the same as it was in my last post: > > > > $ldap=3DNet::LDAP->new($server) or die "$@"; > > $ldap->bind(dn =3D> $rootdn, password =3D> $dnpassword) or die "bind"= ; > > The bind method returns a result object (like add, etc). You need to ch= eck > the result code in the result object to determine if the bind succeeded= =2E > > > $result=3D$ldap->add( > > dn =3D> [$dn], > > That should probably be just dn =3D> $dn; the arrayrefs I suggested bef= ore > are only needed for attribute values. Sorry I should have mentioned tha= t > too :-) > > The add method checks if the dn argument is a Net::LDAP::Entry object b= y > calling ref() on it, and if not constructs such an object. When you pas= sed > [ $dn ] this caused ref() to return true and the code assumed wrongly t= hat > it was a Net::LDAP::Entry. The error you quoted is because it then trie= s to > call the asn method on that "object", which in your case isn't one. > > Cheers, > > Chris > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Chris R. <chr...@ma...> - 2003-03-26 14:56:55
|
On 26/3/03 2:27 pm, Cunningham, Chad <ccu...@ma...> wrote: > > Hi, > > I have a script using perl-ldap to keep an ldap database in sync with a > password file. It's worked fine for quite some time, however after a > recent server upgrade (and move from redhat 7.3 to redhat 8.0) it no > longer works. > > When I run it, I get an error that says Broken Pipe. No idea what that > means, but I'm starting from the beginning in trying to debug it. It is > trying to add a user to the ldap database that already exists, and that > obviously won't work. I've tracked it down to this piece of code and put > in some debugging output: > > if ($search eq "uid=khimgio") { print "same"; } > chop($search); > my $result = $ldap->search ( > #base => $base, > #scope => "sub", > #filter => "uid=khimgio", > #attrs => $attrs > base => $base, > scope => "sub", > filter => $search, > attrs => $attrs > ); > if ($result->entries) { print "got it"; } > > This is part of a much larger script. When I run it, the first user to be > processed is khimgio. The script outputs "same" indicating that we are > using a filter for uid=khimgio. Now here's the interesting part. If I run > this with the first set of arguments to the search (i.e. with a string > saying to filter on uid=khimgio), it prints out got it, indicating it > found the record. If I use the second set of arguments (the ones not > commented out) which are *exactly* the same only using $search instead of > manually setting the filter, it does not print out got it. > > As far as I can tell, $search is the same as "uid=khimgio". Why would one > fail and the other work? A similar sounding problem came up before. Then, Graham's comment: > Have you tried it with a pre 5.8 version of perl ? > > I have a feeling this is something todo with unicode/utf8 support > in 5.8 that Convert::ASN1 is not accounting for. > > As you are on RH 8.0, what do you have in /etc/sysconfig/i18n > > If it mentions UTF-8 try setting your LANG environment variable to en_US > > Graham. provided a solution. Cheers, Chris |
From: Cunningham, C. <ccu...@ma...> - 2003-03-26 14:27:55
|
Hi, I have a script using perl-ldap to keep an ldap database in sync with a password file. It's worked fine for quite some time, however after a recent server upgrade (and move from redhat 7.3 to redhat 8.0) it no longer works. When I run it, I get an error that says Broken Pipe. No idea what that means, but I'm starting from the beginning in trying to debug it. It is trying to add a user to the ldap database that already exists, and that obviously won't work. I've tracked it down to this piece of code and put in some debugging output: if ($search eq "uid=khimgio") { print "same"; } chop($search); my $result = $ldap->search ( #base => $base, #scope => "sub", #filter => "uid=khimgio", #attrs => $attrs base => $base, scope => "sub", filter => $search, attrs => $attrs ); if ($result->entries) { print "got it"; } This is part of a much larger script. When I run it, the first user to be processed is khimgio. The script outputs "same" indicating that we are using a filter for uid=khimgio. Now here's the interesting part. If I run this with the first set of arguments to the search (i.e. with a string saying to filter on uid=khimgio), it prints out got it, indicating it found the record. If I use the second set of arguments (the ones not commented out) which are *exactly* the same only using $search instead of manually setting the filter, it does not print out got it. As far as I can tell, $search is the same as "uid=khimgio". Why would one fail and the other work? |