Tuesday, November 5, 2013

Machine configuration weblogic


 Node Manager:
Starting and stopping WLS on managed servers can be a long process if many machines are involved. At best, you must start each managed server individually, and you can use the Administration Console to stop them one by one. In practice, managed servers sometimes hang and cannot be stopped the usual way. In this case, you must log on to each machine and kill the process. Again, these tasks can be tedious. It would be more convenient to start all machines on a domain simultaneously.
Starting, Shutting Down, and Restarting an Administration Server
Using the WebLogic Scripting Tool (or the SSH client for script-based Node Manager only), you connect to a Node Manager process on the machine that hosts the administration server and issue commands to start, shut down, or restart an administration server. The relationship of an administration server to a Node Manager varies for different scenarios.
An administration server can be under a Node Manager’s control. You can start it, monitor it, and restart it using the Node Manager.
An administration server can be a Node Manager client. When you start or stop managed servers from the Administration Console, you access the Node Manager by using the administration server.
An administration server supports the process of starting up a managed server with a Node Manager. When you start a managed server with a Node Manager, the managed server contacts the administration server to obtain the outstanding configuration updates.
 
Starting, Shutting Down, Suspending, and Restarting Managed Servers
From the WLST command line or scripts, you can issue commands to a Node Manager to start, shut down, suspend, and restart the managed server instances and clusters.
A Node Manager can restart a managed server after failure even when the administration server is unavailable if Managed Server Independence (MSI) mode is enabled for that managed server instance. This is enabled by default.
Note: A Node Manager cannot start a managed server for the first time in MSI mode because the administration server for the domain must be available so that the managed server can obtain its configuration settings.
Note: A Node Manager uses the same command arguments that you supply when you start a managed server with a script or at the command line. For information about the startup arguments, see “weblogic.Server Command-Line Reference” in Oracle WebLogic Server Command Reference.
Restarting the Administration and Managed Servers
If a server instance that was started using the Node Manager fails, the Node Manager automatically
restarts it.
Note: A Node Manager can restart only a server that was started using a Node Manager.
The restart feature is configurable. The Node Manager’s default behavior is to:
Automatically restart server instances under its control that fail. You can disable this feature.
Restart failed server instances no more than a specific number of times. You define the number of restarts by setting the RestartMax property in the Node Manager startup.properties file.
If a Node Manager fails or is explicitly shut down, upon restart, it determines the server instances that were under its control when it exited. A Node Manager can restart any failed server instances as needed.
Note: It is advisable to run Node Managers as operating system services, so that they restart automatically if its host machine is restarted.
Monitoring Servers and Viewing Log Data
A Node Manager creates a log file for the Node Manager process and a log file of server output for each server instance that it controls. You can view these log files, as well as the log files for a server instance by using the Administration Console or WLST commands.
 
Machine
The term “machine” represents a physical computer that hosts one or more Oracle WebLogic Server instances. A machine identifies a particular, physical piece of hardware. A machine is used to associate a computer with the managed servers that it hosts.
It is used by a Node Manager to restart a failed or stopped managed server and by a clustered managed server to select the best location for storing replicated session data. A Node Manager is a utility or a process running on a physical server with which you can start, stop, suspend, or restart the administration and managed servers remotely. This topic is covered in detail later in this lesson.
Oracle WebLogic Server uses configured machine names to determine the optimum server in a cluster to which to delegate tasks such as HTTP session replication. The administration server uses the machine definition with the Node Manager application to start remote Oracle WebLogic Server instances.

Creating a Machine
The screenshot shows the first panel for creating machines via the Administration Console as well as the WLST command line. The Administration Console can start and stop servers remotely if they are defined in a machine that is controlled by a Node Manager. You can create a machine at any time, but servers can be assigned to a machine only when those servers are in a SHUTDOWN state. In the WebLogic Administration Console, perform the following steps:
1.  Select Machines under Domain Structure in the left pane.
2.  Click New to configure a new machine.
Alternatively, you can create a machine using WLST. This example creates a machine named MedRecMch3 in the MedRecDomain domain using WLST:
[oracle@wls-sysadm ~]$ java weblogic.WLST
wls:/offline> connect('weblogic','weblogic','t3://wls-sysadm:7020')
Connecting to t3://wls-sysadm:7020 with userid weblogic ...
Successfully connected to Admin Server 'MedRecAdmSvr' that belongs to domain 'MedRecDomain'.
wls:/MedRecDomain/edit/> startEdit()
wls:/MedRecDomain/edit/ !> create('MedRecMch3','Machine')
MBean type Machine with name MedRecMch3 has been created successfully.
wls:/MedRecDomain/edit/ !> ls('Machines')
wls:/MedRecDomain/edit/ !> save()
wls:/MedRecDomain/edit/ !> activate()
 
 

The name can match the DNS name, but it does not have to. You may want to incorporate part of the domain name in the machine name as a prefix. For example, myHRdomain may include the myHRhost1 and myHRhost2 machines, and myHRhost2 may include the myHR2a and myHR2b servers. The machine names (as are most WLS object names) are case-sensitive.
For Windows servers, select Other as the operating system (OS) from the drop-down list.
 
 
Assigning Servers to a Machine
The screenshot shows how to add servers to a particular machine. You may want to assign a server to a machine so that a Node Manager can be used to start and stop it. A server need not belong to any machine, and a machine need not have any servers, though the typical relationship is that each server belongs to one machine. Because you select servers from the drop-down list, the next time you add servers to a machine, those servers will not show in the list of available servers to assign.