"KrbException: Not closed" when using kerberos authentication for the JBoss EAP datasource

Solution Verified - Updated -

Issue

  • I have configured kerberos authentication for the datasource and getting the following error:
INFO  [stdout] Debug is  true storeKey false useTicketCache false useKeyTab true doNotPrompt true ticketCache is null isInitiator true KeyTab is /path/to/MyKeytab.keytab refreshKrb5Config is true principal is HTTP/host@MY.DOMAIN tryFirstPass is false useFirstPass is false storePass is false clearPass is false
TRACE [org.jboss.security.negotiation.KerberosLoginModule] (MSC service thread 1-4) Initialised wrapped login module.
TRACE [org.jboss.security.negotiation.KerberosLoginModule] (MSC service thread 1-4) addGssCredential=true
TRACE [org.jboss.security.negotiation.KerberosLoginModule] (MSC service thread 1-4) wrapGssCredential=true
TRACE [org.jboss.security.negotiation.KerberosLoginModule] (MSC service thread 1-4) credentialLifetime=1
INFO  [stdout] (MSC service thread 1-4) Refreshing Kerberos configuration
INFO  [stdout] (MSC service thread 1-4) Java config name: /path/to/krb5.conf
INFO  [stdout] (MSC service thread 1-4) Loading krb5 profile at /path/to/krb5.conf
TRACE [org.jboss.security.negotiation.KerberosLoginModule] (MSC service thread 1-4) Calling wrapped login module to abort.
DEBUG [org.jboss.security] (MSC service thread 1-4) PBOX00206: Login failure: javax.security.auth.login.LoginException: Not closed
    at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:530)
    at org.jboss.security.negotiation@3.0.6.Final-redhat-00001//org.jboss.security.negotiation.KerberosLoginModule.login(KerberosLoginModule.java:190)
    at java.base/javax.security.auth.login.LoginContext.invoke(LoginContext.java:747)
...
Caused by: KrbException: Not closed
    at java.security.jgss/sun.security.krb5.Config.parseStanzaTable(Config.java:841)
    at java.security.jgss/sun.security.krb5.Config.<init>(Config.java:213)
    at java.security.jgss/sun.security.krb5.Config.refresh(Config.java:151)
    at jdk.security.auth/com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:528)
    ... 29 more

Environment

  • Red Hat JBoss Enterprise Application Platform (JBoss EAP)
    • 7.4.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content