Actually I have created the user and input the correct user name/password.

Then I tried again and got following exceptions,

Error while opening connection
 - java.security.PrivilegedActionException: 
org.apache.directory.api.ldap.model.exception.LdapException: 
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: 
No valid credentials provided (Mechanism level: Server not found in Kerberos 
database (7) - Server not found in Kerberos database)]
org.apache.directory.api.ldap.model.exception.LdapException: 
java.security.PrivilegedActionException: 
org.apache.directory.api.ldap.model.exception.LdapException: 
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: 
No valid credentials provided (Mechanism level: Server not found in Kerberos 
database (7) - Server not found in Kerberos database)]
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.bindAsync(LdapNetworkConnection.java:1671)
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.bind(LdapNetworkConnection.java:1557)
    at 
org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper$2.run(DirectoryApiConnectionWrapper.java:436)
    at 
org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.runAndMonitor(DirectoryApiConnectionWrapper.java:1163)
    at 
org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.doBind(DirectoryApiConnectionWrapper.java:449)
    at 
org.apache.directory.studio.connection.core.io.api.DirectoryApiConnectionWrapper.bind(DirectoryApiConnectionWrapper.java:295)
    at 
org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.run(OpenConnectionsRunnable.java:114)
    at 
org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:109)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.security.PrivilegedActionException: 
org.apache.directory.api.ldap.model.exception.LdapException: 
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: 
No valid credentials provided (Mechanism level: Server not found in Kerberos 
database (7) - Server not found in Kerberos database)]
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.bindAsync(LdapNetworkConnection.java:1661)
    ... 8 more
Caused by: org.apache.directory.api.ldap.model.exception.LdapException: 
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: 
No valid credentials provided (Mechanism level: Server not found in Kerberos 
database (7) - Server not found in Kerberos database)]
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.bindSasl(LdapNetworkConnection.java:4149)
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.access$200(LdapNetworkConnection.java:186)
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection$2.run(LdapNetworkConnection.java:1665)
    ... 11 more
Caused by: javax.security.sasl.SaslException: GSS initiate failed [Caused by 
GSSException: No valid credentials provided (Mechanism level: Server not found 
in Kerberos database (7) - Server not found in Kerberos database)]
    at 
com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:211)
    at 
org.apache.directory.ldap.client.api.LdapNetworkConnection.bindSasl(LdapNetworkConnection.java:4059)
    ... 13 more
Caused by: GSSException: No valid credentials provided (Mechanism level: Server 
not found in Kerberos database (7) - Server not found in Kerberos database)
    at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:770)
    at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:248)
    at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:179)
    at 
com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:192)
    ... 14 more
Caused by: KrbException: Server not found in Kerberos database (7) - Server not 
found in Kerberos database
    at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:73)
    at sun.security.krb5.KrbTgsReq.getReply(KrbTgsReq.java:259)
    at sun.security.krb5.KrbTgsReq.sendAndGetCreds(KrbTgsReq.java:270)
    at 
sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:302)
    at 
sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:120)
    at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:458)
    at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:693)
    ... 17 more
Caused by: KrbException: Identifier doesn't match expected value (906)
    at sun.security.krb5.internal.KDCRep.init(KDCRep.java:140)
    at sun.security.krb5.internal.TGSRep.init(TGSRep.java:65)
    at sun.security.krb5.internal.TGSRep.<init>(TGSRep.java:60)
    at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:55)
    ... 23 more

java.security.PrivilegedActionException: 
org.apache.directory.api.ldap.model.exception.LdapException: 
javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: 
No valid credentials provided (Mechanism level: Server not found in Kerberos 
database (7) - Server not found in Kerberos database)]


And I also added entries for "services" named "krbtgt" and "ldap".

Another strange behavior is that sometimes I couldn't fetch all entries even 
through ldap connection.



Thanks,

Jared, (韦煜)
Software developer
Interested in open source software, big data, Linux

________________________________
From: Emmanuel Lécharny <[email protected]>
Sent: Monday, February 6, 2017 4:01:34 PM
To: [email protected]
Subject: Re: Failed to setup kerberos with ApacheDS [Client not found in 
Kerberos database]



Le 06/02/2017 à 08:45, Yu Wei a écrit :
> Hi Guys,
>
> I tried to setup kerberos with ApacheDS Studio by following the instruction 
> https://directory.apache.org/apacheds/kerberos-ug/4.2-authenticate-studio.html.
>
> I got below errors indicating "Client not found in Kerberos database",

This error indicates that there is no entry for the user you are trying
to bind with in the LDAP database. Check that first.

--
Emmanuel Lecharny

Symas.com
directory.apache.org

Reply via email to