JAVA upgrade

From Swivel Knowledgebase
Revision as of 12:52, 11 May 2017 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Overview

Please Note: Upgrading the Appliance to version 2.0.16 will automatically upgrade Java to version 1.6.0_30.

It is not recommended to upgrade the JAVA on a Swivel appliance without first having spoken to Swivel support.

How to upgrade the currently installed version of JAVA on a Swivel Appliance.

Prerequisites

Swivel appliance, and extensive Linux command line knowledge. Updating the installed version of JAVA could have serious consequences and it is recommended that only Swivel staff, or accredited resellers perform the work.

Each Swivel instance including Active/Active, DR, and Active/Passive appliances will need to be upgraded.


Symptoms

Upgrade JAVA in order to run Swivel 3.6 or later.


Solution

1. Login to appliance through the CMI and access the Command Line.

2. change to the /usr/java directory

 cd /usr/java

3. Download java from www.sun.com. Recommended version jre-6u18-linux-i586-rpm.bin. Example URL from Sun website.

 wget -O jre-6u18-linux-i586-rpm.bin http://javadl.sun.com/webapps/download/AutoDL?BundleId=37391

4. Change file permission to ensure downloaded file is executable:

 chmod 755 jre-6u18-linux-i586-rpm.bin

5. Stop Tomcat (note on Active/Active and Active/Passive appliances on the standby stop Mon and Heartbeat, and on the standby stop Mon only)

 service tomcat5 stop

6. Unpack the java bin file

 ./jre-6u18-linux-i586-rpm.bin

7. Take a copy then edit /etc/profile and search for ‘java’. Replace all instances of the directory path with ‘/usr/java/<new version>’.

 mc /etc

Scroll down the section where all the file names are in grey and locate "profile". Next, press F4 to edit the file.

After which, press F7 to enable a search and enter "java".

Change

export JAVA_HOME=/usr/java/jre1.5.0_11 export PATH=$PATH:/usr/java/jre1.5.0_11/bin

To:

export JAVA_HOME=/usr/java/jre1.6.0_18 export PATH=$PATH:/usr/java/jre1.6.0_18/bin


8. Edit /etc/init.d/tomcat5 and search for ‘java’. Replace all instances of the directory path with ‘/usr/java/<new version>’

change

export JAVA_HOME=/usr/java/jre1.5.0_11

to

export JAVA_HOME=/usr/java/jre1.6.0_18


9. Start Tomcat

 service tomcat5 start

10. Check the Tomcat process is using /usr/java/<new version>

 ps –eaf | grep tomcat

Example, Old Version:

ps -eaf | grep tomcat

swivel 11995 1 73 17:42 pts/0 00:00:10 /usr/java/jre1.5.0_11/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/apache-tomcat-5.5.20/conf/logging.properties -Djava.endorsed.dirs=/usr/local/apache-tomcat-5.5.20/common/endorsed -classpath :/usr/local/apache-tomcat-5.5.20/bin/bootstrap.jar:/usr/local/apache-tomcat-5.5.20/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/apache-tomcat-5.5.20 -Dcatalina.home=/usr/local/apache-tomcat-5.5.20 -Djava.io.tmpdir=/usr/local/apache-tomcat-5.5.20/temp org.apache.catalina.startup.Bootstrap start root 12082 11451 0 17:42 pts/0 00:00:00 grep tomcat


Example, New Version:

ps -eaf | grep -i tomcat

swivel 12663 1 99 17:52 pts/1 00:00:07 /usr/java/jre1.6.0_18/bin/java -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.util.logging.config.file=/usr/local/apache-tomcat-5.5.20/conf/logging.properties -Djava.endorsed.dirs=/usr/local/apache-tomcat-5.5.20/common/endorsed -classpath :/usr/local/apache-tomcat-5.5.20/bin/bootstrap.jar:/usr/local/apache-tomcat-5.5.20/bin/commons-logging-api.jar -Dcatalina.base=/usr/local/apache-tomcat-5.5.20 -Dcatalina.home=/usr/local/apache-tomcat-5.5.20 -Djava.io.tmpdir=/usr/local/apache-tomcat-5.5.20/temp org.apache.catalina.startup.Bootstrap start root 12687 12586 0 17:52 pts/1 00:00:00 grep -i tomcat


11. Check Swivel works

Login to the Administration console.


Troubleshooting

Check the Tomcat logs in /var/log/tomcat Check for any typos in

 /etc/init.d/tomcat5
 /etc/profile