From fa15b29dfc3976b7d141875726e1d5c827a016d7 Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Tue, 1 Sep 2015 23:26:54 -0400 Subject: [PATCH] Fixing clustered examples on MacOS (and possibly other envs) --- examples/README.md | 7 +++++++ .../clustered/client-side-load-balancing/pom.xml | 8 ++++++++ .../clustered/clustered-durable-subscription/pom.xml | 4 ++++ .../features/clustered/clustered-grouping/pom.xml | 6 ++++++ .../features/clustered/clustered-jgroups/pom.xml | 4 ++++ examples/features/clustered/clustered-queue/pom.xml | 4 ++++ .../clustered/clustered-static-discovery/pom.xml | 6 ++++++ .../clustered/clustered-static-oneway/pom.xml | 6 ++++++ examples/features/clustered/clustered-topic/pom.xml | 4 ++++ .../clustered/queue-message-redistribution/pom.xml | 4 ++++ .../features/clustered/symmetric-cluster/pom.xml | 12 ++++++------ 11 files changed, 59 insertions(+), 6 deletions(-) diff --git a/examples/README.md b/examples/README.md index e9d9e36112..3d0fdd9131 100644 --- a/examples/README.md +++ b/examples/README.md @@ -22,6 +22,13 @@ directory but before you do you will need to up the memory used by running: ``` export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m" ``` + +if you are running a Mac OS, you may want to add this to run the clustered examples: + +``` +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true" +``` + ### Recreating the examples If you are trying to copy the examples somewhere else and modifying them. Consider asking Maven to explicitly list all the dependencies: diff --git a/examples/features/clustered/client-side-load-balancing/pom.xml b/examples/features/clustered/client-side-load-balancing/pom.xml index c2993b22e1..a9b092c759 100644 --- a/examples/features/clustered/client-side-load-balancing/pom.xml +++ b/examples/features/clustered/client-side-load-balancing/pom.xml @@ -59,6 +59,8 @@ under the License. ${noServer} ${basedir}/target/server0 true + + -Djava.net.preferIPv4Stack=true @@ -71,6 +73,8 @@ under the License. ${basedir}/target/server1 true 1 + + -Djava.net.preferIPv4Stack=true @@ -83,6 +87,8 @@ under the License. ${basedir}/target/server2 true 2 + + -Djava.net.preferIPv4Stack=true @@ -139,6 +145,8 @@ under the License. runClient + org.apache.activemq.artemis.jms.example.ClientSideLoadBalancingExample diff --git a/examples/features/clustered/clustered-durable-subscription/pom.xml b/examples/features/clustered/clustered-durable-subscription/pom.xml index 8f28710808..d6fbb98ab6 100644 --- a/examples/features/clustered/clustered-durable-subscription/pom.xml +++ b/examples/features/clustered/clustered-durable-subscription/pom.xml @@ -60,6 +60,8 @@ under the License. true ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -73,6 +75,8 @@ under the License. ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 1 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/clustered-grouping/pom.xml b/examples/features/clustered/clustered-grouping/pom.xml index b41a2ad0c8..a62589462d 100644 --- a/examples/features/clustered/clustered-grouping/pom.xml +++ b/examples/features/clustered/clustered-grouping/pom.xml @@ -59,6 +59,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -70,6 +72,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true @@ -81,6 +85,8 @@ under the License. ${noServer} ${basedir}/target/server2 ${basedir}/target/classes/activemq/server2 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/clustered-jgroups/pom.xml b/examples/features/clustered/clustered-jgroups/pom.xml index 30f6a2049f..5e22e0ccef 100644 --- a/examples/features/clustered/clustered-jgroups/pom.xml +++ b/examples/features/clustered/clustered-jgroups/pom.xml @@ -63,6 +63,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -78,6 +80,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/clustered-queue/pom.xml b/examples/features/clustered/clustered-queue/pom.xml index 78a8c8ba1c..2f876bedc5 100644 --- a/examples/features/clustered/clustered-queue/pom.xml +++ b/examples/features/clustered/clustered-queue/pom.xml @@ -59,6 +59,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -70,6 +72,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/clustered-static-discovery/pom.xml b/examples/features/clustered/clustered-static-discovery/pom.xml index b3ce3c14e2..860a717390 100644 --- a/examples/features/clustered/clustered-static-discovery/pom.xml +++ b/examples/features/clustered/clustered-static-discovery/pom.xml @@ -64,6 +64,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -75,6 +77,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true @@ -86,6 +90,8 @@ under the License. ${noServer} ${basedir}/target/server2 ${basedir}/target/classes/activemq/server2 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/clustered-static-oneway/pom.xml b/examples/features/clustered/clustered-static-oneway/pom.xml index 18a303cfb5..a787b0a189 100644 --- a/examples/features/clustered/clustered-static-oneway/pom.xml +++ b/examples/features/clustered/clustered-static-oneway/pom.xml @@ -64,6 +64,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -75,6 +77,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true @@ -86,6 +90,8 @@ under the License. ${noServer} ${basedir}/target/server2 ${basedir}/target/classes/activemq/server2 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/clustered-topic/pom.xml b/examples/features/clustered/clustered-topic/pom.xml index bff7c70b3e..e2bc358209 100644 --- a/examples/features/clustered/clustered-topic/pom.xml +++ b/examples/features/clustered/clustered-topic/pom.xml @@ -59,6 +59,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -70,6 +72,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/queue-message-redistribution/pom.xml b/examples/features/clustered/queue-message-redistribution/pom.xml index 4816ad0e98..4f01f073e3 100644 --- a/examples/features/clustered/queue-message-redistribution/pom.xml +++ b/examples/features/clustered/queue-message-redistribution/pom.xml @@ -59,6 +59,8 @@ under the License. ${noServer} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 + + -Djava.net.preferIPv4Stack=true @@ -70,6 +72,8 @@ under the License. ${noServer} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 + + -Djava.net.preferIPv4Stack=true diff --git a/examples/features/clustered/symmetric-cluster/pom.xml b/examples/features/clustered/symmetric-cluster/pom.xml index 5be9c1de77..e0b8c20e36 100644 --- a/examples/features/clustered/symmetric-cluster/pom.xml +++ b/examples/features/clustered/symmetric-cluster/pom.xml @@ -59,7 +59,7 @@ under the License. ${noSever} ${basedir}/target/server0 ${basedir}/target/classes/activemq/server0 - -Dudp-address=${udp-address} + -Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true @@ -71,7 +71,7 @@ under the License. ${noSever} ${basedir}/target/server1 ${basedir}/target/classes/activemq/server1 - -Dudp-address=${udp-address} + -Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true @@ -83,7 +83,7 @@ under the License. ${noSever} ${basedir}/target/server2 ${basedir}/target/classes/activemq/server2 - -Dudp-address=${udp-address} + -Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true @@ -95,7 +95,7 @@ under the License. ${noSever} ${basedir}/target/server3 ${basedir}/target/classes/activemq/server3 - -Dudp-address=${udp-address} + -Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true @@ -107,7 +107,7 @@ under the License. ${noSever} ${basedir}/target/server4 ${basedir}/target/classes/activemq/server4 - -Dudp-address=${udp-address} + -Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true @@ -119,7 +119,7 @@ under the License. ${noSever} ${basedir}/target/server5 ${basedir}/target/classes/activemq/server5 - -Dudp-address=${udp-address} + -Dudp-address=${udp-address} -Djava.net.preferIPv4Stack=true