How-to: rolling upgrade WebLogic 11g to 12c
Published on: Author: Maarten Droogendijk Category: Java & WebA 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.
![](/static/upload/center-mw/f256900a-6779-9cc9-ba05-2514961c1dcf/1+weblogic-12c.png)
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.
The environment
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.
![The WebLogic environment (simplified)](/static/upload/center-mw/c8d2b24c-a7ad-7fc7-8427-ae75c7a3270d/2+The-WebLogic-environment-simplified-300x106.png)
How-to
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:
java.lang.NullPointerException
at weblogic.cluster.messaging.internal.GroupManagerImpl.mapServerNameToGroupNo(GroupManagerImpl.java:182)
This can be prevented by using iptables rules as shown below. These rules can later be removed by replacing the -A with -D.
![The iptables rules illustrated](/static/upload/center-mw/39d460e7-90dd-1da7-1223-78e812fcea80/3+Added-iptables-rules1-300x106.png)
The plan
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.
You wrote:
"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."
Does that not only apply to a cluster communication with unicast and not multicast? Since multicast should use backward compatibility .
source quote:
"Note: When creating a new cluster, it is recommended that you use unicast for messaging within a cluster. For backward compatibility with previous versions, WebLogic Server you must use multicast for communications between clusters."
source site:
https://docs.oracle.com/cd/E11035_01/wls100/cluster/features.html
Please share the detailed steps.