POA is bound to the same port two times - using both IPv6 and IPv4 listeners.

POA is bound to the same port two times - using both IPv6 and IPv4 listeners.

Problem:

  • Product Name: VisiBroker C++
  • Product Version: 6.5 and later
  • Product Component: Connection Management
  • Platform: All

POA is bound to the same port two times using both IPv6 and IPv4 address families.

VisiBroker C++ Server objects found to be using IPV6 Address family by default when portRange property is set. Server POA is binding to both IPV4 and IPv6 listener sockets.

Consider that port x is free and y>=1.

Start server with IIOP listener set to port_x and port range y:

vbroker.se.iiop_tp.scm.iiop_tp.listener.port=port_x
vbroker.se.iiop_tp.scm.iiop_tp.listener.portRange=y

Server will first bind to IPV6: port_x

AND AGAIN THE SAME IPV4: port_x

Ideally, server shall bind to IPV4 port.

The above described behavior is spotted even if IPv6 is not enabled at the system.

Other Symptoms:

1.

In applications using SSL, a Client may get NO_PERMISSION exception. Run the secure server with following properties:

vbroker.se.iiop_tp.scm.iiop_tp.listener.port=33333
vbroker.se.iiop_tp.scm.iiop_tp.listener.portRange=9
vbroker.se.iiop_tp.scm.ssl.listener.port=44444
vbroker.se.iiop_tp.scm.ssl.listener.portRange=9

The SecureServer opens a listener with IPv6 but IPv6 is not enabled at the system. The SecureClient always gets a NO_PERMISSION exception as Client used the IPv4 address family:

Exception: CORBA::NO_PERMISSION
Minor: 1447174771
Completion Status: NO

2.

Start two "basic\bank_agent" Servers with the following properties:

vbroker.se.default.socket.listener.port=63420
vbroker.se.default.socket.listener.portRange=10

Use "lsof" tool to verifies the problem, the output looks like the following:

Server  5144 lsilva  10u IPv4 0x300003b1cb8  0t0  TCP *:63420 (LISTEN)
Server  5322 lsilva  10u IPv6 0x300024f5e50  0t0  TCP *:63420 (LISTEN)

Both Servers are started on port 63420 except they are on different address families.

Resolution:

This bug has already been addressed in VB6.5 P12 and VB7.0P1 through CR7977 (Disabling creating IPv6 listeners via a property setting). CR7977 introduced a property "vbroker.connection.onlyListenIPv4=true". Using this new property one can prevent the automatic usage of IPv6 and the double usage of same listener ports.

This CR provides a property based workaround for following issue:
In a dual stack IPv4 and IPv6 system the port numbers returned by the system API, say port 1234 for IPv6 does not mean that port 1234 for IPv4 is also available. ORB is missing this check and thus we are able to start a Server on port ipv4:1234 and start another Server on port ipv6:1234. Ideally, only one particular server should be able to bind to port 1234 regardless of which address family stack is being used (i.e. IPv4 or IPv6).

CR7977 provides a workaround that enforces VisiBroker C++ to use IPv4 addresses thereby ensuring that all ports obtained are truly unique. This property help enforce the use of either of the address families.

Steps to disable the usage of IPv6

1. The fix for CR7977 is available in VB6.5 SP12 and VB7.0 SP1 or later.

2. Start the VBC65 Server with the following properties:

vbroker.connection.onlyListenIPv4=true
vbroker.se.default.socket.listener.port=63420
vbroker.se.default.socket.listener.portRange=10

3. The "lsof" output should look something like this:

Server    5144 lsilva   10u? IPv4 0x300003b1cb8    0t0    TCP *:63420 (LISTEN)
Server    5330 lsilva   10u? IPv4 0x300010c27c8    0t0    TCP *:63421 (LISTEN)

Notice that the second Server is started on port 63421.

Please note that the "vbroker.connection.onlyListenIPv4" property is removed from the VisiBroker 8.5 C++ onwards to support "Pure" IPv6 deployment environment. It is superseded by the new property:

vbroker.se.<SE_name>.scm.<SCM_name>.listener.preferIPv4Stack

Related article: [[knowledge_base:Disable IPv6 Lookups|Disable IPv6 Lookups]]

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 20:02
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.