Sorry, maybe I left off some details about what the shell scripts do -
run-clustered.sh starts builds the client (hornetq-test/jmstest), then starts the first broker (hornetq-test/mb1), then the second one (hornetq-test/mb2), then starts the client. Here's my shell output from executing the above instructions to the 't'.
craig@server:/temp$ wget https://community.jboss.org/servlet/JiveServlet/download/733095-56969/hornetq-test.tgz
--2012-04-30 18:30:40-- https://community.jboss.org/servlet/JiveServlet/download/733095-56969/hornetq-test.tgz
Resolving community.jboss.org... 209.132.182.48
Connecting to community.jboss.org|209.132.182.48|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12151606 (12M) [application/gzip]
Saving to: `hornetq-test.tgz'
100%[============================================================================================>] 12,151,606 2.19M/s in 5.0s
2012-04-30 18:30:45 (2.34 MB/s) - `hornetq-test.tgz' saved [12151606/12151606]
craig@server:/temp$ tar -xzf hornetq-test.tgz
craig@server:/temp$ cd hornetq-test/
craig@server:/temp/hornetq-test$ ./run-clustered.sh
Buildfile: /temp/hornetq-test/jmstest/build.xml
init:
[mkdir] Created dir: /temp/hornetq-test/jmstest/target
compile:
[javac] Compiling 2 source files to /temp/hornetq-test/jmstest/target
package:
[jar] Building jar: /temp/hornetq-test/jmstest/jmstest.jar
BUILD SUCCESSFUL
Total time: 1 second
***********************************************************************************
java
-XX:-HeapDumpOnOutOfMemoryError
-Xms2048M -Xmx4096M
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=6003 -Djava.rmi.server.hostname=localhost -Dlocal.ip=localhost -Dlocal.port=5444 -Dcluster.user=root -Dcluster.password=root -Djournals.dir=data/journal -Djournals.num=10 -Dmessage.memory.max=10485760 -Dotherserver.ip=localhost -Dotherserver.port=5445 -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dhornetq.config.dir=cfg -Djava.util.logging.config.file=cfg/logging.properties -Djava.library.path=../lib -classpath /temp/hornetq-test/mb1/../lib/xml-apis-2.9.1.jar:/temp/hornetq-test/mb1/../lib/xercesImpl-2.9.1.jar:/temp/hornetq-test/mb1/../lib/spring-webmvc-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-web-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-tx-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-test-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-oxm-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-jms-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-expression-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-core-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-context-support-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-context-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-beans-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-asm-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-aop-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/netty-3.2.3.Final.jar:/temp/hornetq-test/mb1/../lib/log4j-1.2.16.jar:/temp/hornetq-test/mb1/../lib/junit-4.8.2.jar:/temp/hornetq-test/mb1/../lib/jnpserver-4.2.3.GA.jar:/temp/hornetq-test/mb1/../lib/jbossxb-2.0.1.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-reflect-2.0.2.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-mdr-2.0.2.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-logging-spi-2.0.5.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-kernel-2.0.9.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-jms-api-1.1.0.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-dependency-2.0.9.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-common-core-2.2.14.GA.jar:/temp/hornetq-test/mb1/../lib/jaxb-api-2.1.9.jar:/temp/hornetq-test/mb1/../lib/hornetq-spring-integration-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-logging-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-jms-client-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-jms-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-jboss-as-integration-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-core-client-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-core-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-bootstrap-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/dtdparser121-1.2.1.jar:/temp/hornetq-test/mb1/../lib/commons-logging-1.1.1.jar:/temp/hornetq-test/mb1/../lib/commons-lang-2.6.jar:/temp/hornetq-test/mb1/../lib/commons-io-1.3.2.jar:/temp/hornetq-test/mb1/../lib/commons-httpclient-3.0.1.jar:/temp/hornetq-test/mb1/../lib/commons-digester-1.8.1.jar:/temp/hornetq-test/mb1/../lib/commons-configuration-1.7.jar:/temp/hornetq-test/mb1/../lib/commons-collections-3.2.1.jar:/temp/hornetq-test/mb1/../lib/commons-codec-1.5.jar:/temp/hornetq-test/mb1/../lib/commons-beanutils-1.8.3.jar:/temp/hornetq-test/mb1/../lib/aopalliance-1.0.jar:/temp/hornetq-test/mb1/../lib/activation-1.1.1.jar:cfg:/temp/hornetq-test/mb1/schemas/ org.hornetq.integration.bootstrap.HornetQBootstrapServer hornetq-beans.xml
***********************************************************************************
***********************************************************************************
java
-XX:-HeapDumpOnOutOfMemoryError
-Xms2048M -Xmx4096M
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=6004 -Djava.rmi.server.hostname=localhost -Dlocal.ip=localhost -Dlocal.port=5445 -Dcluster.user=root -Dcluster.password=root -Djournals.dir=data/journal -Djournals.num=10 -Dmessage.memory.max=10485760 -Dotherserver.ip=localhost -Dotherserver.port=5444 -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dhornetq.config.dir=cfg -Djava.util.logging.config.file=cfg/logging.properties -Djava.library.path=../lib -classpath /temp/hornetq-test/mb2/../lib/xml-apis-2.9.1.jar:/temp/hornetq-test/mb2/../lib/xercesImpl-2.9.1.jar:/temp/hornetq-test/mb2/../lib/spring-webmvc-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-web-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-tx-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-test-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-oxm-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-jms-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-expression-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-core-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-context-support-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-context-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-beans-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-asm-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/spring-aop-3.0.3.RELEASE.jar:/temp/hornetq-test/mb2/../lib/netty-3.2.3.Final.jar:/temp/hornetq-test/mb2/../lib/log4j-1.2.16.jar:/temp/hornetq-test/mb2/../lib/junit-4.8.2.jar:/temp/hornetq-test/mb2/../lib/jnpserver-4.2.3.GA.jar:/temp/hornetq-test/mb2/../lib/jbossxb-2.0.1.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-reflect-2.0.2.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-mdr-2.0.2.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-logging-spi-2.0.5.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-kernel-2.0.9.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-jms-api-1.1.0.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-dependency-2.0.9.GA.jar:/temp/hornetq-test/mb2/../lib/jboss-common-core-2.2.14.GA.jar:/temp/hornetq-test/mb2/../lib/jaxb-api-2.1.9.jar:/temp/hornetq-test/mb2/../lib/hornetq-spring-integration-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-logging-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-jms-client-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-jms-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-jboss-as-integration-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-core-client-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-core-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/hornetq-bootstrap-2.2.16.Final.jar:/temp/hornetq-test/mb2/../lib/dtdparser121-1.2.1.jar:/temp/hornetq-test/mb2/../lib/commons-logging-1.1.1.jar:/temp/hornetq-test/mb2/../lib/commons-lang-2.6.jar:/temp/hornetq-test/mb2/../lib/commons-io-1.3.2.jar:/temp/hornetq-test/mb2/../lib/commons-httpclient-3.0.1.jar:/temp/hornetq-test/mb2/../lib/commons-digester-1.8.1.jar:/temp/hornetq-test/mb2/../lib/commons-configuration-1.7.jar:/temp/hornetq-test/mb2/../lib/commons-collections-3.2.1.jar:/temp/hornetq-test/mb2/../lib/commons-codec-1.5.jar:/temp/hornetq-test/mb2/../lib/commons-beanutils-1.8.3.jar:/temp/hornetq-test/mb2/../lib/aopalliance-1.0.jar:/temp/hornetq-test/mb2/../lib/activation-1.1.1.jar:cfg:/temp/hornetq-test/mb2/schemas/ org.hornetq.integration.bootstrap.HornetQBootstrapServer hornetq-beans.xml
***********************************************************************************
0 INFO [main] org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@42b988a6: startup date [Mon Apr 30 18:31:02 PDT 2012]; root of context hierarchy
31 INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:cfg/senderContext.xml]
263 INFO [main] org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7b2884e0: defining beans [transportConfig1,transportConfig2,connectionFactory,connectionFactoryAdapter,cachingConnectionFactory,jmsTemplate,testQueue,jmsSender]; root of factory hierarchy
349 INFO [main] com.myco.jmstest.SenderMain - Sending 1000000 messages
440 INFO [JmsSender-7] org.springframework.jms.connection.CachingConnectionFactory - Established shared JMS Connection: org.hornetq.jms.client.HornetQConnection@1167e3a5
502 INFO [JmsSender-3] com.myco.jmstest.JmsSender - Messages sent: 1
5503 INFO [JmsSender-0] com.myco.jmstest.JmsSender - Messages sent: 21633
10504 INFO [JmsSender-18] com.myco.jmstest.JmsSender - Messages sent: 36251
15505 INFO [JmsSender-5] com.myco.jmstest.JmsSender - Messages sent: 34185
20506 INFO [JmsSender-10] com.myco.jmstest.JmsSender - Messages sent: 27839
25507 INFO [JmsSender-3] com.myco.jmstest.JmsSender - Messages sent: 31964
30546 INFO [JmsSender-13] com.myco.jmstest.JmsSender - Messages sent: 25929
^Ccraig@server:/temp/hornetq-test$
Berfore ctrl+c above, I was executing this in another shell
craig@server:/var/www/jquery$ cd /temp/hornetq-test/
craig@server:/temp/hornetq-test$ watch -n 1 du -ch mb*
After running, I want to shutdown the brokers and clean up.
craig@server:/temp/hornetq-test$ ./stop.sh
craig@server:/temp/hornetq-test$ ./clean.sh
The run-standalone.sh does everything the run-clustered.sh script does, it just doesn't start the second broker. Again, here's my shell output for that -
craig@server:/temp/hornetq-test$ ./run-standalone.sh
Buildfile: /temp/hornetq-test/jmstest/build.xml
init:
[mkdir] Created dir: /temp/hornetq-test/jmstest/target
compile:
[javac] Compiling 2 source files to /temp/hornetq-test/jmstest/target
package:
[jar] Building jar: /temp/hornetq-test/jmstest/jmstest.jar
BUILD SUCCESSFUL
Total time: 1 second
***********************************************************************************
java
-XX:-HeapDumpOnOutOfMemoryError
-Xms2048M -Xmx4096M
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=6003 -Djava.rmi.server.hostname=localhost -Dlocal.ip=localhost -Dlocal.port=5444 -Dcluster.user=root -Dcluster.password=root -Djournals.dir=data/journal -Djournals.num=10 -Dmessage.memory.max=10485760 -Dotherserver.ip=localhost -Dotherserver.port=5445 -XX:+UseParallelGC -XX:+AggressiveOpts -XX:+UseFastAccessorMethods -Dhornetq.config.dir=cfg -Djava.util.logging.config.file=cfg/logging.properties -Djava.library.path=../lib -classpath /temp/hornetq-test/mb1/../lib/xml-apis-2.9.1.jar:/temp/hornetq-test/mb1/../lib/xercesImpl-2.9.1.jar:/temp/hornetq-test/mb1/../lib/spring-webmvc-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-web-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-tx-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-test-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-oxm-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-jms-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-expression-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-core-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-context-support-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-context-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-beans-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-asm-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/spring-aop-3.0.3.RELEASE.jar:/temp/hornetq-test/mb1/../lib/netty-3.2.3.Final.jar:/temp/hornetq-test/mb1/../lib/log4j-1.2.16.jar:/temp/hornetq-test/mb1/../lib/junit-4.8.2.jar:/temp/hornetq-test/mb1/../lib/jnpserver-4.2.3.GA.jar:/temp/hornetq-test/mb1/../lib/jbossxb-2.0.1.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-reflect-2.0.2.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-mdr-2.0.2.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-logging-spi-2.0.5.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-kernel-2.0.9.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-jms-api-1.1.0.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-dependency-2.0.9.GA.jar:/temp/hornetq-test/mb1/../lib/jboss-common-core-2.2.14.GA.jar:/temp/hornetq-test/mb1/../lib/jaxb-api-2.1.9.jar:/temp/hornetq-test/mb1/../lib/hornetq-spring-integration-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-logging-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-jms-client-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-jms-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-jboss-as-integration-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-core-client-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-core-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/hornetq-bootstrap-2.2.16.Final.jar:/temp/hornetq-test/mb1/../lib/dtdparser121-1.2.1.jar:/temp/hornetq-test/mb1/../lib/commons-logging-1.1.1.jar:/temp/hornetq-test/mb1/../lib/commons-lang-2.6.jar:/temp/hornetq-test/mb1/../lib/commons-io-1.3.2.jar:/temp/hornetq-test/mb1/../lib/commons-httpclient-3.0.1.jar:/temp/hornetq-test/mb1/../lib/commons-digester-1.8.1.jar:/temp/hornetq-test/mb1/../lib/commons-configuration-1.7.jar:/temp/hornetq-test/mb1/../lib/commons-collections-3.2.1.jar:/temp/hornetq-test/mb1/../lib/commons-codec-1.5.jar:/temp/hornetq-test/mb1/../lib/commons-beanutils-1.8.3.jar:/temp/hornetq-test/mb1/../lib/aopalliance-1.0.jar:/temp/hornetq-test/mb1/../lib/activation-1.1.1.jar:cfg:/temp/hornetq-test/mb1/schemas/ org.hornetq.integration.bootstrap.HornetQBootstrapServer hornetq-beans.xml
***********************************************************************************
0 INFO [main] org.springframework.context.support.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@2e8f4fb3: startup date [Mon Apr 30 18:38:57 PDT 2012]; root of context hierarchy
31 INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from URL [file:cfg/senderContext.xml]
292 INFO [main] org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@56c163f: defining beans [transportConfig1,transportConfig2,connectionFactory,connectionFactoryAdapter,cachingConnectionFactory,jmsTemplate,testQueue,jmsSender]; root of factory hierarchy
375 INFO [main] com.myco.jmstest.SenderMain - Sending 1000000 messages
493 INFO [JmsSender-4] org.springframework.jms.connection.CachingConnectionFactory - Established shared JMS Connection: org.hornetq.jms.client.HornetQConnection@614a75bb
562 INFO [JmsSender-8] com.myco.jmstest.JmsSender - Messages sent: 3
5567 INFO [JmsSender-3] com.myco.jmstest.JmsSender - Messages sent: 26427
^Ccraig@server:/temp/hornetq-test$
Were you getting errors when running the scripts?