You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Amir <a....@gmail.com> on 2011/06/03 10:01:26 UTC

UDP Transport connector binds to a random port number.

Hi all,

I'm having problem getting ActiveMQ 5.4.* and 5.5 to run properly with UDP
transport connector. What happens is that the broker listens to a random UDP
port number instead of the one I configure in the URI. The port number seems
to be randomly chosen, since it changes each time the broker is restarted.
Interestingly, the management console indicates that the broker's listening
on the configured port number but netstat shows another UDP port number. Any
idea ?

-Amir

--
View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-binds-to-a-random-port-number-tp3570237p3570237.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: UDP Transport connector binds to a random port number.

Posted by ceposta <ch...@gmail.com>.
Amir,

I figured it out. The patch you submitted was not the correct one, but very
much on the right track. I'll update the JIRA with what I found. As Gary
mentioned, this module could use some unit tests, so I'll write those as
well.

The link to your JIRA issue is here:
https://issues.apache.org/jira/browse/AMQ-3359?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel#issue-tabs

Thanks,
Christian

--
View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p4257136.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: UDP Transport connector binds to a random port number.

Posted by ceposta <ch...@gmail.com>.
Amir,

I see you have a JIRA still opened for this issue. Can you confirm this is
still an issue?

--
View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p4241119.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: UDP Transport connector binds to a random port number.

Posted by Gary Tully <ga...@gmail.com>.
think that is the case, new tests are always welcome. submit one with
your patch, it will protect your changes into the future.

On 6 June 2011 17:54, Amir <a....@gmail.com> wrote:
> By the way, as a side note, its pretty weird this bug hadn't been discovered
> before because UDP actually did not work at all. So, I think there is a
> serious lack of UDP tests in the current test collection.
>
> -Amir
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p3577438.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com

Re: UDP Transport connector binds to a random port number.

Posted by Amir <a....@gmail.com>.
By the way, as a side note, its pretty weird this bug hadn't been discovered
before because UDP actually did not work at all. So, I think there is a
serious lack of UDP tests in the current test collection. 

-Amir

--
View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p3577438.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: UDP Transport connector binds to a random port number.

Posted by Amir <a....@gmail.com>.
Thanks Gary,

Using the the pointer you gave me I found the bug in ActiveMQ that was
causing this problem. I'll submit a patch soon.

-Amir













--
View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p3577408.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: UDP Transport connector binds to a random port number.

Posted by Gary Tully <ga...@gmail.com>.
Have a peek at the source: doBind in
http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/udp/UdpTransportFactory.java?view=markup

You may be able to easily see what is going on, or not going on :-)

Please open an issue to track this and if you have a solution, please
attach a patch.


On 3 June 2011 13:37, Amir <a....@gmail.com> wrote:
> Well, its for research purposes. We've developed an end-to-end reliability
> protocol for unreliable pub/sub and we've decided to evaluate the protocol
> with ActiveMQ in unreliable settings. (UDP).
> At this point I'm almost certain this is a bug in ActiveMQ. I was hoping 5.5
> would fix the bug but it still exists, since 5.4 or maybe even before.
>
> -Amir
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p3570726.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
http://fusesource.com
http://blog.garytully.com

Re: UDP Transport connector binds to a random port number.

Posted by Amir <a....@gmail.com>.
Well, its for research purposes. We've developed an end-to-end reliability
protocol for unreliable pub/sub and we've decided to evaluate the protocol
with ActiveMQ in unreliable settings. (UDP).
At this point I'm almost certain this is a bug in ActiveMQ. I was hoping 5.5
would fix the bug but it still exists, since 5.4 or maybe even before. 

-Amir


--
View this message in context: http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-listens-on-a-random-port-number-tp3570237p3570726.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: UDP Transport connector binds to a random port number.

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

any particular reason for using UDP protocol?

Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net

Connect at CamelOne <http://camelone.com/> May 24-26

The Open Source Integration Conference



On Fri, Jun 3, 2011 at 10:01 AM, Amir <a....@gmail.com> wrote:

> Hi all,
>
> I'm having problem getting ActiveMQ 5.4.* and 5.5 to run properly with UDP
> transport connector. What happens is that the broker listens to a random
> UDP
> port number instead of the one I configure in the URI. The port number
> seems
> to be randomly chosen, since it changes each time the broker is restarted.
> Interestingly, the management console indicates that the broker's listening
> on the configured port number but netstat shows another UDP port number.
> Any
> idea ?
>
> -Amir
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/UDP-Transport-connector-binds-to-a-random-port-number-tp3570237p3570237.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>