Sunteți pe pagina 1din 48

Weblogic Administration

Rakesh kumar
DAY 2

Agenda

Weblogic Server Life Cycle

Starting and shutting down weblogic servers

Boot Identity

Passing Identity Information on the Command Line

Launching the Administration Console

Deployments

Weblogic clustering

Node Manager

Apache Overview

Apache Installation

Apache Weblogic integration

Weblogic server life cycle

State Transitions for Server Life Cycle Commands

Weblogic server life cycle

STANDBY State

A server instance in STANDBY does not process any requestits regular Listen Port
is closed. The Administration Port is open, and accepts life cycle commands that
transition the server instance to either the RUNNING or the SHUTDOWN state.
Other Administration requests are not accepted.
Starting a server instance in standby is a method of keeping it available as a
hot backup, a useful capability in high-availability environments.
The only life cycle command that causes a server instance to enter the STANDBY
state and remain in that state is the Start in Standby command. A server instance
transitions through the STANDBY state when you issue a Start or a Start in Admin
command.

Weblogic server life cycle

ADMIN State

In the ADMIN state, WebLogic Server is up and running, but available only for
administration operations, allowing you to perform server and application-level
administration tasks. When a server instance is in the ADMIN state:
The Administration Console is available.
The server instance accepts requests from users with the admin role. Requests from nonadmin users are refused.
The JDBC, JMS, and JTA subsystems are active, and administrative operations can be
performed upon them. However, you do not have to have administrator-level privileges to
access these subsystems when the server is in the ADMIN state.
Deployments or re-deployments are allowed, and take effect when you transition the
server instance from the ADMIN to the RUNNING state (using the Resume command).
Cluster Service is active and listens for heartbeats and announcements from other cluster
members. It can detect that other Managed Servers have joined the cluster, but is invisible
to other cluster members

Weblogic server life cycle

RESUMING State

During this transitional state, WebLogic Server performs the operations required
to move itself from the STANDBY or ADMIN state to the RUNNING state.
A server instance transitions to the RESUMING state when you issue the Resume
command. A server instance transitions through the RESUMING state when you
issue the Start command.

Weblogic server life cycle

RUNNING State

In the RUNNING state, WebLogic Server is fully functional, offers its services to
clients, and can operate as a full member of a cluster.
A server instance transitions to the RUNNING state as a result of the Start
command, or the Resume command from the ADMIN or STANDBY states.
You can transition a server instance in the RUNNING state to the SUSPENDING
state or the FORCE_SUSPENDING state using graceful and force Suspend and
Shutdown commands.

Weblogic server life cycle

SUSPENDING State

During this transitional state, WebLogic Server performs the operations required
to place itself in the ADMIN state, suspending a subset of WebLogic Server
subsystems and services in an ordered fashion, and completing a predefined
portion of the application work currently in process (in-flight work).

Weblogic server life cycle

FORCE_SUSPENDING State

During this transitional state, WebLogic Server performs the operations


required to place itself in the ADMIN state, suspending a subset of WebLogic
Server subsystems and services in an ordered fashion. During the
FORCE_SUSPENDING state, WebLogic Server does not complete in-flight work
gracefully; application work in progress is abandoned.

Weblogic server life cycle

SHUTTING_DOWN State

During this transitional state, WebLogic Server completes the suspension of


subsystems and services and does not accept application or administration
requests.
A server instance transitions to the SHUTTING_DOWN state when you issue a
Shutdown or Force Shutdown command.

Weblogic server life cycle

FAILED State

A running server instance can fail as a result of out-of-memory exceptions or


stuck application threads, or if one or more critical services become
dysfunctional. A server instance monitors its health, and upon detecting that one
or more critical subsystems are unstable, it declares itself FAILED.
A FAILED server instance cannot satisfy administrative or client requests.

Weblogic server life cycle

UNKNOWN State

If a server instance cannot be contacted, it is in the UNKNOWN state

Weblogic managed server start

You can start weblogic managed server from the below path

WL_HOME\ user_projects \domains\<domain>\bin\startManagedWebLogic.cmd


<Managed server > (Windows)
WL_HOME/user_projects/domains/<domain>/bin/startManagedWebLogic.sh
<Managed server > (UNIX)

Weblogic Admin server start

You can start weblogic admin sever from the below path

WL_HOME\ user_projects \domains\<domain>\startWebLogic.cmd (Windows)


WL_HOME/user_projects/domains\<domain>\startWebLogic.sh (UNIX)

Boot Identity

If you want to bypass the prompt for username and password, we recommend
that you create and use a boot identify file, which contains your username
and password in an encrypted format.

Creating a Boot Identity File


To create a boot identity file :

Start the Administration Server at least once and provide the user credentials
on the command line.

During the Administration Server's initial startup process, it generates security


files that must be in place before a server can use a boot identity file.

Place the following two lines in a text file:


username=username
password=password

Save the file.

Note: The first time you use this file to start a sever, the server reads the file
and then overwrites it with an encrypted version of the username and
password.

Alternative Technique Passing Identity


Information on the Command Line

Using a boot identity file is the most secure and convenient way to bypass the
interactive prompt. However, instead of using a boot identify file, you can
add the following arguments to the weblogic.Server startup command:

-Dweblogic.management.username=username
-Dweblogic.management.password=password

If you supply both of these arguments, you can bypass the interactive prompt.

Launching the Administration Console

The Administration Console is the web-based management interface for a


WebLogic domain.
To launch the Administration Console:
http://hostname:port/consoleWhere
hostname is the machine name or IP address of the host server
port is the address of the port on which the host server is listening for
requests (7001 by default)

Administration Console Overview

WebLogic Server Administration Console is a Web browser-based, graphical user interface that
you use to manage a WebLogic Server domain.
Use the Administration Console to:

Configure, start, and stop WebLogic Server instances

Configure WebLogic Server clusters

Configure WebLogic Server services, such as database connectivity (JDBC) and messaging (JMS)

Configure security parameters, including managing users, groups, and roles

Configure and deploy your applications

Monitor server and application performance

View server and domain log files

View application deployment descriptors

Edit selected runtime application deployment descriptor elements

Deployments Staging modes

Stage - The Administration Server first copies the deployment unit source files to the staging
directories of target servers specified by the Staging Directory Name attribute. The target
servers then deploy using their local copy of the deployment files.

(requires in horizantal clustering)

Nostage - The Administration Server does not copy deployment unit files. Instead, all servers
deploy using the same physical copy of the deployment files, which must be directly accessible
by the Administration Server and target servers.With nostage deployments of exploded archive
directories, WebLogic Server automatically detects changes to a deployment's JSPs or Servlets
and refreshes the deployment. (This behavior can be disabled if necessary.)

(useful in vertical clustering)

external stage - The Administration Server does not copy deployment files. Instead, the
Administrator must ensure that deployment files are distributed to the correct staging
directory location before deployment (for example, by manually copying files prior to
deployment). With external stage deployments, the Administration Server requires a copy of
the deployment files for validation purposes. Copies of the deployment files that reside in
target servers' staging directories are not validated before deployment.

Deployments

Deployment steps:

On the left-hand side Change Center pane, click Lock & Edit.

On the left-hand side Domain Structure pane, click Deployments.

On the right-hand content pane, click Install.


Browse to the directory where the EAR file resides, mark the radio button next to the EAR
file you want to deploy, and click Next.

Confirm that the radio button next to Install this deployment as an application is
marked and click Next.

Click Finish.

On the left-hand side Change Center pane, click Activate Changes.

On the right-hand content pane, mark the radio button next to the EAR just deployed.

Click Start to view the dropdown list and select Servicing all requests.

In the content pane of the new page, click Yes.

How many way you can deploy artifacts


in weblogic server ?

weblogic.Deployer

weblogic.Deployer provides a command-line based interface for performing both basic


and advanced deployment tasks. Use weblogic.Deployer when you want command-line
access to WebLogic Server deployment functionality, or when you need to perform a
deployment task that is not supported using the Administration Console.

Administration Console

The Administration Console provides a series of Web-based Deployment Assistants that


guide you through the deployment process. The Administration Console also provides
controls for changing and monitoring the deployment status, and changing selected
deployment descriptor values while the deployment unit is up and running.

WLST

The WebLogic Scripting Tool (WLST) is a new command-line interface that you can use to
automate domain configuration tasks, including application deployment configuration
and deployment operations.

Deployments

Will Deploy sample application using weblogic administration console

What Is a WebLogic Server Cluster?

A WebLogic Server cluster consists of multiple WebLogic Server server


instances running simultaneously and working together to provide increased
scalability and reliability. A cluster appears to clients to be a single WebLogic
Server instance. The server instances that constitute a cluster can run on the
same machine, or be located on different machines. You can increase a
clusters capacity by adding additional server instances to the cluster on an
existing machine, or you can add machines to the cluster to host the
incremental server instances. Each server instance in a cluster must run the
same version of WebLogic Server.

Weblogic cluster benefits

Scalability
A solution that allows you to create additional capacity by introducing more servers to the cluster,
thereby reducing the load on existing servers.

Load balancing
The ability to distribute requests across all members of the cluster, according to the workload on
each server.

High availability
A mix of features that ensure applications and services are available even if a server or machine
fails. Clients can continue to work with little or no disruption in a highly available environment.
WebLogic achieves high availability using a combination of features: replication, failover, and
migratable services.

Failover Clusters
This class of cluster is the most widely used in todays e-commerce environment. Sometimes they
are also called HA clusters or segregated clusters. With this type, the emphasis is on complete
avoidance of unplanned downtime and also on achieving high availability.

Weblogic cluster types

Weblogic cluster is classified into 2 types:

Horizantal cluster

Vertical cluster

What is Vertical and Horizontal


Clustering?

Vertical (or linear) clustering is running multiple server instances on the same
hardware to better utilize memory or threading and allow for protection
against software failure.
Horizontal clustering then is clustering across hardware boundaries for both
load balance and failover.

In simple terms:
Vertical: Involves multiple managed servers on the same machine.
Horizontal: Involves multiple managed servers on multiple machines.

Weblogic server clustering

Select Administration Server, Managed Servers, Clusters and Machines

Weblogic server clustering

Administration Server

1. Name : Sample_AdminServer
2. Listen Address : All Local Address
3.Listen Port: 10001

Weblogic server clustering

Administration Server

1. Name : Sample_AdminServer
2. Listen Address : All Local Address
3.Listen Port: 10001

Weblogic server clustering

Managed Servers

1. mserver1:9003 & sserver1:9005 -linux2.com


2. mserver2:9003 & sserver2:9005-linux3.com

Weblogic server clustering

Clusters
mserver : multicast

Weblogic server clustering

Assign Servers to Clusters : mserver >mserver1 & mserver2

Weblogic server clustering

Configuration Summary

Weblogic server clustering

Creating Domain

Node Manager

Node Manager is a Java utility that runs as separate process from WebLogic
Server and allows you to perform common operations tasks for a Managed
Server, regardless of its location with respect to its Administration Server.
While use of Node Manager is optional, it provides valuable benefits if your
WebLogic Server environment hosts applications with high availability
requirements.

If you run Node Manager on a machine that hosts Managed Servers, you can
start and stop the Managed Servers remotely using the Administration Console
or from the command line. Node Manager can also automatically restart a
Managed Server after an unexpected failure.

Node Manager

Two versions of Node Manager


1) Java-based
2) Script-based

Java-based node manager - runs with in JVM (Java Virtual Machine) Process
and more secure than script-based node manager. Configuration for javabased node manager are stored in nodemanager.properties

Script-based node manager - is available for Linux and Unix systems only and
is based on shell script.

Node Manager

In multiple ways you can access Node Manager

1)From Administration Console : Environments -> Machines -> Configuration ->


Node Manager
2) JMX utilities (Java Management extension)
3) WLST commands (WebLogic Scripting Tool)

Node Manager

Note:

Default port on which node manager listen for requests is localhost:5556

Node Manager Process is associated with a Machine and NOT with specific
Weblogic Domain

Machines

Every node manager is associated with machines

How to Configure Node Manager ?

1.Configure each computer (on which you wish to use Node Manager) as a
Machine in WebLogic Server
Environments -> Machines -> New (Add Machine)
Environments -> Machines -> Machine Name (created above) -> Configuration -> Node Manager

2. Assign each server instance (Admin or Managed that you wish to control
with Node Manager) to Machine.
Environments -> Machines -> Machine Name (created above) -> Configuration -> Servers -> Add
(Add Server running on this node which you would like to monitor using Node Manager)

How to start Node Manager ?

You can start Node manager from the below location

$WL_HOME\server\bin\startNodeManager.cmd (Windows)

Apache Overview

Apache is generally recognized as the world's most popular Web server (HTTP
server). Originally designed for Unix environments, the Apache Web server has
been ported to Windows and other network operating systems.

The Apache Web server provides a full range of Web server features, including
CGI, SSL, and virtual domains. Apache also supports plug-in modules for
extensibility. Apache is free software, distributed by the Apache Software
Foundation that promotes various free and open source advanced Web
technologies.

Apache Installation (unix)


Simple steps for Installing Apache

1)

Download stable apache

2)

Untar apache

3)

./configure prefix=/usr/local/apache2

4)

Make

5)

Make install

Apache Weblogic integration

We can find weblogic plug-in from the below location:

Linux

WL_HOME/wlserver_10.0/server/plugin/linux/i686
WL_HOME/wlserver_10.0/server/plugin/linux/ia64
WL_HOME/wlserver_10.0/server/plugin/linux/s390

Windows (Apache 2.0 only)

WL_HOME\wlserver_10.0\server\plugin\win\32 or
WL_HOME\wlserver_10.0\server\plugin\win\64

Apache Weblogic integration

Steps for integrating apache and weblogic

1.

Install the Apache HTTP Server Plug-In module for Apache 2.0.x by copying the
mod_wl_22.so file to the $APACHE_HOME\modules directory.
Add the following line to your APACHE_HOME/conf/httpd.conf file manually:
LoadModule weblogic_module modules/mod_wl_22.so

2.

Verify the syntax of the httpd.conf file with the following command:
$APACHE_HOME\bin\apachectl -t
The output of this command reports any errors in your httpd.conf file or returns:
Syntax OK

3.

Re-start Apache server.

Thank You ?

S-ar putea să vă placă și