Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Server encountered

Reply
Thread Tools

Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Server encountered

 
 
Durairaj Avasi
Guest
Posts: n/a
 
      04-06-2004
#!/usr/bin/perl -w
use Net::LDAP;
use Net::LDAP::Util qw(ldap_error_name ldap_error_text);
my $ldap = Net::LDAP->new('xy.webdurai.net', port=> 389) or die "$@";

my @args = (
base => 'DC=xy',
scope => "subtree",
filter =>
'(&(objectClass=user)(objectCategory=Person))',
attrs => ["distinguishedName", "Home-MDB",
"postalAddress", "l","st", "postalcode"]
);
my $mesg = $ldap->search( @args );
if ($mesg->code) {
print "ERROR detected: -> ",
ldap_error_name($mesg->code), " ",
ldap_error_text($mesg->code);
warn "ERROR - not LDAP_SUCCESS";
#last;
}
my $total = $mesg->count;
print " the total is $total";

OUTPUT IS:
==========
ERROR detected: -> LDAP_OPERATIONS_ERROR Server encountered
ERROR - not LDAP_SUCCESS at u.pl line 15, <DATA> line 424.

NOTE::
=======

why i am getting LDAP_OPERATIONS_ERROR?

i am running under activeperl/perl-ldap/windows 2000

this is just simple search... do i have to bind it?

i thought i don't need to bind for search!!

thanks in advance.

Durairaj K. Avasi
 
Reply With Quote
 
 
 
 
Durairaj Avasi
Guest
Posts: n/a
 
      04-07-2004
Vetle:::

Binded i found the same bug..

after using ::

$ldap->debug(15);

found the following log:::


Net::LDAP=HASH(0x16d4fa4) sending:

30 0C 02 01 01 60 07 02 01 03 04 00 80 00 __ __ 0....`........

0000 12: SEQUENCE {
0002 1: INTEGER = 1
0005 7: [APPLICATION 0] {
0007 1: INTEGER = 3
000A 0: STRING = ''
000C 0: [CONTEXT 0]
000E : }
000E : }
Net::LDAP=HASH(0x16d4fa4) received:

30 84 00 00 00 10 02 01 01 61 84 00 00 00 07 0A 0........a......
01 00 04 00 04 00 __ __ __ __ __ __ __ __ __ __ ......

0000 16: SEQUENCE {
0006 1: INTEGER = 1
0009 7: [APPLICATION 1] {
000F 1: ENUM = 0
0012 0: STRING = ''
0014 0: STRING = ''
0016 : }
0016 : }
Net::LDAP=HASH(0x16d4fa4) sending:

30 81 90 02 01 02 63 66 04 1A 44 43 3D 66 72 2C 0.....cf..DC=fr,
44 43 3D 65 75 72 77 2C 44 43 3D 65 79 2C 44 43 DC=eurw,DC=ey,DC
3D 6E 65 74 0A 01 02 0A 01 02 02 01 00 02 01 00 =net............
01 01 00 A0 2F A3 13 04 0B 6F 62 6A 65 63 74 43 ..../....objectC
6C 61 73 73 04 04 75 73 65 72 A3 18 04 0E 6F 62 lass..user....ob
6A 65 63 74 43 61 74 65 67 6F 72 79 04 06 50 65 jectCategory..Pe
72 73 6F 6E 30 08 04 06 6D 65 6D 62 65 72 A0 23 rson0...member.#
30 21 04 16 31 2E 32 2E 38 34 30 2E 31 31 33 35 0!..1.2.840.1135
35 36 2E 31 2E 34 2E 33 31 39 04 07 30 05 02 01 56.1.4.319..0...
64 04 00 __ __ __ __ __ __ __ __ __ __ __ __ __ d..

0000 144: SEQUENCE {
0003 1: INTEGER = 2
0006 102: [APPLICATION 3] {
0008 26: STRING = 'DC=fr,DC=eurw,DC=ey,DC=net'
0024 1: ENUM = 2
0027 1: ENUM = 2
002A 1: INTEGER = 0
002D 1: INTEGER = 0
0030 1: BOOLEAN = FALSE
0033 47: [CONTEXT 0] {
0035 19: [CONTEXT 3] {
0037 11: STRING = 'objectClass'
0044 4: STRING = 'user'
004A : }
004A 24: [CONTEXT 3] {
004C 14: STRING = 'objectCategory'
005C 6: STRING = 'Person'
0064 : }
0064 : }
0064 8: SEQUENCE {
0066 6: STRING = 'member'
006E : }
006E : }
006E 35: [CONTEXT 0] {
0070 33: SEQUENCE {
0072 22: STRING = '1.2.840.113556.1.4.319'
008A 7: STRING
008C : 30 05 02 01 64 04 00 __ __ __ __ __ __ __ __ __ 0...d..
0093 : }
0093 : }
0093 : }
Net::LDAP=HASH(0x16d4fa4) received:

30 84 00 00 00 A7 02 01 02 65 84 00 00 00 9E 0A 0........e......
01 01 04 00 04 84 00 00 00 93 30 30 30 30 30 30 ..........000000
30 30 3A 20 4C 64 61 70 45 72 72 3A 20 44 53 49 00: LdapErr: DSI
44 2D 30 43 30 39 30 35 46 46 2C 20 63 6F 6D 6D D-0C0905FF, comm
65 6E 74 3A 20 49 6E 20 6F 72 64 65 72 20 74 6F ent: In order to
20 70 65 72 66 6F 72 6D 20 74 68 69 73 20 6F 70 perform this op
65 72 61 74 69 6F 6E 20 61 20 73 75 63 63 65 73 eration a succes
73 66 75 6C 20 62 69 6E 64 20 6D 75 73 74 20 62 sful bind must b
65 20 63 6F 6D 70 6C 65 74 65 64 20 6F 6E 20 74 e completed on t
68 65 20 63 6F 6E 6E 65 63 74 69 6F 6E 2E 2C 20 he connection.,
64 61 74 61 20 30 2C 20 76 65 63 65 00 __ __ __ data 0, vece.

0000 167: SEQUENCE {
0006 1: INTEGER = 2
0009 158: [APPLICATION 5] {
000F 1: ENUM = 1
0012 0: STRING = ''
0014 147: STRING
001A : 30 30 30 30 30 30 30 30 3A 20 4C 64 61 70 45 72 00000000: LdapEr
002A : 72 3A 20 44 53 49 44 2D 30 43 30 39 30 35 46 46 r: DSID-0C0905FF
003A : 2C 20 63 6F 6D 6D 65 6E 74 3A 20 49 6E 20 6F 72 , comment: In
004A : 64 65 72 20 74 6F 20 70 65 72 66 6F 72 6D 20 74 order to perform
005A : 68 69 73 20 6F 70 65 72 61 74 69 6F 6E 20 61 20 this operation a
006A : 73 75 63 63 65 73 73 66 75 6C 20 62 69 6E 64 20 successful bind
007A : 6D 75 73 74 20 62 65 20 63 6F 6D 70 6C 65 74 65 must be completed
008A : 64 20 6F 6E 20 74 68 65 20 63 6F 6E 6E 65 63 74 on the connection
009A : 69 6F 6E 2E 2C 20 64 61 74 61 20 30 2C 20 76 65 ., data 0, v
00AA : 63 65 00 __ __ __ __ __ __ __ __ __ __ __ __ __ ce.
00AD : }
00AD : }
ERROR detected: -> LDAP_OPERATIONS_ERROR Server encountered an internal error
ERROR - not LDAP_SUCCESS at userCount.pl line 71, <DATA> line 655.
Net::LDAP=HASH(0x16d4fa4) sending:

30 05 02 01 03 42 00 __ __ __ __ __ __ __ __ __ 0....B.

0000 5: SEQUENCE {
0002 1: INTEGER = 3
0005 0: [APPLICATION 2]
0007 : }






http://www.velocityreviews.com/forums/(E-Mail Removed) (Durairaj Avasi) wrote in message news:<(E-Mail Removed). com>...
> #!/usr/bin/perl -w
> use Net::LDAP;
> use Net::LDAP::Util qw(ldap_error_name ldap_error_text);
> my $ldap = Net::LDAP->new('xy.webdurai.net', port=> 389) or die "$@";
>
> my @args = (
> base => 'DC=xy',
> scope => "subtree",
> filter =>
> '(&(objectClass=user)(objectCategory=Person))',
> attrs => ["distinguishedName", "Home-MDB",
> "postalAddress", "l","st", "postalcode"]
> );
> my $mesg = $ldap->search( @args );
> if ($mesg->code) {
> print "ERROR detected: -> ",
> ldap_error_name($mesg->code), " ",
> ldap_error_text($mesg->code);
> warn "ERROR - not LDAP_SUCCESS";
> #last;
> }
> my $total = $mesg->count;
> print " the total is $total";
>
> OUTPUT IS:
> ==========
> ERROR detected: -> LDAP_OPERATIONS_ERROR Server encountered
> ERROR - not LDAP_SUCCESS at u.pl line 15, <DATA> line 424.
>
> NOTE::
> =======
>
> why i am getting LDAP_OPERATIONS_ERROR?
>
> i am running under activeperl/perl-ldap/windows 2000
>
> this is just simple search... do i have to bind it?
>
> i thought i don't need to bind for search!!
>
> thanks in advance.
>
> Durairaj K. Avasi

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenLDAP & java steve Java 3 06-28-2009 05:48 PM
ASA5500 OpenLDAP AAA Server nobody@comcast.net Cisco 2 07-01-2006 05:39 AM
OpenLDAP + java + changing user's passwords Eric Gutierrez Java 2 12-10-2004 02:44 AM
Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Server encountered Durairaj Avasi Perl 1 04-06-2004 11:17 PM
Help needed:: Openldap issue - - LDAP_OPERATIONS_ERROR Server encountered Durairaj Avasi Perl Misc 1 04-06-2004 06:46 PM



Advertisments