HornetQ: unable to start cluster connection
menal05 Feb 25, 2016 6:54 AMI'm trying to set up a clustered Wildfly 8.2.1 installation (2 nodes) with high availability, based on Unicast and file Replication. HTTP is the protocol for the transfer
When the Wildfly application servers are started, I observed the following warning message with regards to the broadcast:
2016-02-22 12:24:27,144 WARN [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ222116: unable to start broadcast group bg-group1: java.lang.IllegalStateException: channel is closed
at org.jgroups.JChannel.checkClosed(JChannel.java:902) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.jgroups.JChannel._preConnect(JChannel.java:522) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.jgroups.JChannel.connect(JChannel.java:284) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.jgroups.JChannel.connect(JChannel.java:275) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint$JChannelWrapper.connect(JGroupsBroadcastGroupConfiguration.java:331) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint.internalOpen(JGroupsBroadcastGroupConfiguration.java:218) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint.openBroadcaster(JGroupsBroadcastGroupConfiguration.java:186) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.core.server.cluster.impl.BroadcastGroupImpl.start(BroadcastGroupImpl.java:107) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.cluster.ClusterManager.start(ClusterManager.java:244) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1751) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.access$1400(HornetQServerImpl.java:171) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2725) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:451) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:488) [hornetq-jms-server-2.4.5.Final.jar:]
at org.jboss.as.messaging.jms.JMSService.doStart(JMSService.java:169) [wildfly-messaging-8.2.1.Final.jar:8.2.1.Final]
at org.jboss.as.messaging.jms.JMSService.access$000(JMSService.java:63) [wildfly-messaging-8.2.1.Final.jar:8.2.1.Final]
at org.jboss.as.messaging.jms.JMSService$1.run(JMSService.java:96) [wildfly-messaging-8.2.1.Final.jar:8.2.1.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
2016-02-22 12:24:27,175 WARN [org.hornetq.core.server] (ServerService Thread Pool -- 61) HQ222117: unable to start cluster connection my-cluster: HornetQInternalErrorException[errorType=INTERNAL_ERROR message=HQ119004: Failed to initialise session factory]
at org.hornetq.core.client.impl.ServerLocatorImpl.initialise(ServerLocatorImpl.java:390) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.core.client.impl.ServerLocatorImpl.start(ServerLocatorImpl.java:619) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.core.server.cluster.impl.ClusterConnectionImpl.activate(ClusterConnectionImpl.java:648) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.cluster.impl.ClusterConnectionImpl.start(ClusterConnectionImpl.java:385) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.cluster.ClusterManager.start(ClusterManager.java:256) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.initialisePart2(HornetQServerImpl.java:1751) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.access$1400(HornetQServerImpl.java:171) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl$SharedNothingLiveActivation.run(HornetQServerImpl.java:2725) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:451) [hornetq-server-2.4.5.Final.jar:]
at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:488) [hornetq-jms-server-2.4.5.Final.jar:]
at org.jboss.as.messaging.jms.JMSService.doStart(JMSService.java:169) [wildfly-messaging-8.2.1.Final.jar:8.2.1.Final]
at org.jboss.as.messaging.jms.JMSService.access$000(JMSService.java:63) [wildfly-messaging-8.2.1.Final.jar:8.2.1.Final]
at org.jboss.as.messaging.jms.JMSService$1.run(JMSService.java:96) [wildfly-messaging-8.2.1.Final.jar:8.2.1.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_66]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final]
Caused by: java.lang.IllegalStateException: channel is closed
at org.jgroups.JChannel.checkClosed(JChannel.java:902) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.jgroups.JChannel._preConnect(JChannel.java:522) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.jgroups.JChannel.connect(JChannel.java:284) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.jgroups.JChannel.connect(JChannel.java:275) [jgroups-3.4.5.Final.jar:3.4.5.Final]
at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint$JChannelWrapper.connect(JGroupsBroadcastGroupConfiguration.java:331) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint.internalOpen(JGroupsBroadcastGroupConfiguration.java:218) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.api.core.JGroupsBroadcastGroupConfiguration$JGroupsBroadcastEndpoint.openClient(JGroupsBroadcastGroupConfiguration.java:177) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.core.cluster.DiscoveryGroup.start(DiscoveryGroup.java:105) [hornetq-core-client-2.4.5.Final.jar:]
at org.hornetq.core.client.impl.ServerLocatorImpl.initialise(ServerLocatorImpl.java:384) [hornetq-core-client-2.4.5.Final.jar:]
... 18 more
Here is the part of the standalone.bat file where the nodes of the cluster are defined
First node:
set "BIND_ADDRESS=10.60.185.28"
set "NODE_NAME=iamnode1"
set "JGROUPS_BIND_ADDRESS=10.60.185.28"
set "JGROUPS_INITIAL_HOSTS=10.60.185.28[7600],10.60.185.29[7600]"
set "IDM_OPTS=-Dnete.j2ee.vendor=jboss"
set "IDM_OPTS=%IDM_OPTS% -Djava.net.preferIPv4Stack=true"
set "SERVER_OPTS=%SERVER_OPTS% -c %STANDALONE_CONFIGURATION% -b %BIND_ADDRESS% -Djgroups.tcpping.initial_hosts=%JGROUPS_INITIAL_HOSTS% -Djboss.node.name=%NODE_NAME% -Djgroups.bind_addr=%JGROUPS_BIND_ADDRESS% %IDM_OPTS%"
Second node:
set "BIND_ADDRESS=10.60.185.29"
set "NODE_NAME=iamnode2"
set "JGROUPS_BIND_ADDRESS=10.60.185.29"
set "JGROUPS_INITIAL_HOSTS=10.60.185.29[7600],10.60.185.28[7600]"
set "IDM_OPTS=-Dnete.j2ee.vendor=jboss"
set "IDM_OPTS=%IDM_OPTS% -Djava.net.preferIPv4Stack=true"
set "SERVER_OPTS=%SERVER_OPTS% -c %STANDALONE_CONFIGURATION% -b %BIND_ADDRESS% -Djgroups.tcpping.initial_hosts=%JGROUPS_INITIAL_HOSTS% -Djboss.node.name=%NODE_NAME% -Djgroups.bind_addr=%JGROUPS_BIND_ADDRESS% %IDM_OPTS%"
I also noticed that setting up the cluster (Unicast, replication) with a single node ends up in the same error.
Please find attached the standalone-full-ha.xml files for both nodes of the cluster
Thanks in advance,
Alessandro