activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <gary.tu...@gmail.com>
Subject Re: Can I can run two brokers as network using multicast on the same host?
Date Fri, 06 Aug 2010 17:19:25 GMT
this sounds like https://issues.apache.org/activemq/browse/AMQ-2771
note the comments at the end about useLocalHost=false

On 5 August 2010 22:23, jzhang <jzhang@wellington.com> wrote:
>
> I am trying to set up a simple network of brokers within the same host (Linux
> VM) using multicast. It seems that I can only use 'localhost' as host name
> in tcp uri. If I use IP address or DNS name, the log shows 'connection
> refused' warning message. Here are some details:
>
> My configurations:
>
> - for broker NB-BKR-B:
> ...
>  <networkConnectors>
>            <networkConnector name="labnb1"
> uri="multicast://default?group=test-lab-1" />
>  </networkConnectors>
>
> ...
>   <transportConnectors>
>            <transportConnector name="openwire"
> uri="tcp://myhost.mycompany.com:61617"
> discoveryUri="multicast://default?group=test-lab-1"/>
>        </transportConnectors>
> ...
>
> - for broker NB-BKR-C:
> ...
>  <networkConnectors>
>            <networkConnector name="labnb1"
> uri="multicast://default?group=test-lab-1" />
>  </networkConnectors>
>
> ...
>   <transportConnectors>
>            <transportConnector name="openwire"
> uri="tcp://myhost.mycompany.com:61618"
> discoveryUri="multicast://default?group=test-lab-1"/>
>        </transportConnectors>
> ...
>
> Now when started both brokers, log shows (NB-BKR-C;s log):
>
> 2010-08-05 17:06:29,054 | WARN  | Could not start network bridge between:
> vm://NB-BKR-C and: tcp://lab-2:61617 due to: java.net.ConnectException:
> Connection refused | org.apache.activemq.network.DiscoveryNetworkConnector |
> Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:labnb1:BrokerService[NB-BKR-C]
> 2010-08-05 17:06:29,055 | DEBUG | Start failure exception:
> java.net.ConnectException: Connection refused |
> org.apache.activemq.network.DiscoveryNetworkConnector |
> Notifier-MulticastDiscoveryAgent-listener:DiscoveryNetworkConnector:labnb1:BrokerService[NB-BKR-C]
> java.net.ConnectException: Connection refused
>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>        at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>        at java.net.Socket.connect(Socket.java:519)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:436)
>        at
> org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:402)
>        at
> org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53)
>        at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>        at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>        at
> org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:72)
>        at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>        at
> org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:57)
>        at
> org.apache.activemq.network.DemandForwardingBridgeSupport.start(DemandForwardingBridgeSupport.java:227)
>        at
> org.apache.activemq.network.DiscoveryNetworkConnector.onServiceAdd(DiscoveryNetworkConnector.java:130)
>        at
> org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent$2.run(MulticastDiscoveryAgent.java:506)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
>        at java.lang.Thread.run(Thread.java:595)
>
> Broker NB-BKR-B has the similar warning. I have not test message forward
> yet. Just feel uncomfortable seeing these stacktraces. But when I change
> 'myhost.mycompany.com' to localhost' under 'tcp' uri, the log does not have
> those warning and stacktrace. Also if these two brokers are hosted on two
> different VMs and uses host name or IP, it works fine.
>
> What might be the problem here?
>
> -J
> --
> View this message in context: http://old.nabble.com/Can-I-can-run-two-brokers-as-network-using-multicast-on-the-same-host--tp29356394p29356394.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
http://blog.garytully.com

Open Source Integration
http://fusesource.com

Mime
View raw message