-
1. Re: static-connectors does not work in hornetq-configuration.xml
jbertram Aug 9, 2013 6:46 PM (in response to ryuyan)It's not complaining that you can't use <static-connectors>. It is complaining that you don't have <connector-ref>. This element is mandatory. See http://docs.jboss.org/hornetq/2.3.0.Final/docs/user-manual/html/clusters.html#clusters.cluster-connections.
-
2. Re: static-connectors does not work in hornetq-configuration.xml
ryuyan Aug 9, 2013 7:00 PM (in response to jbertram)If you looked at the attaced configuration, you will see this element.
-
hornetq-configuration.xml 3.5 KB
-
-
3. Re: static-connectors does not work in hornetq-configuration.xml
jbertram Aug 9, 2013 7:20 PM (in response to ryuyan)Yan Liu wrote:
If you looked at the attaced configuration, you will see this element.
Looking in the hornetq-configration.xml I see this for your <cluster-connection>
<cluster-connection name="my-cluster">
<address>jms</address>
<static-connectors>
<connector-ref>netty1</connector-ref>
</static-connectors>
</cluster-connection>
There is a <connector-ref> in the <static-connectors> but not in the <cluster-connection> itself. As I indicated before, this is required. See the documentation I linked before for more information.
-
4. Re: static-connectors does not work in hornetq-configuration.xml
ryuyan Aug 9, 2013 7:50 PM (in response to jbertram)Thanks Justin. This looks working after changing to :
<cluster-connections>
<cluster-connection name="my-cluster">
<address>jms</address>
<connector-ref>netty2</connector-ref>
<static-connectors>
<connector-ref>netty1</connector-ref>
<connector-ref>netty2</connector-ref>
</static-connectors>
</cluster-connection>
</cluster-connections>
But I got another exception from Backup node after shut down live node:
23:47:29,747 WARN [org.hornetq.core.server] HQ222162: Moving data directory ../data/journal to ../data/journal1
23:47:29,868 INFO [org.hornetq.core.server] HQ221012: Using AIO Journal
23:47:29,884 WARN [org.hornetq.core.server] HQ222007: Security risk! HornetQ is running with the default cluster admin user and default password. Please see the HornetQ user guide, cluster chapter, for instructions on how to change this.
23:47:44,424 INFO [org.hornetq.core.server] HQ221109: HornetQ Backup Server version 2.3.0.SNAPSHOT (colonizer, 123) [null] started, waiting live to fail before it gets active
23:47:47,834 INFO [org.hornetq.core.server] HQ221024: Backup server HornetQServerImpl::serverUUID=f37f0884-fbbf-11e2-b40d-95bb6f72bd24 is synchronized with live-server.
23:47:47,845 INFO [org.hornetq.core.server] HQ221031: backup announced
23:47:52,639 WARN [org.hornetq.core.client] HQ212037: Connection failure has been detected: HQ119015: The connection was disconnected because of server shutdown [code=DISCONNECTED]
23:47:52,646 WARN [org.hornetq.core.client] HQ212037: Connection failure has been detected: HQ119015: The connection was disconnected because of server shutdown [code=DISCONNECTED]
23:47:52,698 WARN [org.hornetq.core.client] HQ212037: Connection failure has been detected: HQ119015: The connection was disconnected because of server shutdown [code=DISCONNECTED]
23:47:52,705 INFO [org.hornetq.core.server] HQ221037: HornetQServerImpl::serverUUID=f37f0884-fbbf-11e2-b40d-95bb6f72bd24 to become live
23:47:52,712 WARN [org.hornetq.core.client] HQ212004: Failed to connect to server.
23:47:53,698 INFO [org.hornetq.core.server] HQ221003: trying to deploy queue jms.queue.exampleQueue
23:47:53,752 INFO [org.hornetq.core.server] HQ221003: trying to deploy queue jms.queue.DLQ
23:47:53,772 INFO [org.hornetq.core.server] HQ221003: trying to deploy queue jms.queue.ExpiryQueue
23:47:53,930 INFO [org.hornetq.core.server] HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c 10.9.244.109:5455 for CORE protocol
23:47:53,936 INFO [org.hornetq.core.server] HQ221020: Started Netty Acceptor version 3.6.2.Final-c0d783c 10.9.244.109:5445 for CORE protocol
23:47:53,943 WARN [org.hornetq.core.client] HQ212028: error starting server locator: HornetQException[errorType=ILLEGAL_STATE message=null]
at org.hornetq.core.client.impl.ServerLocatorImpl.initialise(ServerLocatorImpl.java:371) [hornetq-core-client.jar:]
at org.hornetq.core.client.impl.ServerLocatorImpl.start(ServerLocatorImpl.java:566) [hornetq-core-client.jar:]
at org.hornetq.core.client.impl.ServerLocatorImpl$StaticConnector$1.connectionFailed(ServerLocatorImpl.java:1773) [hornetq-core-client.jar:]
at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.callFailureListeners(RemotingConnectionImpl.java:570) [hornetq-core-client.jar:]
at org.hornetq.core.protocol.core.impl.RemotingConnectionImpl.fail(RemotingConnectionImpl.java:341) [hornetq-core-client.jar:]
at org.hornetq.core.client.impl.ClientSessionFactoryImpl$CloseRunnable.run(ClientSessionFactoryImpl.java:1631) [hornetq-core-client.jar:]
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:106) [hornetq-core-client.jar:]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_20]
at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]
Any idea?
-
5. Re: static-connectors does not work in hornetq-configuration.xml
jbertram Aug 9, 2013 8:13 PM (in response to ryuyan)Since you have two acceptors listening on 10.9.244.208 then I assume that's where this particular node is running. Likewise, I assume that 10.9.244.109 is the other node in your cluster. Therefore, you should likely be using this:
<cluster-connection name="my-cluster">
<address>jms</address>
<connetor-ref>netty1</connector-ref>
<static-connectors>
<connector-ref>netty2</connector-ref>
</static-connectors>
</cluster-connection>