qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adel Boutros <Adelbout...@live.com>
Subject Re: [Java Broker] Port 0 range
Date Tue, 14 Mar 2017 16:47:38 GMT
Hello Rob,

I think I wasn't clear enough. Sorry for that.

As referenced here[1], there are registered ports which are dynamic ports however they identify
a know service (5672 is one of them).

What I am talking about are private dynamic ports (ephemeral ports) which are not registered
and to be used internally.

As this is not a requirement useful for all users of the Broker, I was wondering if there
was a way to specify a certain port range for the broker to get an available port from it
and which is a lot more restrictive than the full dynamic range.

[1]: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

From: Rob Godfrey <rob.j.godfrey@gmail.com>
Sent: Tuesday, March 14, 2017 5:25:56 PM
To: users@qpid.apache.org
Subject: Re: [Java Broker] Port 0 range

So, the Broker is simply using the Java mechanism... and the Java mechanism
is (I presume) just obeying the settings in your operating system.  Which
operating system are you seeing the broker pick "low" ports on, and how is
that operating system configured with respect to the "dynamic" port
range[1]?  What sort of "low" numbers are you getting... which operating
system are you seeing this on... and does the port number you are seeing
lay outside the OS settings for dynamic port assignment?

-- Rob

[1] According to this (
StackOverflow question, the following commands can be used to get the
operating system settings:

  cat /proc/sys/net/ipv4/ip_local_port_range
  netsh int ipv4 show dynamicport tcp
  sysctl net.inet.ip.portrange.first net.inet.ip.portrange.last
  /usr/sbin/ndd /dev/tcp tcp_smallest_anon_port tcp_largest_anon_port

On 14 March 2017 at 16:56, Adel Boutros <Adelboutros@live.com> wrote:

> Hello,
> We are asked to deploy broker on random ports. So we thought about using
> Port 0 and let the Broker find available ports.
> This works as expected however we have a concern with the port range.
> It seems by default Java will take any port outside the well known ports
> and assign it. However, in large environments, services are requested to
> use private/dynamic ports (range 49152 to 65535 as specified by the
> Internet Assigned Numbers Authority).
> So I was wondering if there was a way to make the broker respect this port
> range when it is passed a port value of 0?
> Maybe allow the user to pass a property defining the range of ports
> available.
> What do you think?
> Regards,
> Adel

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message