activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amir Malekpour (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (AMQ-3359) UDP Transport connector listens on a random port number
Date Mon, 05 Sep 2011 15:36:09 GMT

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

Amir Malekpour edited comment on AMQ-3359 at 9/5/11 3:34 PM:
-------------------------------------------------------------

Well, I have to disagree with you on this. I even resorted to "println" to make sure the method
that is called IS the one I've mentioned above. (Even if it wasn't this is clearly a bug in
that method to ignore the provided port number, so ignoring the buggy method on the basis
that it's not called does not seem sound to me, though as I sad it is called).
Now as for a case that proves the existence of the bug, just run the broker with UDP transport
and use netstat to check if the broker is actually listening on the specified port. You'll
see that it isn't. Honestly, if this is not a convincing case I don't know what is.

      was (Author: amir.malekpour):
    Well, I have to disagree with you on this. I even resorted to "println" to make sure the
method that is called IS the one 
I've mentioned above. (Even if it wasn't this is clearly a bug in that method to ignore the
provided port number, so ignoring the bug on the basis that its' not called does not seem
sound to me, though as I sad it is called).
Now as for a case that proves the existence of the bug, just run the broker with UDP transport
and use netstat to check if the broker is actually listening on the specified port. You'll
see that it isn't. Honestly, if this is not a convincing case I don't know what is.

  
> UDP Transport connector listens on a random port number
> -------------------------------------------------------
>
>                 Key: AMQ-3359
>                 URL: https://issues.apache.org/jira/browse/AMQ-3359
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.4.0, 5.4.1, 5.4.2, 5.5.0
>            Reporter: Amir Malekpour
>              Labels: broker, port, transport, udp
>         Attachments: AMQ-3359.patch
>
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> The broker listens on a random UDP port number instead of the one configure in the URI.
The port number changes each time the broker is restarted. However, the management console
indicates that the broker's listening on the configured port number while it is not the case
(netstat shows another UDP port number). The reason  is that (as seen in the following block)
the UdpTransport constructor does not assign "this.port" from remoteLocation but only reads
the address and leaves "this.port" to be zero. Subsequently, Java API picks any available
port number when it is creating the DatagraSocket. The solution is to add this line: "this.port
= remoteLocation.getPort();" to the following constructor as seen in the accompanying patch.
> public UdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException,
IOException {
>         this(wireFormat);
>         this.targetAddress = createAddress(remoteLocation);
>         description = remoteLocation.toString() + "@";
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message