Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Server not found in Kerberos database (7)

843810Jan 18 2007 — edited Jan 19 2007
Hi,
I am trying to run the GSSClient/GSSServer example in the JAAS/JGSS tutorial.

In the tutorial it says "So for the purposes of trying out this tutorial, you could use your user name as both the client user name and the service principal name. "

As I dont have permissions to make modifications to Active Directory, I thought I could use this to get away from having to create a SPN. So I am using my username for both the client user and the SPN.

When the GSSClient tries to establish a context with the server, it fails because it cant find the server in the kerberos database. But I am using my user name ffor server principal and simple JAAS authentication succeeds with my username so why cant GSSClient find it
when trying to establish a context ?

Any clues would be greatly appreciated.

Thanks !

Here is the stack trace ..

KrbException: Identifier doesn't match expected value (906)
at sun.security.krb5.internal.af.a(DashoA6275:134)
at sun.security.krb5.internal.ae.a(DashoA6275:63)
at sun.security.krb5.internal.ae.<init>(DashoA6275:58)
at sun.security.krb5.KrbTgsRep.<init>(DashoA6275:49)
at sun.security.krb5.KrbTgsReq.getReply(DashoA6275:222)
at sun.security.krb5.internal.az.a(DashoA6275:299)
at sun.security.krb5.internal.az.a(DashoA6275:111)
at sun.security.krb5.Credentials.acquireServiceCreds(DashoA6275:495)
at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:580)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:213)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
at GssClient$GssClientAction.run(GssClient.java:170)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:379)
at Jaas.loginAndAction(Jaas.java:94)
at GssClient.main(GssClient.java:97)
KrbException: Server not found in Kerberos database (7)
at sun.security.krb5.KrbTgsRep.<init>(DashoA6275:64)
at sun.security.krb5.KrbTgsReq.getReply(DashoA6275:222)
at sun.security.krb5.internal.az.a(DashoA6275:299)
at sun.security.krb5.internal.az.a(DashoA6275:111)
at sun.security.krb5.Credentials.acquireServiceCreds(DashoA6275:495)
at sun.security.jgss.krb5.Krb5Context.initSecContext(Krb5Context.java:580)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:213)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
at GssClient$GssClientAction.run(GssClient.java:170)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:379)
at Jaas.loginAndAction(Jaas.java:94)
at GssClient.main(GssClient.java:97)
Caused by: KrbException: Identifier doesn't match expected value (906)
at sun.security.krb5.internal.af.a(DashoA6275:134)
at sun.security.krb5.internal.ae.a(DashoA6275:63)
at sun.security.krb5.internal.ae.<init>(DashoA6275:58)
at sun.security.krb5.KrbTgsRep.<init>(DashoA6275:49)
... 12 more
java.security.PrivilegedActionException: GSSException: No valid credentials provided (Mechanism level: Server not found in Kerberos database (7))
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:379)
at Jaas.loginAndAction(Jaas.java:94)
at GssClient.main(GssClient.java:97)
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:665)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:213)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:158)
at GssClient$GssClientAction.run(GssClient.java:170)
... 4 more
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2007
Added on Jan 18 2007
1 comment
5,960 views