Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> DBMS_LDAP error
Hi all,
I am testing authentication to MS AD from oracle using dbms_ldap. Using non-ssl method, it works great, but using SSL (which we prefer) fails with following message.
Error code : -31202
Error Message : ORA-31202: DBMS_LDAP: LDAP client/server error: UnKnown Error
I am clueless as to the reason.
I however traced the LDAP (using exec
dbms_ldap.set_trace_level(65535);) and following message come up in
the trace files ...
Bridge Debug : TDP : SSL allocated memory is at 1 4096 bytes Bridge Debug : sgslunrRead: Entry Bridge Debug : sgslunrRead: Error while reading communication end point (2)
Does anyone have any clue what's going wrong? I am not using OID, just plain simple test.
code is below if you are interested ...
oraclei_at_pallas-RELNCS2> less ldap2.sql
set serveroutput on size 30000
set verify off echo off
exec dbms_ldap.set_trace_level(65535);
DECLARE
retval PLS_INTEGER;
my_session DBMS_LDAP.session;
ldap_host VARCHAR2(256); ldap_port VARCHAR2(256); ldap_user VARCHAR2(256); ldap_passwd VARCHAR2(256); ldap_base VARCHAR2(256);
ldap_host := 'xxxxx.corp.espn.pvt' ; ldap_port := '636'; ldap_user := 'CN=Jamadagni\, Rajendra,OU=Users,OU=xxx,DC=xxx,DC=xxx,DC=xxx'; ldap_passwd:= '&&pwd'; ldap_base := 'cn=orcladmin,cn=users,dc=acme,dc=org';
DBMS_OUTPUT.PUT_line('DBMS_LDAP Search Example '); DBMS_OUTPUT.PUT_LINE('to directory .. '); DBMS_OUTPUT.PUT_LINE(RPAD('LDAP Host ',25,' ') || ': ' || ldap_host); DBMS_OUTPUT.PUT_LINE(RPAD('LDAP Port ',25,' ') || ': ' || ldap_port);
DBMS_OUTPUT.PUT_LINE(' Error code : ' || TO_CHAR(SQLCODE)); DBMS_OUTPUT.PUT_LINE(' Error Message : ' || SQLERRM); DBMS_OUTPUT.PUT_LINE(' Exception encountered .. exiting');END;
And of course it fails with following after init.
Error code : -31202
Error Message : ORA-31202: DBMS_LDAP: LDAP client/server error: UnKnown Error
TIA
Raj