1 Reply Latest reply on Jul 16, 2019 6:26 AM by jaikiran

    Wildfly data source with Kerberos security domain and Impala JDBC driver can't recycle connections correctly


      In our product, we use Wildfly 10.1.0 and configure a data source with Kerberos security domain and Impala JDBC driver to connect to a Kerberos(1.15.1-19) enabled Impalad instance(CDH 5.16.1). In basic test, it can connect successfully. But after navigating from pages to pages for several times, it will hang without response.


      In Wildfly console, when monitoring the data source statistics, I can see that the number of active conntections is always increasing and can exceed the configured max number of connections 28. When it reaches 64(the limited service thread number of Impala), the system will hang.


      It seems like a connection leak. But if I remove the Kerberos security domain configuration and connect to an unsecured impala instance, it works well(no code changes). So it has nothing to do with our codes. From debug logs, I can see that when with security domain is configured, the pool strategy is PoolBySubject, while without security domain, the pool strategy is OnePool. Does it mean there's some problem with PoolBySuject? Is any existing issue with PoolBySuject? And is there some version to fix it?


      My data source configuration of wildfly is as follows.


      <security-domain name="kerberos-impala">


      <login-module code="org.jboss.security.negotiation.KerberosLoginModule" flag="required" module="org.jboss.security.negotiation" >

      <module-option name="storeKey" value="true"/>

      <module-option name="useKeyTab" value="true"/>

      <module-option name="keyTab" value="/opt/ossa_st/ossa.keytab"/>

      <module-option name="principal" value="ossa/osscdh01.gre.hpecorp.net@OSSCDH01.GRE.HPECORP.NET"/>

      <module-option name="useTicketCache" value="false"/>

      <module-option name="debug" value="true"/>

      <module-option name="refreshKrb5Config" value="true"/>

      <module-option name="isInitiator" value="true"/>

      <module-option name="doNotPrompt" value="true"/>

      <module-option name="addGSSCredential" value="true"/>





      ... ...


      <datasource jta="false" jndi-name="java:jboss/datasources/OssaFaultDS" pool-name="OssaFaultDS" enabled="true" statistics-enabled="true">










      <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>










      <driver name="impala" module="com.cloudera.impala">