2 Replies Latest reply on Jan 3, 2019 10:16 AM by Paul Clarke

    Wildfly 10 AWS using JDBC_PING for JGROUPS

    Paul Clarke Newbie

      Hi All

       

      I am getting this error when shutting down wildfly node on my EC2 instances.  Has anyone else seen this?  Can I ignore?

       

                     <datasource jndi-name="java:jboss/datasources/ClusterDS" pool-name="ClusterDS" enabled="true" use-java-context="true">

                          <connection-url>${ds.jgroups.connection-url}</connection-url>

                          <connection-property name="url">

                              ${ds.jgroups.connection-url}

                          </connection-property>

       

              <subsystem xmlns="urn:jboss:domain:jgroups:4.0">

                  <channels default="ee">

                      <channel name="ee" stack="tcp" cluster="ejb"/>

                  </channels>

                  <stacks>

                      <stack name="tcp">

                          <transport type="TCP" socket-binding="jgroups-tcp"/>

                          <protocol type="TCPGOSSIP">

                          </protocol>

                          <protocol type="org.jgroups.protocols.JDBC_PING">

                              <property name="datasource_jndi_name">

                                  java:jboss/datasources/ClusterDS

                              </property>

                          </protocol>

                          <protocol type="MERGE3"/>

                          <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                          <protocol type="FD"/>

                          <protocol type="VERIFY_SUSPECT"/>

                          <protocol type="pbcast.NAKACK2"/>

                          <protocol type="UNICAST3"/>

                          <protocol type="pbcast.STABLE"/>

                          <protocol type="pbcast.GMS"/>

                          <protocol type="FRAG2"/>

                      </stack>

                  </stacks>

              </subsystem>

       

      2019-01-02 11:06:25,297 ERROR [org.jgroups.protocols.JDBC_PING] (MSC service thread 1-3) JGRP000115: Could not open connection to database: java.sql.SQLException: javax.resource.ResourceException: IJ000470: You are trying to use a connection factory that has been shut down: java:jboss/datasources/ClusterDS

              at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:146)

              at org.jboss.as.connector.subsystems.datasources.WildFlyDataSource.getConnection(WildFlyDataSource.java:66)

              at org.jgroups.protocols.JDBC_PING.getConnection(JDBC_PING.java:348)

              at org.jgroups.protocols.JDBC_PING.delete(JDBC_PING.java:379)

              at org.jgroups.protocols.JDBC_PING.deleteSelf(JDBC_PING.java:395)

              at org.jgroups.protocols.JDBC_PING.stop(JDBC_PING.java:144)

              at org.jgroups.stack.ProtocolStack.stopStack(ProtocolStack.java:1016)

              at org.jgroups.JChannel.stopStack(JChannel.java:1001)

              at org.jgroups.JChannel.disconnect(JChannel.java:373)

              at org.wildfly.clustering.jgroups.spi.service.ChannelConnectorBuilder.stop(ChannelConnectorBuilder.java:103)

              at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2056)

              at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2017)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java)

              at java.lang.Thread.run(Thread.java:748)

      Caused by: javax.resource.ResourceException: IJ000470: You are trying to use a connection factory that has been shut down: java:jboss/datasources/ClusterDS

              at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:735)

              at org.jboss.jca.adapters.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:138)

              ... 14 more

        • 1. Re: Wildfly 10 AWS using JDBC_PING for JGROUPS
          Paul Ferraro Master

          Use this configuration instead:

          <protocol type="JDBC_PING" data-source="ClusterDS"/>

           

          This establishes a service dependency between the protocol and the DataSource and prevents problems like you've described.

          • 2. Re: Wildfly 10 AWS using JDBC_PING for JGROUPS
            Paul Clarke Newbie

            Hi Paul

             

            my config is now

             

                    <subsystem xmlns="urn:jboss:domain:jgroups:4.0">

                        <channels default="ee">

                            <channel name="ee" stack="tcp" cluster="ejb"/>

                        </channels>

                        <stacks>

                            <stack name="tcp">

                                <transport type="TCP" socket-binding="jgroups-tcp"/>

                                <protocol type="JDBC_PING" data-source="ClusterDS"/>

                                <protocol type="MERGE3"/>

                                <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                                <protocol type="FD"/>

                                <protocol type="VERIFY_SUSPECT"/>

                                <protocol type="pbcast.NAKACK2"/>

                                <protocol type="UNICAST3"/>

                                <protocol type="pbcast.STABLE"/>

                                <protocol type="pbcast.GMS"/>

                                <protocol type="FRAG2"/>

                            </stack>

                        </stacks>

                    </subsystem>