Whole Server Migration

WSM is the process of moving the entire server instance from one physical machine to another upon failure or scheduled maintenance. All the services being hosted by that particular instance will also be migrated along with it to another healthy server.

Machine configuration for WSM

1. Identify two machines on the same sub net for running Server Migration.

2. Create a local directory for the user. Ensure same directory structure on both the machines.

3. User need to have access to some shared disk between these two boxes (e.g. NFS).

4. Obtain Floating IP addresses that can be shared between the two machines.

5. Establish trust between Machines (SSH/RSH). SSH version should be of same version and needs to be available on both the boxes. Use following commands for that –

cd .ssh

ssh -keygen -t rsa

cat id_rsa.pub >> authorized_keys

Copy authorized_keys dir to .ssh directory of another machine.

6. Get Super-User privileges to add/remove floating IPs.

7. Note the interface name and Netmask of each machine

8. Install WebLogic server on both the machines in the user local home directory.

9. Modify wlscontrol.sh under WL_HOME/common/bin directory to add interface and NetMask.

10. Change Interface=${WLS_Interface:-“”} to Interface=en0
and NetMask=$WLS_NetMask:-“”} to NetMask=255.255.255.0

11. Modify wlsifconfig.sh to hard code value of Sudo. For e.g. SUDO=/usr/bin/sudo

12. Copy wlscontrol.sh and wlsifconfig.sh to /usr/bin (these two files need to be in system path and /usr/bin is always in system path).

Configuring Whole Server Migration

1. Creating clustered domain

Create a multi machine clustered domain with following configuration:

1. Admin server

2. Two managed servers (here ms1 and ms2) with floating IP addresses assigned to them.

3. A cluster with managed servers assigned to it.

4. Two machines (machine1 and machine2). Assign IP address of one of the machines (physical machine) to Node manager listen address of machine1 and IP address of other machine as Node manager listen address of machine2.

5. Assign Admin server and managed server1 to machine1 and managed server2 to machine2.

2. Packing and unpacking of domain

Now pack this domain and unpack it under same directory structure in second machine.

Execute Following command under $WL_HOME/common/bin dir to pack this domain.

pack.sh –managed=true –domain=<domain name> -template=<domain_name.jar> -template_name=”<description>”

 Now copy the jar file under some location in another machine where we have to unpack it. For unpacking execute following command under $WL_HOME/common/bin

unpack.sh –domain=<domain name> -template=<jar file name>

For more details on packing and unpacking of domain, please click here

3. Configuring Automatic Migration

After you are done with creating domain, and packing/unpacking of domain, run admin server as well as node managers in both machines. Open admin console and configure for automatic server migration. The steps are as follows:

  • Configure Migration Leasing Basis – Configure migration leasing basis as database or consensus (in-memory) for cluster. Under Domain structure in admin console, go to Environment -> Clusters and click on cluster name. You’ll get screen as shown below. Go to Migration tab under Configuration. Select Migration basis as consensus or database. Under Candidate Machines for Migratable Servers select and move machines from available to chosen. These are the machines and order of preference on which Node Manager will restart failed servers.

Migration basis

  • Configure Managed Servers for Automatic Migration
    Go to Environment -> Servers, you’ll see summary of severs. Click on managed server you want to configure for migration (here ms2).

Manageg servers

.

In the following screen. Go to Migration tab and select Automatic Server Migration Enabled. Also move the machines from Available to Chosen under Candidate Machines.

Candidate machines

.

Now restart the admin server and managed servers in both machines.

After the servers are restarted, you’ll see ms1 and admin server running in unix1 and ms2 running in unix2.

To verify if the configuration, go to unix2 machine and kill ms2 as well as nodemanager running in that machine. Killing nodemanager is necessary because if it is not killed, it will try to restart the server in same machine that is unix2 instead of migrating it to another machine. Once the nodemanager and ms2 are killed in unix2 machine, go to unix1 machine and check the running processes. You’ll see ms2 process starting in unix1 machine.

4. Manually Migrating Server Instance

For manual migration, go to Environment -> servers and click on the server instance you want to migrate. For e.g. ms2. Go to Control tab and under that go to Migration tab. Under “Migrate to Machines”, select the machine on which you want to migrate the selected server instance (unix1 in this case). Now you can go to that particular machine and check the processes running (ps -aef) in that machine. In this case you’ll see ms2 also running in unix1.

Migrate

About the Author Atul Kumar

Leave a Comment:

6 comments
WLSRocks says February 23, 2011

Hi,
Learnt a lot. Great post!!!

I am new with using floating IP address in the cluster for sever migration, I request you to please provide me some inputs.

I am trying to implement ‘server migration’ using WebLogic 10.3 on our application. We are not using any proxy plug-in for load balancing, we are concentrating mainly on HA & Failover.
The planned cluster architecture is as follows:
• 2 managed servers (MS1 & MS2)
• 2 machines(Machine1 & Machine2 are two Linux machines with static IP each)
• MS1 on Machine1 and MS2 on Machine2 (all are clustered)
• 1 admin server outside the cluster running on Machine1
• Using SAN storage for persistence.
• We have a static IP for each machine.
• ‘war’ and ‘ear’ deployed to the cluster
• We don’t have an issue even if web app does not failover.

Q1. Is server migration possible if proxy plug-in is not used?
Q2. How to create and configure the floating IP? should there be one floating IP for each machine?
Q3. What IP should be used in the listen address section of MS1 and MS2. Should this be the floating IP?
Q4. We have an external application which communicates with the WLS application(.ear deployed) using IP:Port. Will it be able to access using the same IP:port even after server migration.

Please provide your inputs and suggestions, it would be of great help!

Thank you,
Pradeep

Reply
Atul Kumar says February 23, 2011

@ Pradeep,

Q1. Is server migration possible if proxy plug-in is not used?
A1: Yes whole server migration is possible with or without proxy plug-in

Q2. How to create and configure the floating IP? should there be one floating IP for each machine?

Yes there should be one floating IP (VIP) on each server. Start Server which you wish to configure on floating IP (VIP).

You can float IP manually or configure your clusterware application (veritas, HP-clusterware, Linux Cluster) to migrate IP in case of machine crash to another available machine.

check enable VIP in SOA Admin server http://download.oracle.com/docs/cd/E14571_01/core.1111/e12036/create_domain.htm#BABBEJED

and 4.22 manually failing admin server to another machine at

http://download.oracle.com/docs/cd/E14571_01/core.1111/e12036/create_domain.htm#BABHAHIA

Q3. What IP should be used in the listen address section of MS1 and MS2. Should this be the floating IP?
A3: Yes, this should be floating IP

Q4. We have an external application which communicates with the WLS application(.ear deployed) using IP:Port. Will it be able to access using the same IP:port even after server migration.

A4: Yes this is the whole purpose of using floating IP (VIP).

Reply
WLSRocks says February 23, 2011

Hi Atul,

Thanks so much for your quick responce.
Need more help:
“Start Server which you wish to configure on floating IP (VIP)”
What do you mean by this statement?
About Q3) We have MS1 assigned to Machine1 and MS2 assigned to Machine2. So should the VIP of machine1 be assigned to MS1 and VIP of machine2 be assigned to MS2?

Reply
Atul Kumar says February 24, 2011

@ WLSRocks

Q1: “Start Server which you wish to configure on floating IP (VIP)” What do you mean by this statement?

A1: When you create managed server it prompts you for server name , enter VIP name there and not * (which means start service on all IPs) . This means that if there are two IPs on machine (actual main IP and floating IP ) then managed server will start in floating IP only and not on all IPs on that machine.

Do let me know if this is not clear .

To be more precise , create domain -> In the Configure Managed Servers screen -> change “listen address” for MS1 and MS2 to floating IP (This means that managed servers can be migrated as whole server to another machine including floating IP )

Reply
WLSRocks says February 24, 2011

Hi Atul,

Thanks so much for the clarification.

Reply
hernan says July 12, 2011

Hi from Colombia:

Great tutorial, i´ve a question. Mine machines have SunOs 10, in Oracle documentation says what machines with solaris zones have issues in whole server migration ¿do you know something? i´ve been searching but i haven´t found anything what issues are….In this moment i´m setting my two machines, thanks in advance

Reply
Add Your Reply

Not found