Salesforce

How to set which IPv4 or IPv6 stack is used for a specific service in OpenEdge?

« Go Back

Information

 
TitleHow to set which IPv4 or IPv6 stack is used for a specific service in OpenEdge?
URL NameP168389
Article Number000132191
EnvironmentProduct: OpenEdge
Version: 10.1C, 10.2x, 11.x
OS: All Supported Operating Systems
Other: Ipv4, Ipv6
Question/Problem Description
How to set which iPv4 or iPv6 stack is used for a specific service in OpenEdge?
How to force an AppServer Broker to make use of an iPv6 protocol?
Can the same application environment (Databases and AppServers) be available to both ipv4 and ipv6 clients?
Application configuration needed for clients who connect through an ipv6 vpn tunnel and the rest use the ipv4 network.
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
An OpenEdge processes can use IPv4 or IPv6.  While IPv4 is the default Protocol Stack since we introduced it in OpenEdge 10.1C, IPv6 must be explicitly requested at startup in the related server properties file or in the process startup parameters: "-ipver=IPv6". 

The following jvmargs Options are added to limit which Protocol Stack is used by specific OpenEdge services in the following configuration files.
  • JavaTools.properties, for all RMI based tools (asbman, nsman, dbman, wbtman etc)
  • AdminServerPlugins.properties, for all AdminServer Plugins including the AdminServer itself
  • conmgr.properties, for all OpenEdge Databases
  • ubroker.properties, for all Brokers (AppServer, WebServer, NameServer etc)
To limit the Protocol Stack to iPv4: 

iPv4 does not have to be specified as this is the default unless otherwise specified but there are network topologies (for example where the DNS has been setup for iPv6) that will cause communications to timeout or fail unless expressly configured:
 
-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false

To limit the Protocol Stack to iPv6: 

iPv6 needs to be explicitly stated to overide the defatult iPv4 protocol:
 
-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true

The following examples show the property changes needed for iPv6, for the sake of brevity these can be reversed if JMV IPv6 lookups need to be  disabled as outlined above (-Djava.net.preferIPv4Stack=true)

OpenEdge Database

1.   Through the OpenEdge Console, set iPv6 in the servergroup section, 
TCP/IP Version: iPv6 

or manually add "ipver=IPv6" by editing the servergroup section in the conmgr.properties file:
 
[servergroup.<dbname>.defaultconfiguration.defaultservergroup] 
...
ipver=IPv6

2.   If the database is not managed by the AdminServer, add the -ipver=IPv6 parameter to the database startup scripts

RMI based command utilities:
 
DLC/properties/JavaTools.properties
[Common]

jvmargs=-ms8m –mx25m -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true

UBrokers (AppServer, WebSpeed, NameServer)

Apart from setting "ipver=IPv6" in the ubrokers.properties section for the uBroker,
The jvmArgs property must also be set in the related Environment section of the ubroker.properties file to override the default iPv4 behavior of the JVM for IPv6 connections. 

For all Unified Broker instances, add "ipver=IPv6" to:
the [UBroker] default Section and 
the [Environment] Default Environment setting for all unified broker instances

For all Broker instances serving a specifc Service eg: AppServers, add "ipver=IPv6" to
the [UBroker.AS] default AppServer Section and
the [Environment.AS] Default AppServer Environment setting for all AppServer Broker instances

For Specific Broker instances, add "ipver=IPv6" to
the [UBroker.AS.<Broker name>] specific AppServer Section and
the [Environment.AS.<Broker name>] specific AppServer Environment setting

Example:
[Environment.asbroker1
TESTENV=MYENV 
jvmArgs=-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true

[UBroker.AS.asbroker1]
...
ipver=IPv6 


AdminServer

To limit which Protocol Stack is used by all Services defined in the AdminServerPlugins.properties file, the jvmargs property can be set in the [PluginPolicy] Section:
 
#   AdminServerPlugins.properties:
[PluginPolicy]
...
    jvmargs=-Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true

Or start the AdminServer with the ipver switch set to ipv6.  
$   proadsv -start -ipver ipv6

To limit the which Protocol Stack is used by specific Services, the additional arguments to the jvmargs can  be added to only those specific policies. 

Example: 
#   AdminServerPlugins.properties
[PluginPolicy.Progress.AdminServer] and [PluginPolicy.Progress.Proapsv]

...
    jvmargs=-Xmx1024m <+current jvmargs defined> -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true
    port=20946
    adminport=7846


Clients:
  • The Network Adapter needs to be setup for iPv6, it is by default on most modern systems but it may have been previously disabled.
  • Client startup parameters need to be explicitly changed by adding "-ipver iPv6"  For example, database connections will fail with error 1432 or similar if this parameter is missing from the connection string (or .pf file). Unlike ipv4, the hostname (or IP address) is not ignored when the database Broker is started for IPV6. The broker will monitor the IP address supplied by the -H startup parameter and all servers started by the broker will monitor the same IP address.  This is further clarified in Article:
  • IPv6 allows network connections with IPv6 addresses and mapped IPv4 addresses. OpenEdge supports V4 mapped addresses where underlying Network Topology and Operating System support and exists: UNIX, Linux, and Windows versions Vista and later. Where V4 mapped addresses are supported, a client session can be started with "-ipver IPv6" and connect to a database even if the database server is started with "-ipver IPv4" (the default), although the connection may take a little longer to resolve.
  • To handle both protocols in an Application environment:
    • Two instances of an AppServer Broker for example will need to be configured: one for IPv4 and one for IPv6. The separate AppServers can connect to the same databases and even use the same codebase; they would just be configured for the different protocols. 
    • The OpenEdge database will need separate Login Brokers configured for the different Network protocols. For example the Primary Broker with iPv4 and a Secondary Broker (-m3) with iPv6)
  • To verify that an ipv6 entry exist for a hostname (here for example google.com) the following command can be used: nslookup -query=AAAA google.com   
Workaround
Notes
Keyword Phrase
Last Modified Date7/28/2021 3:00 PM

Powered by