Hazelcast uses ephemeral port for outbound traffic in spite of configured specific ports
<p><strong>Background:</strong> </p>

<ul>
<li>I am using Hazelcast 3.5.2</li>
<li>3 nodes are configured to be the members of a single cluster</li>
<li><p>each node has following network configuration:</p>

<pre><code>&lt;network&gt;
&lt;port auto-increment="false"&gt;5701&lt;/port&gt;
&lt;outbound-ports&gt;
    &lt;ports&gt;10000-10005&lt;/ports&gt;
&lt;/outbound-ports&gt;
&lt;join&gt;
    &lt;multicast enabled="false" /&gt;
    &lt;tcp-ip enabled="true"&gt;
        &lt;member-list&gt;
            &lt;member&gt;{assume ip of node 1}&lt;/member&gt;
            &lt;member&gt;{assume ip of node 2}&lt;/member&gt;
            &lt;member&gt;{assume ip of node 3}&lt;/member&gt;
        &lt;/member-list&gt;
    &lt;/tcp-ip&gt;
&lt;/join&gt;
</code></pre>

<p></p></li>
<li><p>so, each node has 6 ports for outbound communication, which as per my current understanding of hazelcast, is sufficient for 3 nodes. However, i notice similar to following on each node when doing <em>netstat</em> on each node (assume {n} as some non-zero number)</p>

<p><code>@node1
tcp  {n}  0 {ip of node 1}:5701  {ip of node 2}:35576  ESTABLISHED
tcp  {n}  0 {ip of node 1}:5701  {ip of node 3}:10001  ESTABLISHED
tcp  0  {n} {ip of node 1}:54941  {ip of node 2}:5701  ESTABLISHED
tcp  0  {n} {ip of node 1}:10000  {ip of node 3}:5701  ESTABLISHED
@node2
tcp  {n}  0 {ip of node 2}:5701  {ip of node 1}:54941  ESTABLISHED
tcp  {n}  0 {ip of node 2}:5701  {ip of node 3}:10000  ESTABLISHED
tcp  0  {n} {ip of node 2}:10003  {ip of node 1}:5701  ESTABLISHED
tcp  0  {n} {ip of node 2}:35576  {ip of node 3}:5701  ESTABLISHED
@node3
tcp  {n}  0 {ip of node 3}:5701  {ip of node 1}:10000  ESTABLISHED
tcp  {n}  0 {ip of node 3}:5701  {ip of node 2}:10003  ESTABLISHED
tcp  0  {n} {ip of node 3}:10001  {ip of node 1}:5701  ESTABLISHED
tcp  0  {n} {ip of node 3}:10000  {ip of node 2}:5701  ESTABLISHED</code></p></li>
</ul>

<p><strong>Query:</strong></p>

<ul>
<li>inbound communication config. is well respected by all nodes.</li>
<li>But, two nodes (out of the three) always opens up some ephemeral port for outbound communication (and does not respect the network config set for them.)</li>
<li>Does anyone know why? and how one can circumvent the problem?</li>
</ul>

<p><strong>Note:</strong> I am quite new to hazelcast so please ask for a specific detail in case i have missed to provide.</p>