You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2015/02/11 16:37:11 UTC

[jira] [Commented] (AMQ-5520) MulticastDiscoveryAgent may use a network that is not multicast enabled, fails to startup

    [ https://issues.apache.org/jira/browse/AMQ-5520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316371#comment-14316371 ] 

Gary Tully commented on AMQ-5520:
---------------------------------

seems that test failure points to a problem{code}org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'broker1' defined in class path resource [spring-embedded-pooled.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [activemq.xml]: Invocation of init method failed; nested exception is java.net.SocketException: No such device
	at java.net.NetworkInterface.supportsMulticast0(Native Method)
	at java.net.NetworkInterface.supportsMulticast(NetworkInterface.java:417)
	at org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent.findNetworkInterface(MulticastDiscoveryAgent.java:347)
	at org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent.start(MulticastDiscoveryAgent.java:324)
	at org.apache.activemq.broker.TransportConnector.start(TransportConnector.java:253)
	at org.apache.activemq.broker.BrokerService.startTransportConnector(BrokerService.java:2593)
	at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:2506)
	at org.apache.activemq.broker.BrokerService.doStartBroker(BrokerService.java:710)
	at org.apache.activemq.broker.BrokerService.startBroker(BrokerService.java:670)
	at org.apache.activemq.broker.BrokerService.start(BrokerService.java:606)
	at org.apache.activemq.xbean.XBeanBrokerService.afterPropertiesSet(XBeanBrokerService.java:73)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606){code}

wrapping the supportsMulticast call to ignore this exception.

> MulticastDiscoveryAgent may use a network that is not multicast enabled, fails to startup
> -----------------------------------------------------------------------------------------
>
>                 Key: AMQ-5520
>                 URL: https://issues.apache.org/jira/browse/AMQ-5520
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.10.0
>            Reporter: Daniel Kulp
>            Assignee: Daniel Kulp
>             Fix For: 5.11.0
>
>
> If no network interface is explicitly set, it calls mcast.joinGroup(inetAddress); without setting one on the MulticastSocket.  In that case, MulticastSocket then calls NetworkInterface.getDefault().    The "default" interface on a system is relatively unpredictable and COULD result in a network interface that isn't even multicast enabled.     On my mac, it's selecting a "awdl0" interface which doesn't support multicast.   If I have Parallels running, it sometimes picks up one of those interfaces.   It also sometimes picks up an ipv6 only network interface which also doesn't support the ipv4 broadcast address.
> It would be better to enumerate the network interfaces and at least make sure we grab one that support multicast on ipv4 and is "up".
> Note:  this causes some test failures on my machine.  Specifically SpringTest.testSenderWithSpringXmlEmbeddedPooledBrokerConfiguredViaXml fails.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)