You are only specifying a MQTT acceptor and an MQTT connector.

I would use a real IP on the connector, and would leave open the CORE
protocol as the CORE is used for communication between the nodes.


look at the produced server when you run the example under ./target...


Or use --clustered --replicated when you create the server:

./artemis create --replicate --clustered ./destination-for-server

On Sun, Jul 24, 2016 at 12:55 PM, aries.aries
<aries123.aries...@gmail.com> wrote:
> I was trying to setup replicated failback by referring the example at
> https://github.com/apache/activemq-artemis/tree/master/examples/features/ha/replicated-failback.
>
> My configuration for master is as below:
>
> <configuration xmlns="urn:activemq"
>                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>                xsi:schemaLocation="urn:activemq
> /schema/artemis-configuration.xsd">
>
>    <jms xmlns="urn:activemq:jms">
>       <queue name="DLQ"/>
>       <queue name="ExpiryQueue"/>
>
>    </jms>
>
>    <core xmlns="urn:activemq:core">
>
>       <name>master</name>
>
>       <persistence-enabled>true</persistence-enabled>
>
>
>       <journal-type>NIO</journal-type>
>
>       <paging-directory>./data/paging</paging-directory>
>
>       <bindings-directory>./data/bindings</bindings-directory>
>
>       <journal-directory>./data/journal</journal-directory>
>
>
> <large-messages-directory>./data/large-messages</large-messages-directory>
>
>       <journal-min-files>2</journal-min-files>
>
>       <journal-pool-files>-1</journal-pool-files>
>
>
>       <journal-buffer-timeout>68000</journal-buffer-timeout>
>
>       <cluster-user>master</cluster-user>
>
>       <cluster-password>secret</cluster-password>
>
>       <ha-policy>
>          <replication>
>             <master>
>
>                <check-for-live-server>true</check-for-live-server>
>             </master>
>          </replication>
>       </ha-policy>
>
>       <connectors>
>          <connector
> name="netty-connector">tcp://0.0.0.0:1883?protocols=MQTT</connector>
>       </connectors>
>
>       <acceptors>
>
>
>          <acceptor
> name="netty-acceptor">tcp://0.0.0.0:1883?protocols=MQTT</acceptor>
>
>       </acceptors>
>
>       <broadcast-groups>
>          <broadcast-group name="bg-group1">
>             <group-address>${udp-address:xxxx::x:xxxx:xxxx}</group-address>
>             <group-port>9876</group-port>
>             <broadcast-period>1000</broadcast-period>
>             <connector-ref>netty-connector</connector-ref>
>          </broadcast-group>
>       </broadcast-groups>
>
>       <discovery-groups>
>          <discovery-group name="dg-group1">
>             <group-address>${udp-address:xxxx::x:xxxx:xxxx}</group-address>
>             <group-port>9876</group-port>
>             <refresh-timeout>5000</refresh-timeout>
>          </discovery-group>
>       </discovery-groups>
>
>       <cluster-connections>
>          <cluster-connection name="my-cluster">
>             <address>debs2015</address>
>             <connector-ref>netty-connector</connector-ref>
>             <discovery-group-ref discovery-group-name="dg-group1"/>
>          </cluster-connection>
>       </cluster-connections>
>
>       <security-settings>
>          <security-setting match="#">
>             <permission type="createNonDurableQueue" roles="a"/>
>             <permission type="deleteNonDurableQueue" roles="a"/>
>             <permission type="createDurableQueue" roles="a"/>
>             <permission type="deleteDurableQueue" roles="a"/>
>             <permission type="consume" roles="a"/>
>             <permission type="browse" roles="a"/>
>             <permission type="send" roles="a"/>
>
>             <permission type="manage" roles="a"/>
>          </security-setting>
>       </security-settings>
>
>
>    </core>
> </configuration>
>
> However when I create and run the broker instance, I get the warning and
> error as:
>
> 17:18:39,752 INFO  [org.apache.activemq.artemis.integration.bootstrap]
> AMQ101000: Starting ActiveMQ Artemis Server
> 17:18:39,763 INFO  [org.apache.activemq.artemis.core.server] AMQ221000: live
> Message Broker is starting with configuration Broker Configuration
> (clustered=true,journalDirectory=./data/journal,bindingsDirectory=./data/bindings,largeMessagesDirectory=./data/large-messages,pagingDirectory=./data/paging)
> 17:18:39,779 WARN  [org.apache.activemq.artemis.core.client] AMQ212049:
> Could not bind to xxxx:x:x:x:x:x:xxxx:xxxx (IPv6 address); make sure your
> discovery group-address is of the same type as the IP stack (IPv4 or IPv6).
> Ignoring discovery group-address, but this may lead to cross talking.
> 17:18:49,866 INFO  [org.apache.activemq.artemis.core.server] AMQ221013:
> Using NIO Journal
> 17:18:49,926 INFO  [org.apache.activemq.artemis.core.server] AMQ221043:
> Protocol module found: [artemis-server]. Adding protocol support for: CORE
> 17:18:49,928 INFO  [org.apache.activemq.artemis.core.server] AMQ221043:
> Protocol module found: [artemis-amqp-protocol]. Adding protocol support for:
> AMQP
> 17:18:49,930 INFO  [org.apache.activemq.artemis.core.server] AMQ221043:
> Protocol module found: [artemis-hornetq-protocol]. Adding protocol support
> for: HORNETQ
> 17:18:49,931 INFO  [org.apache.activemq.artemis.core.server] AMQ221043:
> Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for:
> MQTT
> 17:18:49,933 INFO  [org.apache.activemq.artemis.core.server] AMQ221043:
> Protocol module found: [artemis-openwire-protocol]. Adding protocol support
> for: OPENWIRE
> 17:18:49,934 INFO  [org.apache.activemq.artemis.core.server] AMQ221043:
> Protocol module found: [artemis-stomp-protocol]. Adding protocol support
> for: STOMP
> 17:18:49,985 WARN  [org.apache.activemq.artemis.core.client] AMQ212049:
> Could not bind to xxxx:x:x:x:x:x:xxxx:xxxx (IPv6 address); make sure your
> discovery group-address is of the same type as the IP stack (IPv4 or IPv6).
> Ignoring discovery group-address, but this may lead to cross talking.
> 17:18:50,215 INFO  [org.apache.activemq.artemis.core.server] AMQ221003:
> Trying to deploy queue jms.queue.DLQ
> 17:18:50,234 INFO  [org.apache.activemq.artemis.core.server] AMQ221003:
> Trying to deploy queue jms.queue.ExpiryQueue
> 17:18:50,445 INFO  [org.apache.activemq.artemis.core.server] Checking...
> 17:18:50,459 WARN  [org.apache.activemq.artemis.core.client] AMQ212049:
> Could not bind to xxxx:x:x:x:x:x:xxxx:xxxx (IPv6 address); make sure your
> discovery group-address is of the same type as the IP stack (IPv4 or IPv6).
> Ignoring discovery group-address, but this may lead to cross talking.
> 17:18:51,328 INFO  [org.apache.activemq.artemis.core.server] AMQ221020:
> Started Acceptor at 0.0.0.0:1883 for protocols
> [CORE,MQTT,AMQP,HORNETQ,STOMP,OPENWIRE]
> 17:18:51,329 INFO  [org.apache.activemq.artemis.core.server] AMQ221007:
> Server is now live
> 17:18:51,329 INFO  [org.apache.activemq.artemis.core.server] AMQ221001:
> Apache ActiveMQ Artemis Message Broker version 1.4.0-SNAPSHOT [master,
> nodeID=4caa9c19-5128-11e6-88a6-fa163ecaa3ca]
> 17:18:51,399 ERROR [org.apache.activemq.artemis.core.client] AMQ214016:
> Failed to create netty connection: java.net.UnknownHostException:
> artemis-master: artemis-master: unknown error
>         at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
> [rt.jar:1.8.0_91]
>         at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:647)
> [rt.jar:1.8.0_91]
>         at
> io.netty.channel.socket.nio.NioSocketChannel.doConnect(NioSocketChannel.java:208)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.connect(AbstractNioChannel.java:203)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1226)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:549)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:534)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:50)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:549)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:534)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:516)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.channel.DefaultChannelPipeline.connect(DefaultChannelPipeline.java:970)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at io.netty.channel.AbstractChannel.connect(AbstractChannel.java:215)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at io.netty.bootstrap.Bootstrap$2.run(Bootstrap.java:166)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:408)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:402)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at
> io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
> [netty-all-4.0.39.Final.jar:4.0.39.Final]
>         at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_91]
> Caused by: java.net.UnknownHostException: artemis-master: unknown error
>         at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
> [rt.jar:1.8.0_91]
>         at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
> [rt.jar:1.8.0_91]
>         at 
> java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
> [rt.jar:1.8.0_91]
>         at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
> [rt.jar:1.8.0_91]
>         ... 17 more
>
>
> Could someone please guide my what the issue might be? Thanks in advance.
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Error-setting-up-replicated-failback-tp4714331.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Clebert Suconic

Reply via email to