How-to: rolling upgrade WebLogic 11g to 12cPublished on: Author: Maarten Droogendijk Category: Java & Web
A lot of companies are currently working on upgrading Weblogic 11g to 12c. In this blog you can read how the upgrade can be done like a rolling upgrade. With the presented plan you can perform a rolling upgrade with nearly no downtime at all.
For a customer in The Netherlands, Qualogy was asked to help in an upgrade of the WebLogic 11g platform to 12c. There was requested to do this like a rolling upgrade. However, Oracle only supports rolling upgrades for individual patches, patch bundles, and patch set updates. It turns out that a rolling upgrade can be done with only minor adjustments to the upgrade plan.
A common approach is building a new environment next to the current one. The traffic will then be switched gradually from the current environment to the new one. This is a solid, but also resource intensive approach, as it requires additional machines. Using the rolling upgrade we can keep using the same machines and thus annul the cost and hassle of (temporary) extra machines.
In our case the WebLogic environment is located behind two Apache servers. The Apache servers will loadbalance the http(s) traffic between the Managed Servers. In turn, the traffic for the Apache servers is loadbalanced by a hardware loadbalancer.
A rolling upgrade means we will do the upgrade one node at a time. To minimize downtime the traffic will be diverted to the other node, until the node has been successfully upgraded. It is necessary to block the internal WebLogic communication between the 12c environment and the 11g environment. If this is not done, issues can arise when deploying to clusters.
Also the following error can appear in your logfiles:
This can be prevented by using iptables rules as shown below. These rules can later be removed by replacing the -A with -D.
The upgrade itself can be done in multiple ways. Oracle also provides the WebLogic Upgrade Wizard. It is best to read this Oracle documentation to see which steps are relevant for your environment.
The outline of an upgrade from WebLogic 11g to 12c is displayed below:
- Configure http2 to only send the traffic to the Managed Server on Node2, including a graceful restart of http2.
- Redirect all traffic from the loadbalancer to http2. Alternative: shutdown http1.
- Shutdown the Managed Server running on node1.
- Shutdown the Admin Server.
- Add the iptables rules on node2 to block all communication between node2 and the other servers in the domain.
- Upgrade the Admin Server to 12c.
- Start the Admin Server.
- Upgrade the Managed Server on node1 to 12c. (incl. Node Manager)
- Start the Managed Server on node1.
- Perform a regression test on node1.
- Configure http1 to only send the traffic to the Managed Server on node1, including a graceful restart of http1.
- Redirect all traffic from the loadbalancer to http1. Alternative: shutdown http2.
- Shutdown the Managed Server running on node2.
- Remove the previously added iptables rules.
- Upgrade the Managed Server on node2 to 12c. (incl. Node Manager)
- Start the Managed Server on node2.
- Perform a regression test on node2.
- Configure http1 and http2 to send the traffic to the Managed Servers running on node1 and node2, including graceful restarts.
- Configure the loadbalancer to direct the traffic to both http1 and http2.
I want to thank Thijs Kaper for his part in solving the issues and performing the upgrade.