Forum Stats

  • 3,824,845 Users
  • 2,260,430 Discussions


Kerberos works fine in the beginning but later gives "KrbException: Cannot locate default realm" err

user1396641 Member Posts: 1
edited Nov 5, 2015 8:36PM in Kerberos & Java GSS (JGSS)


So we have this application that runs on jboss and java 7u80.  It logs into kerberos to connect to hdfs name node.

The code is like is this:

System.setProperty("", "KERBEROS.COM");
System.setProperty("", "");
conf.set("", "Kerberos");

There is no krb5.conf file on the jboss server.

This works fine.  But if we don't make a call for a while, day or so, we get this error:

Caused by: java.lang.reflect.InvocationTargetException

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_80]

  at sun.reflect.NativeMethodAccessorImpl.invoke( [rt.jar:1.7.0_80]

  at sun.reflect.DelegatingMethodAccessorImpl.invoke( [rt.jar:1.7.0_80]

  at java.lang.reflect.Method.invoke( [rt.jar:1.7.0_80]

  at [hadoop-auth-2.7.1.jar:]

  at [hadoop-common-2.7.1.jar:]

  ... 47 more

Caused by: KrbException: Cannot locate default realm

  at [rt.jar:1.7.0_80]

  ... 53 more

Caused by: KrbException: Generic error (description in e-text) (60) - Unable to locate Kerberos realm

  at [rt.jar:1.7.0_80]

  at [rt.jar:1.7.0_80]

  ... 53 more

Any idea why it would stop working?

Also I have been looking for the source code for sun. package in the java sdk file and it is not there. I know that it used to be in jdk 6 but all of a sudden I can't find it in jdk 7 and later.  What happened? 


This discussion has been closed.