Upgrading to Eclipse GlassFish 8
1 Upgrading an Installation of Application Server or Eclipse GlassFish
This section explains how to upgrade to Eclipse GlassFish 8 from a previous version. The process involves replicating your existing configuration and applications in the new installation.
Key Topics
Upgrade Paths
Choose one of the following upgrade paths:
- Side-by-Side (Recommended)
-
Installs the new version in a separate directory, allowing you to test before switching to production.
Steps:-
Install Eclipse GlassFish 8 in a new directory.
-
Manually copy the configuration from the old installation.
-
Test the new installation.
-
Update your production environment to use the new installation.
-
- In-Place (Not Recommended)
-
Replaces the existing installation. Requires manual steps and significant downtime.
Steps:-
Move the current installation to a backup directory.
-
Install Eclipse GlassFish 8 in the original location.
-
Manually copy the configuration from the backup.
-
Test the new installation. If issues arise, restore the backup.
-
Upgrade Procedure
Use the Upgrade Tool (asadmin start-domain --upgrade) to migrate configurations and applications.
Prerequisites
-
Stop all domains on the source server.
-
Install Eclipse GlassFish 8 (see Eclipse GlassFish Installation Guide).
-
Copy custom/third-party libraries from the old installation to the new one.
Steps
-
Install Eclipse GlassFish 8 in a new directory.
-
Copy configurations from the old installation:
-
Domain directory (e.g.,
glassfish/domains/domain1) -
Nodes directory (if applicable, e.g.,
glassfish/nodes)
-
-
Run the Upgrade Tool:
asadmin start-domain --upgrade` -
Start the upgraded domain:
asadmin start-domain domain-name` -
Verify the upgrade by logging into the Admin Console.
Special Cases
Upgrade of Clusters
When upgrading from a clustered configuration, the older cluster
information is retained in a new domain.xml file in the Eclipse GlassFish 8 installation directories. However, it is still necessary to
manually re-create the server instances that are contained in the
clusters.
To do that:
-
Perform new (not upgrade) Eclipse GlassFish 8 installations on each node host. Eclipse GlassFish 8 installation instructions are provided in the Eclipse GlassFish Installation Guide.
-
Correct the node configuration on the upgraded DAS, if necessary. This procedure is described in Correcting Cluster configuration.
-
Start the upgraded DAS.
asadmin> start-domain domain-nameIf the upgrade succeeded, the migrated cluster configuration exists and the
get-healthsubcommand lists the status of the clustered instances as not running. -
Confirm that the cluster configuration exists and contains all its instances.
asadmin> get-health cluster-nameFor example, for the sample
cluster1used in this procedure:asadmin> get-health cluster1 instance1 not started instance2 not started Command get-health executed successfully. -
Re-create the clustered server instances on each instance host.
The specific commands to use depend on your configuration.-
If remote hosts cannot contact the DAS, export and import the instances' configuration data, as explained in " To Resynchronize an Instance and the DAS Offline" in Eclipse GlassFish High Availability Administration Guide.
-
If remote hosts can contact the DAS, create each instance individually and resynchronize the instance with the DAS, as explained in the following sections:
-
" To Create an Instance Locally" in Eclipse GlassFish High Availability Administration Guide
-
" To Resynchronize an Instance and the DAS Online" in Eclipse GlassFish High Availability Administration Guide
Note that the node name matches that used for the node agent in the 2.x installation. If you get an error stating that some attributes do not match the values in the DAS configuration, follow the instructions in Correcting Cluster configuration.
-
-
-
After creating the instances, manually copy the instance-dir
/imqdirectory for each instance from the older source installation to the target Eclipse GlassFish 8 installation. -
If necessary, start the cluster.
For example:asadmin> start-cluster cluster1This step may or may not be necessary, depending on the procedure you used to create the server instances for the cluster.
Example 2-3 Creating Two Local Instances
The following example shows how to create two local instances in a cluster.
host1$ asadmin --host dashost create-local-instance --node na1 --cluster cluster1 instance1
host2$ asadmin --host dashost create-local-instance --node na2 --cluster cluster1 instance2
dashost-
The name of the DAS host.
na1-
The name of the node host.
cluster1-
The name of the cluster.
instance1,instance2-
The names of the instances.
Correcting Cluster configuration
Eclipse GlassFish 8 does not support node agents. If you’re upgrading from a version that supports them or you have issues in cluster configuration after an upgrade, after upgrading the DAS:
-
Install Eclipse GlassFish 8 on each node host.
-
Correct node configurations using
update-node-configorupdate-node-ssh. -
Re-create clusters and instances:
-
Use
create-local-instancefor each instance. -
Copy the
imqdirectory from the old installation.
-
Upgrading Installations Using NSS Cryptographic Tokens
Eclipse GlassFish 8 does not support NSS. If you’re upgrading from a version that supports them, follow these steps:
-
Prepare for Upgrade:
-
Install Eclipse GlassFish 8 in a new directory.
-
Copy the source domain to the new installation.
-
Update
domain.xmlto remove NSS references and add JKS keystore paths.
-
-
Perform Post-Upgrade Configuration:
-
Migrate NSS keys to PKCS#12 using
keytoolandcertutil. -
Update the master password if needed.
-
-
Upgrade PKCS#11 Hardware Tokens:
-
Configure the token using JDK-JSSE mechanisms.
-
Update
domain.xmlto reference the hardware token.
-
Troubleshooting
Terminology
- Source Domain Directory
-
Directory of the domain being upgraded (e.g.,
c:\glassfish\domains\domain1). - Target Root Domain’s Directory
-
Directory where domains are created in the new installation (e.g.,
c:\glassfish8\glassfish\domains). - Master Password
-
SSL certificate database password (default:
changeit).