Appendix B. Configuring IPv6

Table of Contents

B.1. Introduction
B.2. Configuring IPv6 Environment

This appendix describes how to configure IPv6.

B.1. Introduction

Use the following steps to configure JEUS in IPv6 environment.

  1. Modify the jeus.properties, jeusadmin, startDomainAdminServer, startDomainAdminServerNM, startManagedServer, stopServer, startNodeManager, stopNodeManager, startderby, stopderby, mcastReceiver, and mcastSender scripts.

  2. Modify domain.xml.

  3. Verify operation.

Note

The loopback address must be set to "::1" in the 'hosts' file of the server.

he 'hosts' file is located in the following paths, depending on the OS.

  • Windows

    C:\WINDOWS\system32\drivers\etc
  • UNIX

    /etc

The following is a sample 'hosts' file.

[Example B.1] hosts

[jeusqa@ipv6linux /home/jeusqa]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1              localhost
#::1    localhost6.localdomain6 localhost6
::1     localhost


Warning

When using JDK 6 in Windows, the IPv6 environment may not run properly due to a Java bug. Therefore it is recommended that JDK 7 is used. For more information, refer to http://bugs.java.com/view_bug.do?bug_id=6230761.

B.2. Configuring IPv6 Environment

This section describes the environment configurations for IPv6. IPv6 environment configurations are different for each file.

Changing a File in JEUS_HOME/bin

  • File name: startDomainAdminServer, startManagedServer, startNodeManager

    Add -Djava.net.preferIPv6Addresses=true and -Djava.net.preferIPv4Stack=false where -classpath is written.

    • Example

      -classpath .........                                                    \
      -Djava.net.preferIPv6Addresses=true                                     \
      -Djava.net.preferIPv4Stack=false                                        \
      
  • File name: mcastReceiver, mcastSender

    • Existing environment variable

      -Djava.net.preferIPv4Stack=true                                        \
    • Updated environment variables

      -Djava.net.preferIPv6Addresses=true                                     \
      -Djava.net.preferIPv4Stack=false                                        \
      
  • File name: jeusadmin, startDomainAdminServerNM, stopNodeManager, stopServer

    • Existing environment variable

      "${JAVA_HOME}/bin/java" -classpath "${BOOTSTRAP_CLASSPATH}" ${TOOL_OPTION}      \
    • Updated environment variables

      "${JAVA_HOME}/bin/java" -classpath "${BOOTSTRAP_CLASSPATH}" ${TOOL_OPTION}      \
      -Djava.net.preferIPv6Addresses=true                             \
      -Djava.net.preferIPv4Stack=false                                \
      
  • File name: jeus.properties

    • Existing environment variable

      TOOL_OPTION="-Djeus.tm.not_use=true  -Djava.net.preferIPv4Stack=true"
    • Updated environment variables

      TOOL_OPTION="-Djeus.tm.not_use=true -Djava.net.preferIPv6Addresses=true -Djava.net.preferIPv4Stack=false"
  • File name: startderby, stopderby

    • Existing environment variable

      -Dderby.system.home="${JEUS_HOME}/derby/databases"              \
    • Updated environment variables

      -Dderby.system.home="${JEUS_HOME}/derby/databases"              \
      -Djava.net.preferIPv6Addresses=true                             \
      -Djava.net.preferIPv4Stack=false                                \
      

Changing domain.xml

Modify and add JEUS_HOME/domains/DOMAIN_NAME/config/domain.xml file as shown in the following example.

  1. If the address of listen-address is set to IPv4, then change it to IPv6.

    • Example

      <listeners>
         <base>BASE</base>
         <listener>
         <name>BASE</name>
         <listen-address>0:0:0:0:0:0:0:0</listen-address>
         <listen-port>9736</listen-port>
         <selectors>1</selectors>
         <use-dual-selector>false</use-dual-selector>
         <backlog>128</backlog>
         <select-timeout>120000</select-timeout>
         <read-timeout>30000</read-timeout>
         <reserved-thread-num>0</reserved-thread-num>
      </listener>
      
  2. If the address of heartbeat-address is set to IPv4, then change it to IPv6 as shown in the following example. If no configuration has been set, then add the following information.

    • Example

      <group-communication-info>
         <heartbeat-address>FF02:0:0:0:0:0:0:0</heartbeat-address>
         <heartbeat-port>3030</heartbeat-port>
         <use-virtual-multicast>false</use-virtual-multicast>
      </group-communication-info>
      

  3. Add java.net.preferIPv4Stack=false and java.net.preferIPv6Addresses=true to the vm-option for each server.

    • Example

      <jvm-config>
         <jvm-option>-Xmx1024m -XX:MaxPermSize=256m</jvm-option>
         <jvm-option>java.net.preferIPv4Stack=false</jvm-option>
         <jvm-option>java.net.preferIPv6Addresses=true</jvm-option>
      </jvm-config>