Wednesday, September 2, 2009

How to patch Sun Portal Server in Application Server Cluster


We were tasked to apply the latest patch for Sun Portal Server 7.1 last week. The challenge is the Sun Portal Servers were deployed in a Sun Application Server Cluster as illustrated below:



We need to be a little careful. Otherwise, rolling back will be a nightmare!

So we get started with a single-box patch. All went fine - very simple. 

root@portal # patchadd /var/spool/patch/124302-13
root@portal # cacaoadm stop; cacaoadm start
root@portal # /opt/SUNWportal/bin/psupdate -a

Not forgetting to start JavaDB if you have not started it. (Even if you do not use it, you need to start it before psupdate. Otherwise, it will complain!)

 root@portal # java -cp /opt/SUNWjavadb/lib/derby.jar:/opt/SUNWjavadb/lib/derbytools.jar:/opt/SUNWjavadb/lib/derbynet.jar 
-Dderby.system.home=/var/opt/SUNWportal/derby org.apache.derby.drda.NetworkServerControl start



Great! Confidence gained... so we pushed on for application-cluster-aware patch.

Now, a little deeper understanding of how psupdate and web-app deploy work are required. 

  1. psupdate actually attempt to deploy Portal codes as web-applications.
  2. Deploying of web-applications in a Sun Application Cluster requires deployment from DAS (Domain Administration Server) and it should be done once for all nodes in the cluster
So we need to conduct the patch in the following sequence:
1. Directory Data Backup
2. File-level Backup on node 1 and node 2
3. Run patchadd on node 1
4. Run patchadd on node 2
5. Using DAS, modify from -XX:MaxPermSize=192M to -XX:MaxPermSize=300M. Restart cluster 
6. Restart CACAO on node 1
7. Restart CACAO on node 2
8. Start JavaDB on node 1 
9. Start JavaDB on node 2 
10. Run psupdate only on node 1
11. Stop JavaDB on node 1  (since we do not use it)
12. Stop JavaDB on node 2  (since we do not use it)
13. Using DAS, stop cluster
14. Restart CACAO on node 1
15. Restart CACAO on node 2
16. Using DAS, start cluster

Done! Not too difficult if you get the concept right.



If your organization requires a Portal solution, talk to us. We have an experienced team well-versed with Sun Portal technology. Not forgetting, LifeRay Portal technology. I'm reachable at cheechong @ azimuthlabs.com.sg

1 comment:

  1. That was remarkable post. I like to read articles that are edifying for they enriched my mind with different knowledge that makes me a better person. These articles especially about recent events, technologies, news, tips and technical skills are the topics that I adore. Keep it up and more power to your website. I look forward for your next article.Thanks Jennifer Liferay Portal Development

    ReplyDelete