Return-Path: Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: (qmail 40230 invoked from network); 5 Sep 2008 20:44:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2008 20:44:22 -0000 Received: (qmail 16292 invoked by uid 500); 5 Sep 2008 20:44:20 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 16107 invoked by uid 500); 5 Sep 2008 20:44:19 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 16096 invoked by uid 99); 5 Sep 2008 20:44:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 13:44:19 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 20:43:21 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B944A234C1D1 for ; Fri, 5 Sep 2008 13:43:52 -0700 (PDT) Message-ID: <427481076.1220647432757.JavaMail.jira@brutus> Date: Fri, 5 Sep 2008 13:43:52 -0700 (PDT) From: "Gary Tully (JIRA)" To: dev@activemq.apache.org Subject: [jira] Reopened: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast In-Reply-To: <1063507.1194438142212.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gary Tully reopened AMQ-1489: ----------------------------- bunch of unit test failures (14) with this fix, needs some investigation. eg BrokerServiceTest java.net.UnknownHostException: group-1220646703756: group-1220646703756 at java.net.InetAddress.getAllByName0(InetAddress.java:1145) at java.net.InetAddress.getAllByName(InetAddress.java:1072) at java.net.InetAddress.getAllByName(InetAddress.java:1008) at java.net.InetAddress.getByName(InetAddress.java:958) at org.apache.activemq.transport.discovery.multicast.MulticastDiscoveryAgent.start(MulticastDiscoveryAgent.java:300) at org.apache.activemq.network.DiscoveryNetworkConnector.handleStart(DiscoveryNetworkConnector.java:164) at org.apache.activemq.network.NetworkConnector$1.doStart(NetworkConnector.java:56) at org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:53) at org.apache.activemq.network.NetworkConnector.start(NetworkConnector.java:197) at org.apache.activemq.broker.BrokerService.startAllConnectors(BrokerService.java:1873) at org.apache.activemq.broker.BrokerService.start(BrokerService.java:480) at org.apache.activemq.broker.BrokerServiceTest.testAddRemoveNetworkWithJMX(BrokerServiceTest.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) > discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast > --------------------------------------------------------------------------------------------- > > Key: AMQ-1489 > URL: https://issues.apache.org/activemq/browse/AMQ-1489 > Project: ActiveMQ > Issue Type: Bug > Components: Connector > Affects Versions: 4.1.1, 5.0.0 > Reporter: Gerald Loeffler > Assignee: Rob Davies > Fix For: 5.2.0 > > Attachments: patchfile.txt > > > This bug relates to the MulticastDiscoveryAgent and was discovered when > 1. the discoveryUri of a transportConnector is a multicast-uri such as > {code:xml} > > {code} > or > 2. the uri of a networkConnector is a multicast-uri such as > {code:xml} > > {code} > In these cases, the uri is partially ignored by the MulticastDiscoveryAgent: the host-name of the uri (239.3.7.0) is extracted and used as the group name by the MulticastDiscoveryAgent. But the actual multicast group IP is always 239.255.2.3 and the multicast port is always 6155, regardless of what the actual uri is in the configuration. > The reason for this is that MulticastDiscoveryAgentFactory creates a new MulticastDiscoveryAgent and sets the group based on the uri's host, but fails to set the discoveryURI itself. MulticastDiscoveryAgentFactory should be corrected to do this: > {code:java} > MulticastDiscoveryAgent rc = new MulticastDiscoveryAgent(); > rc.setDiscoveryURI(uri); // missing > rc.setGroup(uri.getHost()); > {code} > Without the above setting of the discoveryURI the MulticastDiscoveryAgent always uses the DEFAULT_DISCOVERY_URI_STRING which is "multicast://239.255.2.3:6155", explaining the erroneous behaviour described above. > kind regards, > gerald > http://www.gerald-loeffler.net -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.