You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Amir Malekpour (JIRA)" <ji...@apache.org> on 2011/06/06 19:20:59 UTC

[jira] [Updated] (AMQ-3359) UDP Transport connector listens on a random port number

     [ https://issues.apache.org/jira/browse/AMQ-3359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amir Malekpour updated AMQ-3359:
--------------------------------

    Description: 
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 but netstat shows another UDP port number. The reason is that as seen in the 
following block, the UdpTransport constructor does not read this.port from remoreLocation and only reads its address and leaves the this.port to be zero. The solution is to add this line: this.port = remoteLocation.getPort();

public UdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException, IOException {
        this(wireFormat);
        this.targetAddress = createAddress(remoteLocation);
        description = remoteLocation.toString() + "@";
    }

  was:
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 but netstat shows another UDP port number. The reason is that as seen in the 
following block, the UdpTransport constructor does not read this.port from remoreLocation and only reads its address and leaves it to be zero. The solution is to add this line: this.port = remoteLocation.getPort();

public UdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException, IOException {
        this(wireFormat);
        this.targetAddress = createAddress(remoteLocation);
        description = remoteLocation.toString() + "@";
    }


> 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
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> 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 but netstat shows another UDP port number. The reason is that as seen in the 
> following block, the UdpTransport constructor does not read this.port from remoreLocation and only reads its address and leaves the this.port to be zero. The solution is to add this line: this.port = remoteLocation.getPort();
> 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