Upgrading GlassFish 3.1.1 to 3.1.2 on Oracle Linux 6.2 64-bit

Environment: GlassFish 3.1.1 Open Source Edition (Web Profile), Oracle Linux 6.2 64-bit, Application Express 4.1.1

There are 3 ways to upgrade GlassFish v3.1.1 to v3.1.2: by using the graphical Update Tool, by using the graphical Software Update Notifier, or by using the command-line version of the Update Tool: pkg. All these tools need to be installed first before they can be used.

In my environment, I have one domain administration server (DAS) and one local instance (“instance01″) under which Application Express 4.1.1 (APEX) is deployed. I didn’t cover the upgrade of clusters in this blog post. I refer to the complete GlassFish 3.1.2 Upgrade Guide for more information.

1) Upgrading GlassFish with the Update Tool

If you didn’t install the Update Tool yet, you can do this by running the updatetool command in your glassfish/bin folder. This will download and install the required software packages. Note: your server needs internet access for this!


oracle@ol6ora11g02 /u01/app/glassfish/bin>./updatetool

The software needed for this command (updatetool) is not installed.

If you choose to install Update Tool, your system will be automatically
configured to periodically check for software updates. If you would like
to configure the tool to not check for updates, you can override the
default behavior via the tool's Preferences facility.

When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:

http://wikis.sun.com/display/updatecenter/UsageMetricsUC2

Once installation is complete you may re-run this command.

Would you like to install Update Tool now (y/n):

Proxy: Using system proxy settings.
Install image: /u01/app/glassfish
Installing pkg packages.
Downloading 3 packages.
Downloading pkg (511 files, 6,237,937 bytes).
File 511/511
Downloading pkg-java (5 files, 204,325 bytes).
File 5/5
Downloading python2.4-minimal (303 files, 6,537,301 bytes).
File 303/303
Executing 1 removal actions.
Executing 13 update actions.
Executing 934 install actions.
Installing updatetool packages.
Downloading 2 packages.
Downloading updatetool (564 files, 4,369,396 bytes).
File 564/564
Downloading wxpython2.8-minimal (317 files, 25,193,712 bytes).
File 317/317
Executing 1,048 install actions.
Registering notifier: Not able to register.  Returned exit code 3.
Starting notifier.
Initialization complete.

Software successfully installed. You may now re-run this command (updatetool).

Everything looks OK, however, when I run the updatetool command, I receive the following error:

/u01/app/glassfish/updatetool/bin/../../pkg/python2.4-minimal/bin/python:
/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Apparently, this is a known issue with Linux 64-bit environments. To fix this error, you need to install the missing 32-bit versions of the libraries. To know which rpm packages contain the missing libraries, use the following command (with user root):

$ yum provides ld-linux.so.2

This will show you that you need to install the rpm package glibc.i686:

$ yum install glibc.i686

After the installation of this package and its dependencies, I received another error… and another one and another one and so on ;-) It’s annoying that there is no list of required libraries mentioned in the documentation (at least I couldn’t find one). In total, I had to download and install (by trial and error) the following rpm packages:

$ yum install glibc.i686
$ yum install libstdc++.so.6
$ yum install libgtk-x11-2.0.so.0
$ yum install libXxf86vm.so.1
$ yum install libSM.so.6
$ yum install libidn.so.11
$ yum install libpk-gtk-module.so
$ yum install libcanberra-gtk-module.so

After this, the Update Tool finally started!

At the bottom right you will see the total size and number of the components that can be upgraded (in my case: 31 components, 43.1 MB). Before I started with the upgrade, I first stopped my local instance and my domain administration server using the asadmin command:

$ ./asadmin stop-instance instance01
The instance, instance01, is stopped.
Command stop-instance executed successfully.
$ ./asadmin stop-domain domain1
Waiting for the domain to stop ...
Command stop-domain executed successfully.

Now I selected all Available Updates and clicked “Install” in the Update Tool.

After the download of all updates, exit the Update Tool and run the following command to upgrade your domain administration server (DAS):

$ ./asadmin start-domain --upgrade domain1

When the upgrade completes successfully, start up the DAS normally and also start any of your local instances:

$ ./asadmin start-domain domain1
$ ./asadmin start-instance instance01

Finally, check if your deployed applications are still working…

2) Upgrading GlassFish with the Software Update Notifier

The Software Update Notifier GUI is installed together with the Update Tool. So, the steps for installation and upgrade are actually comparable. The Software Update Notifier will check on regular intervals if software updates are available. The interval (daily, weekly and so on) can be configured from the “Preferences” menu in the Update Tool GUI. When update are available, a notification window will appear. After this you will be able to select and download updates in the same matter as with the Update Tool. Don’t forget to start your DAS with the –upgrade command line option.

3) Upgrading GlassFish with the pkg command line utility

The pkg utility can be installed by running the pkg command in the glassfish/bin folder:

oracle@ol6ora11g02 /u01/app/glassfish/bin>./pkg

The software needed for this command (pkg) is not installed.

When this tool interacts with package repositories, some system information
such as your system's IP address and operating system type and version
is sent to the repository server. For more information please see:

http://wikis.sun.com/display/updatecenter/UsageMetricsUC2

Once installation is complete you may re-run this command.

Would you like to install this software now (y/n): y

Proxy: Using system proxy settings.
Install image: /u01/app/glassfish
Installing pkg packages.
Downloading 3 packages.
Downloading pkg (511 files, 6,237,937 bytes)
File 511/511
Downloading pkg-java (5 files, 204,325 bytes).
File 5/5
Downloading python2.4-minimal (303 files, 6,537,301 bytes).
File 303/303
Executing 1 removal actions.
Executing 13 update actions.
Executing 934 install actions.
Initialization complete.

Software successfully installed. You may now re-run this command (pkg).

After the installation, I had the same problem as with the installation of the Update Tool (see higher) and I had to install a number of missing libraries (with user root):

$ yum install glibc.i686
$ yum install libstdc++.so.6
$ yum install libz.so.1
$ yum install libidn.so.11
$ yum install libgssapi_krb5.so.2

After this, stop your DAS and any local instances, and run the pkg image-update command:

$ ./asadmin stop-instance instance01
The instance, instance01, is stopped.
Command stop-instance executed successfully.
$ ./asadmin stop-domain domain1
Waiting for the domain to stop ...
Command stop-domain executed successfully.

$ ./pkg image-update
Download: glassfish-web-incorporation ...  Done
Download: jersey ...  Done
Download: javadb-core ...  Done
Download: glassfish-javahelp ...  Done
Download: javadb-common ...  Done
Download: glassfish-web-profile ...  Done
Download: javadb-client ...  Done
Download: glassfish-registration ...  Done
Download: glassfish-jta ...  Done
Download: glassfish-corba-base ...  Done
Download: glassfish-jts ...  Done
Download: glassfish-jsf ...  Done
Download: glassfish-hk2 ...  Done
Download: felix ...  Done
Download: glassfish-jpa ...  Done
Download: glassfish-cluster ...  Done
Download: glassfish-ejb-lite ...  Done
Download: glassfish-jdbc ...  Done
Download: glassfish-gui ...  Done
Download: glassfish-web ...  Done
Download: shoal ...  Done
Download: glassfish-jca ...  Done
Download: glassfish-grizzly ...  Done
Download: glassfish-common ...  Done
Download: glassfish-nucleus ...  Done
Download: glassfish-upgrade ...  Done
Download: glassfish-jcdi ...  Done
Download: glassfish-management ...  Done
Download: glassfish-grizzly-full ...  Done
Download: glassfish-osgi-http ...  Done
Download: glassfish-ha ...  Done
Removal Phase ...  Done
Install Phase ...  Done
Update Phase ...  Done

Now run the following command to upgrade your domain administration server (DAS):

$ ./asadmin start-domain --upgrade domain1

When the upgrade completes successfully, start up the DAS normally and also start any of your local instances:

$ ./asadmin start-domain domain1
$ ./asadmin start-instance instance01

Check the version of GlassFish:

$ ./asadmin version
Version = GlassFish Server Open Source Edition 3.1.2 (build 23)
Command version executed successfully.

Finally, check if your deployed applications are still working…

 

Matthias

Follow

Get every new post delivered to your Inbox.

Join 39 other followers