Kerberos Ldap Active Directory Authentication on win 2003?

Hi All

I am trying to use GSSAPI mode of authentication and connect

to Active Directory running on a Win 2003 server and in the process

I am getting following error. What does it mean Server not found in Kerberos database.What the configuration am I missing in Active Directory Server?.The code started failing after restarting the Active Directory Server. Do I need to restart any service or anything for kerberos.

javax.naming.AuthenticationException: GSSAPI [Root exception is javax.security.sasl.SaslException: GSS initiate f

ailed [Caused by GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos datab

ase (7))]]

at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:150)

at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:214)

at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2658)

at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:287)

at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)

at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193)

at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136)

at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)

at javax.naming.InitialContext.init(InitialContext.java:223)

at javax.naming.InitialContext.<init>(InitialContext.java:197)

at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82)

at AuthOnly$MyAction.performJndiOperation(AuthOnly.java:114)

at AuthOnly$MyAction.run(AuthOnly.java:102)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:337)

at AuthOnly.run(AuthOnly.java:76)

at TestUtils.runTest(TestUtils.java:61)

at TestUtils.runTest(TestUtils.java:44)

at AuthOnly.main(AuthOnly.java:31)

Caused by: javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials p

rovided (Mechanism level: Server not found in Kerberos database (7))]

at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:194)

at com.sun.jndi.ldap.sasl.LdapSasl.saslBind(LdapSasl.java:105)

... 20 more

Caused by: GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos database (7

))

at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:663)

at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:230)

at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)

at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(GssKrb5Client.java:175)

... 21 more

Caused by: KrbException: Server not found in Kerberos database (7)

at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:61)

at sun.security.krb5.KrbTgsReq.getReply(KrbTgsReq.java:185)

at sun.security.krb5.internal.CredentialsUtil.serviceCreds(CredentialsUtil.java:294)

at sun.security.krb5.internal.CredentialsUtil.acquireServiceCreds(CredentialsUtil.java:106)

at sun.security.krb5.Credentials.acquireServiceCreds(Credentials.java:562)

at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:594)

... 24 more

Caused by: KrbException: Identifier doesn't match expected value (906)

at sun.security.krb5.internal.KDCRep.init(KDCRep.java:133)

at sun.security.krb5.internal.TGSRep.init(TGSRep.java:58)

at sun.security.krb5.internal.TGSRep.<init>(TGSRep.java:53)

at sun.security.krb5.KrbTgsRep.<init>(KrbTgsRep.java:46)

... 29 more

performJndiOperation: Failed. Failed: got Naming exception :javax.naming.AuthenticationException

STATUS:Failed.Failed: got Naming exception :javax.naming.AuthenticationException

~Rajendra G

[4125 byte] By [grv_jga] at [2007-11-26 12:34:32]
# 1

It seems as though something else has happened as well as restarting your Windows Domain Controller.

First of all check the DC's event logs for any errors, although if you can log in to the domain from the DC itself, another Windows server or Workstation then you can assume the KDC is running.

Did someone else delete your Java server from the Active Directory ? The error message seems to imply that the Java Server no longer has an acount in the AD and hence is unable to encrypt/decrypt Kerberos tickets.

adler_stevena at 2007-7-7 15:50:09 > top of Java-index,Core,Core APIs...