From: <rm...@ds...> - 2002-10-16 11:40:14
|
Hi all, I get an I/O Error when executing this code: $ldap =3D Net::LDAPS->new($ldapserver, port =3D> '636', verify =3D> 'none', ); my $m =3D $ldap->search( base =3D> $base, attrs =3D> ['dn'] , filter =3D> "(sAMAccountName=3D*)"); I read the problem occurs because it returns too=20 much results, therefore I tried this other code ( note the r* ): my $m =3D $ldap->search( base =3D> $base, attrs =3D> ['dn'] , filter =3D> "(sAMAccountName=3Dr*)"); and it worked ok, returning all the entries starting with 'r', The first code should return about 300 entries, how could I get the whole search? I use: Redhat 7.2 Perl 5.6.1 perl-ldap 0.26 Convert::BER 1.31 ( I updated it because I read it could be guilty) the server is a Windows 2000 Advanced server SP2 thanks, ######################################################################## Rafa Martinez Diaz Dep. Sistemas Inform=E1ticos y Computaci=F3n Univ. Polit=E9cnica de Valencia Camino de Vera, s/n Valencia 46022 Tel: (+34) 96 387 73 55 Ext: 73553 ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ |
From: Peter M. <pet...@ma...> - 2002-10-17 09:36:47
|
Hi, I do not think it is a problem with Net::LDAP. Net::LDAP can cope with more than 20.000 enbtries in one search result (that's what I use regularly, so i know it works.) Ask your ADS-Admins to increase the sizelimit for LDAP searches. CU PEter On Wednesday 16 October 2002 13:35, you wrote: > Hi all, > > I get an I/O Error when executing this code: > > =09$ldap =3D Net::LDAPS->new($ldapserver, > port =3D> '636', > verify =3D> 'none', > ); > =09my $m =3D $ldap->search( base =3D> $base, > =09=09=09=09 attrs =3D> ['dn'] , > =09=09=09=09filter =3D> "(sAMAccountName=3D*)"); > > I read the problem occurs because it returns too > much results, therefore I tried this other code ( note the r* ): > > =09my $m =3D $ldap->search( base =3D> $base, > =09=09=09=09 attrs =3D> ['dn'] , > =09=09=09=09filter =3D> "(sAMAccountName=3Dr*)"); > > and it worked ok, returning all the entries starting with 'r', > > The first code should return about 300 entries, > how could I get the whole search? > > I use: > Redhat 7.2 > Perl 5.6.1 > perl-ldap 0.26 > Convert::BER 1.31 ( I updated it because I read it could be guilty) > the server is a Windows 2000 Advanced server SP2 > > thanks, > #######################################################################= # > Rafa Martinez Diaz > Dep. Sistemas Inform=E1ticos y Computaci=F3n > Univ. Polit=E9cnica de Valencia > Camino de Vera, s/n > Valencia 46022 > Tel: (+34) 96 387 73 55 > Ext: 73553 > > ------------------------------------------------- > This mail sent through IMP: http://horde.org/imp/ > > > ------------------------------------------------------- > This sf.net email is sponsored by: viaVerio will pay you up to > $1,000 for every account that you consolidate with us. > http://ad.doubleclick.net/clk;4749864;7604308;v? > http://www.viaverio.com/consolidator/osdn.cfm --=20 Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@is... 97072 W=FCrzburg | Tel: 0931/14721 PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 |
From: Chris R. <chr...@ma...> - 2002-10-17 11:42:57
|
On 17/10/02 10:36 am, Peter Marschall <pet...@ma...> wrote: > Hi, > > I do not think it is a problem with Net::LDAP. > Net::LDAP can cope with more than 20.000 enbtries in one search result > (that's what I use regularly, so i know it works.) > > Ask your ADS-Admins to increase the sizelimit for LDAP searches. > > CU > PEter Alternatively, if your directory supports simple paged results (RFC 2696) you can get avoid the sizelimit. Check the Net::LDAP::Control::Paged class. Cheers, Chris |
From: Graham B. <gb...@po...> - 2002-10-17 11:57:19
|
On Wed, Oct 16, 2002 at 01:35:29PM +0200, rm...@ds... wrote: > > Hi all, > > I get an I/O Error when executing this code: > > $ldap = Net::LDAPS->new($ldapserver, > port => '636', > verify => 'none', > ); > my $m = $ldap->search( base => $base, > attrs => ['dn'] , > filter => "(sAMAccountName=*)"); > > I use: > Redhat 7.2 > Perl 5.6.1 > perl-ldap 0.26 > Convert::BER 1.31 ( I updated it because I read it could be guilty) > the server is a Windows 2000 Advanced server SP2 Hm, We have had this reported before on win2k. I have this funny feeling that if we dont read the packets fast enough it triggers an issue in thier tcp stack which results in an io error. What happenes of you add callback => sub { $_[0]->shift_entry } to the search arguments ? Graham. |
From: <rm...@ds...> - 2002-10-17 12:42:10
|
Hi Graham, Thanks for your suggestion,I added it to the code and I executed : my $m = $ldap->search( base => $base, attrs => ['dn'] , callback => sub { $_[0]->shift_entry }, filter => "sAMAccountName=*"); and the result was the same I/O Error. I tried the next shell command on the same machine: ldapsearch -x -P 2 -H ldaps://ldapserver "ou=,...,dc=com" "sAMAccountName=*" with openldap-2.0.21-1, and it worked ok, returning 482 entries, so I think the problem may be caused by the perl code. Thanks. Mensaje citado por Graham Barr <gb...@po...>: > On Wed, Oct 16, 2002 at 01:35:29PM +0200, rm...@ds... wrote: > > > > Hi all, > > > > I get an I/O Error when executing this code: > > > > $ldap = Net::LDAPS->new($ldapserver, > > port => '636', > > verify => 'none', > > ); > > my $m = $ldap->search( base => $base, > > attrs => ['dn'] , > > filter => "(sAMAccountName=*)"); > > > > > I use: > > Redhat 7.2 > > Perl 5.6.1 > > perl-ldap 0.26 > > Convert::BER 1.31 ( I updated it because I read it could be guilty) > > the server is a Windows 2000 Advanced server SP2 > > Hm, We have had this reported before on win2k. I have this funny feeling > that if we dont read the packets fast enough it triggers an issue in thier > tcp stack > which results in an io error. > > What happenes of you add > > callback => sub { $_[0]->shift_entry } > > to the search arguments ? > > Graham. > ######################################################################## Rafa Martinez Diaz ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ |