You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gerald Loeffler (JIRA)" <ji...@apache.org> on 2007/11/07 13:22:22 UTC

[jira] Created: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

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
            Reporter: Gerald Loeffler
             Fix For: 4.1.2


This bug relates to the MulticastDiscoveryAgent and was discovered when 

1. the discoveryUri of a transportConnector is a multicast-uri such as

{code:xml}
<transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
{code}

or

2. the uri of a networkConnector is a multicast-uri such as

{code:xml}
<networkConnector name="..." uri="multicast://239.3.7.0:37000">
{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.


Re: [jira] Created: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by T4B00M <ar...@gmail.com>.
This seems to be an issue in 5.0 as well. The discovery URI is never set but
not sure if this is a bug or not, the comments in
MulticastDiscoveryAgentFactory.doCreateDiscoveryAgent says:

// allow the discoveryURI to be set via a query argument on the URI
// ?discoveryURI=someURI

before using the itrospection property setting, but this seems redundant to
me as well as not mentioned in any documentation about configuring the uri
in any of the documentation. I would think that just explicitly setting the
URI as mention below would be better as I can not think of a case where you
would pass in a multicast address and then also specify a different
discovery multicast address


JIRA jira@apache.org wrote:
> 
> 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
>             Reporter: Gerald Loeffler
>              Fix For: 4.1.2
> 
> 
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> 
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000"
> />
> {code}
> 
> or
> 
> 2. the uri of a networkConnector is a multicast-uri such as
> 
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-jira--Created%3A-%28AMQ-1489%29-discoveryUri-in-transportConnector-and-uri-in-networkConnector-partially-ignored-if-multicast-tp13626158s2354p14676542.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


[jira] Assigned: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks reassigned AMQ-1489:
---------------------------------

    Assignee: David Jencks

> 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
>            Reporter: Gerald Loeffler
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Assigned: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully reassigned AMQ-1489:
-------------------------------

    Assignee: Gary Tully  (was: Rob Davies)

> 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: Gary Tully
>             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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Reopened: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Ari Cooperman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ari Cooperman reopened AMQ-1489:
--------------------------------


This fix is missing in 5.+

> 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
>            Reporter: Gerald Loeffler
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Updated: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks updated AMQ-1489:
------------------------------

        Fix Version/s: 5.1.0
    Affects Version/s: 5.0.0

After further thought I've reverted the patch as I think it can't possibly be correct to always overwrite the default multicast info.  I don't understand how this is supposed to work well enough to fix it without help.

It looks to me as if it is possible to specify the discoveryURI with the current code by using configurations like

{code}
<transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000?discoveryURI=multicast://239.3.7.0:37000" />
{code}
and
{code}
<networkConnector name="..." uri="multicast://239.3.7.0:37000?discoveryURI=multicast://239.3.7.0:37000">
{code}

i.e. specifying the discoveryURI as a uri query parameter even when directly specifying the discoveryURI.  If this is the expected usage then perhaps a documentation update is what is required, although the first example looks weird to me.  Perhaps a flag as to whether the uri is intended to be the discovery URI would be more appropriate or perhaps the code processing the first case could add the discoveryURI as a parameter itself.

> 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: David Jencks
>             Fix For: 4.1.2, 5.1.0
>
>
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Updated: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Joe Fernandez (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joe Fernandez updated AMQ-1489:
-------------------------------

    Attachment: patchfile.txt

Submitted the patch for review. With this patch, you don't have to use a query parameter to specify a host:port. You can simply specify it  as follows: multicast://<host>:<port>. However, the patch doesn't preclude you from specifying the discoveryURI via a query paramter; doing so will override <host>:<port> provided via the URI.  

Also, the default group value, which is "default", can only be overriden via a query parameter; as I think it should. For example, with the URI below, the agent will end up using the default IP and port number, but is given a group name of "foo".  

multicast://default?group=foo 

> 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: David Jencks
>             Fix For: 4.1.3
>
>         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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Reopened: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Gary Tully (JIRA)" <ji...@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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Assigned: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac reassigned AMQ-1489:
----------------------------------

    Assignee: Dejan Bosanac  (was: Gary Tully)

> 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: Dejan Bosanac
>             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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Assigned: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Dejan Bosanac (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dejan Bosanac reassigned AMQ-1489:
----------------------------------

    Assignee: Gary Tully  (was: Dejan Bosanac)

> 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: Gary Tully
>             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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Commented: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41895#action_41895 ] 

David Jencks commented on AMQ-1489:
-----------------------------------

I'm no expert in how this is supposed to work, but the comment in the trunk code makes me wonder if the patch is correct.

Without the patch, a URI with ?discoveryURI=foo will result in setting the discoveryURI and other URIs will use the default.

With the patch, IIUC, the default will never be used.

> 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
>            Reporter: Gerald Loeffler
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Resolved: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Rob Davies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies resolved AMQ-1489.
-----------------------------

         Assignee: Rob Davies  (was: David Jencks)
    Fix Version/s: 5.2.0
                       (was: 4.1.3)
       Resolution: Fixed

Patch applied in SVN revision 692340

> 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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Updated: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks updated AMQ-1489:
------------------------------

    Fix Version/s: 4.1.3
                       (was: 4.1.2)
                       (was: 5.1.0)

Did not get fixed in 4.1.2

> 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: David Jencks
>             Fix For: 4.1.3
>
>
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Resolved: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "Gary Tully (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-1489.
-----------------------------

    Resolution: Fixed

a bunch of unit tests made use of the group being taken from the unused host portion of the url. changing them to default?group="" resolved the failures. FWIR the group was added to help test isolation on the same subnet.

> 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: Gary Tully
>             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}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.


[jira] Closed: (AMQ-1489) discoveryUri in transportConnector and uri in networkConnector partially ignored if multicast

Posted by "David Jencks (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQ-1489?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Jencks closed AMQ-1489.
-----------------------------

    Resolution: Fixed

Fixed rev 640636.

> 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
>            Reporter: Gerald Loeffler
>            Assignee: David Jencks
>             Fix For: 4.1.2
>
>
> This bug relates to the MulticastDiscoveryAgent and was discovered when 
> 1. the discoveryUri of a transportConnector is a multicast-uri such as
> {code:xml}
> <transportConnector uri="..." discoveryUri="multicast://239.3.7.0:37000" />
> {code}
> or
> 2. the uri of a networkConnector is a multicast-uri such as
> {code:xml}
> <networkConnector name="..." uri="multicast://239.3.7.0:37000">
> {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.