NullPointerException In TcpRing.ensureSelector When port-auto-adjust=false And Another Node Running On The Same Machine Is Using The Next Highest Port As This Node (Doc ID 1263748.1)

Last updated on NOVEMBER 03, 2016

Applies to:

Oracle Coherence - Version 3.6.0 and later
Information in this document applies to any platform.

Symptoms

There are multiple Coherence nodes configured to run on the same machine all with tangosol.coherence.localport.adjust=false.

For example:

Nodetangosol.coherence.localport
Node 1 6000
Node 2 6001

 

 

 

 

Node 1 can be started with no error, but on trying to start Node 2 the following exception is reported:

Error while starting cluster: java.lang.NullPointerException
at com.tangosol.coherence.compon ent.net.TcpRing.ensureSelector(TcpRing.CDB:7)
at com.tangosol.coherence.component.net.TcpRing.setServerSocketChannel(TcpRing.CDB:20)
at com.tangosol.coherence.component.net.Cluster.onStart(Cluster.CDB:510)
at com.tangosol.coherence.component.net.Cluster.start(Cluster.CDB:11

Trying with different port combinations for Node 1 and Node 2 gives different results:

6000/6001 -- fails
6600/6601 -- fails
6000/6601 -- works
6600/6001 -- works
6000/6002 -- works
6600/6602 -- works

Changes

This used to work fine until Coherence 3.6.0 Patch1, but is failing in Coherence 3.6.0 Patch2 and later. 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms