Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LDAP: error code 49 - cannot bind the principalDn

I'm a newbie to ApacheDS.I just created a new partition in ApcheDS. When i try to register my connection factory i get above error..(with OracleAQ )

My code is;

    // ldap settings
        env.put(Context.INITIAL_CONTEXT_FACTORY, AQjmsConstants.INIT_CTX_FACTORY);
        env.put(Context.PROVIDER_URL, "ldap://localhost:10389/");
            env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system,dc=acme,dc=com"); 
        env.put(Context.SECURITY_CREDENTIALS, "secret");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");

My LDIF file looks like;

dn: dc=acme,dc=com
objectClass: organization
objectClass: dcObject
objectClass: top
dc: acme
o: Acme,Inc

dn: cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: OracleContext

dn: cn=db1,cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: db1

dn: cn=OracleDBConnections,cn=db1,cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: OracleDBConnections

dn: cn=OracleDBQueue,cn=db1,cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: OracleDBQueue

What is the wrong with my connection parameters? any help would be appreciate?

Thanks,

like image 616
Ratha Avatar asked Feb 22 '23 19:02

Ratha


2 Answers

Change the bind DN to uid=admin,ou=system instead of uid=admin,ou=system,dc=acme,dc=com (this DN is invalid as per your current server data)

like image 52
kayyagari Avatar answered Feb 27 '23 19:02

kayyagari


The issue was, i haven't created a user entry for that particular new partition..I solved it now..

like image 37
Ratha Avatar answered Feb 27 '23 20:02

Ratha