Problem setting the JMS jboss module in cluster
a_torres Oct 4, 2011 9:27 AMHi Jboss community,
I'm trying to set up a JMS cluster in jboss and, I'm afraid, I can't. I run the example of the hornetq standalone server and it works just fine but translating it to standalone.xml conf just don't work: no UDP port binding in the broadcast port. No error message in the server.log.
This is the example in the hornetq standalone server:
<configuration xmlns="urn:hornetq"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">
<clustered>true</clustered>
<!-- Connectors -->
<connectors>
<connector name="netty-connector">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class>
<param key="port" value="5445"/>
</connector>
</connectors>
<!-- Acceptors -->
<acceptors>
<acceptor name="netty-acceptor">
<factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
<param key="port" value="5445"/>
</acceptor>
</acceptors>
<!-- Clustering configuration -->
<broadcast-groups>
<broadcast-group name="my-broadcast-group">
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<broadcast-period>100</broadcast-period>
<connector-ref>netty-connector</connector-ref>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="my-discovery-group">
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<refresh-timeout>10000</refresh-timeout>
</discovery-group>
</discovery-groups>
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<connector-ref>netty-connector</connector-ref>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>true</forward-when-no-consumers>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="my-discovery-group"/>
</cluster-connection>
</cluster-connections>
<!-- Other config -->
<security-settings>
<!--security for example queue-->
<security-setting match="jms.queue.exampleQueue">
<permission type="createDurableQueue" roles="guest"/>
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings>
</configuration>
I translated it to:
<subsystem xmlns="urn:jboss:domain:messaging:1.0">
<clustered>true</clustered>
<acceptors>
<netty-acceptor name="netty" socket-binding="messaging"/>
</acceptors>
<connectors>
<netty-connector name="netty" socket-binding="messaging"/>
</connectors>
<broadcast-groups>
<broadcast-group name="my-broadcast-group">
<local-bind-port>54321</local-bind-port>
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<broadcast-period>1000</broadcast-period>
<connector-ref>netty</connector-ref>
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="my-discovery-group">
<group-address>231.7.7.7</group-address>
<group-port>9876</group-port>
<refresh-timeout>10000</refresh-timeout>
</discovery-group>
</discovery-groups>
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<connector-ref>netty</connector-ref>
<retry-interval>500</retry-interval>
<use-duplicate-detection>true</use-duplicate-detection>
<forward-when-no-consumers>true</forward-when-no-consumers>
<max-hops>1</max-hops>
<discovery-group-ref discovery-group-name="my-discovery-group"/>
</cluster-connection>
</cluster-connections>
<security-settings>
<!--security for example queue-->
<security-setting match="jms.queue.exampleQueue">
<permission type="createDurableQueue" roles="guest"/>
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings>
<jms-connection-factories>
<connection-factory name="ConnectionFactory">
<connectors>
<connector-ref connector-name="netty"/>
</connectors>
<entries>
<entry name="ConnectionFactory"/>
</entries>
</connection-factory>
</jms-connection-factories>
<jms-destinations>
<jms-queue name="testQueue">
<entry name="queue/test"/>
</jms-queue>
</jms-destinations>
</subsystem>
in the standalone.xml file.
The server log is:
Calling C:\HP\jboss\bin\standalone.conf.bat
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\HP\jboss
JAVA: C:\Java\jdk1.6.0_23\bin\java
JAVA_OPTS: -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -server -Xdebug -Xrunjdwp:transport=dt_socket,address=8989,server=y,suspend=n
===============================================================================
Listening for transport dt_socket at address: 8989
15:24:52,154 INFO [org.jboss.modules] JBoss Modules version 1.0.2.GA
15:24:52,419 INFO [org.jboss.msc] JBoss MSC version 1.0.1.GA
15:24:52,482 INFO [org.jboss.as] JBoss AS 7.0.2.Final "Arc" starting
15:24:54,607 WARN [org.jboss.as] No security realm defined for native management service, all access will be unrestricted.
15:24:55,263 INFO [org.jboss.as] creating http management service using network interface (management) port (9990)
15:24:55,279 WARN [org.jboss.as] No security realm defined for http management service, all access will be unrestricted.
15:24:55,310 INFO [org.jboss.as.logging] Removing bootstrap log handlers
15:24:55,701 INFO [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)
15:24:55,966 INFO [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.
15:24:56,123 INFO [org.jboss.as.jacorb] (Controller Boot Thread) Activating JacORB Subsystem
15:24:56,701 INFO [org.jboss.as.naming] (Controller Boot Thread) JBAS011800: Activating Naming Subsystem
15:24:56,748 INFO [org.jboss.as.naming] (MSC service thread 1-4) JBAS011802: Starting Naming Service
15:24:56,779 INFO [org.jboss.as.osgi] (Controller Boot Thread) JBAS011910: Activating OSGi Subsystem
15:24:56,935 INFO [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem
15:24:57,013 INFO [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 3.2.0.Beta2
15:24:57,404 INFO [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.0.Beta3
15:24:57,732 INFO [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.0.Beta3
15:25:01,029 INFO [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-1) La biblioteca nativa de Apache Tomcat basada en ARP que permite un rendimiento ¾ptimo en entornos de desarrollo no ha sido hallada en java.library.path: C:\Java\jdk1.6.0_23\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\app\cerdeno\product\11.2.0\client_1;C:\oracle\product\10.2.0\db_1\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ActivIdentity\ActivClient\;C:\Program Files\TortoiseSVN\bin;C:\Java\jdk1.6.0_23\bin;C:\ant\bin;C:\Program Files\Apache Software Foundation\Maven 1.0.2\bin;C:\Program Files\cvsnt;C:\HP\OpenView\ServiceActivator\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Common Files\Hewlett-Packard\HPOvLIC\lib;C:\Program Files\CVSNT\
15:25:01,029 INFO [org.jboss.as.webservices] (Controller Boot Thread) Activating WebServices Extension
15:25:01,857 INFO [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem
15:25:02,232 INFO [org.jboss.as.remoting] (MSC service thread 1-1) Listening on /127.0.0.1:9999
15:25:04,248 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Arrancando Coyote HTTP/1.1 en puerto http-localhost-127.0.0.1-8080
15:25:05,357 INFO [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-2) Starting remote JMX connector
15:25:06,248 WARN [jacorb.codeset] (MSC service thread 1-1) Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1
15:25:06,779 INFO [org.jboss.as.jacorb] (MSC service thread 1-1) CORBA ORB Service Started
15:25:07,560 INFO [org.jboss.as.connector] (MSC service thread 1-1) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)
15:25:08,139 INFO [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.0.Beta3
15:25:09,811 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:/hpsa/jdbc/inventoryDB]
15:25:09,826 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:/hpsa/jdbc/defaultDB]
15:25:09,811 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) Bound data source [java:/hpsa/jdbc/uiDB]
15:25:09,826 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:/hpsa/jdbc/mwfmDB]
15:25:09,826 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:/hpsa/jdbc/resmgrDB]
15:25:09,826 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:/hpsa/jdbc/serviceDB]
15:25:10,467 INFO [org.jboss.as.jacorb] (MSC service thread 1-2) CORBA Naming Service Started
15:25:10,670 WARN [org.jboss.as.messaging] (MSC service thread 1-1) AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
15:25:11,186 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=C:\HP\jboss\standalone\data\messagingjournal,bindingsDirectory=C:\HP\jboss\standalone\data\messagingbindings,largeMessagesDirectory=C:\HP\jboss\standalone\data\messaginglargemessages,pagingDirectory=C:\HP\jboss\standalone\data\messagingpaging)
15:25:11,201 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Waiting to obtain live lock
15:25:11,498 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager] (MSC service thread 1-3) Using NIO Journal
15:25:11,545 ADVERTENCIA [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
15:25:11,764 INFO [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-3) Waiting to obtain live lock
15:25:11,764 INFO [org.hornetq.core.server.impl.FileLockNodeManager] (MSC service thread 1-3) Live Server Obtained live lock
15:25:14,623 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-3) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} localhost:5445 for CORE protocol
15:25:14,623 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Server is now live
15:25:14,623 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) HornetQ Server version 2.2.7.Final (HQ_2_2_7_FINAL_AS7, 121) [56caffdb-e840-11e0-87a3-005056c00008] started
15:25:14,639 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) trying to deploy queue jms.queue.testQueue
15:25:14,811 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-1) Bound messaging object to jndi name java:/queue/test
15:25:14,826 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-2) Bound messaging object to jndi name java:/ConnectionFactory
15:25:14,842 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-4) trying to deploy queue jms.queue.OVSAQueue
15:25:14,842 INFO [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-4) Bound messaging object to jndi name java:/queue/OVSAQueue
15:25:14,983 INFO [org.jboss.as.deployment] (MSC service thread 1-1) Started FileSystemDeploymentService for directory C:\HP\jboss\standalone\deployments
15:25:14,983 INFO [org.jboss.as.deployment] (DeploymentScanner-threads - 1) Found hpsa.ear in deployment directory. To trigger deployment create a file called hpsa.ear.dodeploy
15:25:15,233 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.2.Final "Arc" started in 23360ms - Started 147 of 206 services (59 services are passive or on-demand)
Anyone knows what's happening?
Regards,
Alvaro.