Configuring IPv6
This appendix describes how to configure IPv6.
Introduction
Use the following steps to configure JEUS in IPv6 environment.
-
Modify the jeus.properties, jeusadmin, startMasterServer, startManagedServer, stopServer, startderby, stopderby, mcastReceiver, and mcastSender scripts.
-
Modify domain.xml.
-
Verify operation.
The loopback address must be set to "::1" in the 'hosts' file of the server. |
The 'hosts' file is located in the following paths, depending on the OS.
-
UNIX
/etc
The following is a sample 'hosts' file.
[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
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: startMasterServer, startManagedServer
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, 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.
-
If the address of listen-address is set to IPv4, then change it to IPv6.
<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>
-
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.
<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>
-
Add java.net.preferIPv4Stack=false and java.net.preferIPv6Addresses=true to the vm-option for each server.
<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>