View
232
Download
0
Category
Preview:
Citation preview
8/6/2019 06-Wls Managing Lifecycle
1/24
Managing WebLogic Server Lifecycle
8/6/2019 06-Wls Managing Lifecycle
2/24
Starting WLS with Domain SuppliedScripts
$DOMAIN_HOME/startWebLogic.sh Starts the domain admin server
Starting Managed Servers $DOMAIN_HOME/bin/startManagedWebLogic.sh
managedServerName http://adminserverdomainname:7001
http://adminserverdomainname:7001/http://adminserverdomainname:7001/8/6/2019 06-Wls Managing Lifecycle
3/24
Stopping WLS Servers via Scripts
$DOMAIN_HOME/bin/stopWebLogic optionalUseroptionalPassword t3://host:port If no arguments are supplied then t3://localhost:7001 is used
Uses WSLT do shutdown WLS
8/6/2019 06-Wls Managing Lifecycle
4/24
Creating a Boot Identity File
Create a file called boot.properties in theDOMAIN_NAME/servers//security
directory that contains two lines:
username=username
password=password The first time you start the server, the server reads the Boot
Identity file and overwrites it with an encrypted version of theusername and password.
Thereafter, the server remembers the credentials for
subsequent startup cycles.
4
8/6/2019 06-Wls Managing Lifecycle
5/24
Starting WLS Servers as a WindowsService
There are the scripts named installSvc.cmd anduninstallSvc.cmd located in%MIDDLEWARE_HOME%/wlserver_10.3/server/bin
You should set a number of environment variables
before calling these scripts
Boot.properties file should exists for each servers thatis going to be started as a Windows service
5
8/6/2019 06-Wls Managing Lifecycle
6/24
Setting up a Windows Service to startWLS server - example
@echo off
SETLOCAL
set DOMAIN_NAME=FoundationLab
set USERDOMAIN_HOME=c:\wls103\user_projects\domains\FoundationLab
set SERVER_NAME=AdminServer
set PRODUCTION_MODE=trueset JAVA_OPTIONS=
Dweblogic.Stdout="c:\wls103\user_projects\domains\FoundationLab\stdout.txt" -Dweblogic.Stderr="c:\wls103\user_projects\domains\FoundationLab\stderr.txt"
set MEM_ARGS=-Xms128m -Xmx256m
call "c:\wls103\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL
6
8/6/2019 06-Wls Managing Lifecycle
7/24
Node Manager
Is a process that runs on a machine and it notassociated with a domain Required to start WLS Servers from Console
WLST can also call node manager to start/stop servers
Two Flavors Java Flavor
Shell Scripts
8/6/2019 06-Wls Managing Lifecycle
8/24
Starting/Stopping Node Manager
Starting Node Manager $WL_HOME/server/bin/startNodeManager.sh(cmd)
Stopping Node Manager Nothing supplied (kill -9 in UNIX for example)
You can install/uninstall NodeManager as a WindowsService using scripts named installNodeMgrSvc.cmdand uninstallNodeMgrSvc.cmd located in
%MIDDLEWARE_HOME%/wlserver_10.3/server/bin
8/6/2019 06-Wls Managing Lifecycle
9/24
What is a Machine?
Logical representation of physical host
Includes configuration of Node Manager Listen Ports
Ensures State is replicated to JVMs on separate
machines
8/6/2019 06-Wls Managing Lifecycle
10/24
Relationship of Machines to OtherComponents
10
computer1 computer2 computer3
machine1bmachine1a
domain
cluster
server5
AdmSrv1
server6server4
machine2
server2 server3
NodeMgr NodeMgr
8/6/2019 06-Wls Managing Lifecycle
11/24
Node Manager Architecture
11
Machine A
NodeManager(NM)
Machine B
Managed
server 2
Node
Manager
Machine C
Managed
server 1(MS1)
Administration
server
Node
Manager
WLST
JMX
client
Admin
Console
8/6/2019 06-Wls Managing Lifecycle
12/24
How a Node Manager Starts anAdministration Server
12
Machine A
Admin
serverWLST
1. The user issues a command
to start the administration
server.
2. NM determines thedomain directory and
authenticates the user.
3. NM obtains the startupproperties for AS.
5. AS obtains thedomain
configuration.
4. NM creates
the process for AS.Node
Manager
8/6/2019 06-Wls Managing Lifecycle
13/24
How a Node Manager Starts a ManagedServer
13
Machine A
Admin
server
Admin
Console
Machine B
Managed
Server 1
5. MS1 caches
the configuration.Node
Manager
3. NM createsthe MS1 process.
4. MS1 obtains the
configuration.
1. The user issues a command to start MS1.
2. AS invokes the NM
and provides the
startup properties.
8/6/2019 06-Wls Managing Lifecycle
14/24
How a Node Manager Restarts aManaged Server
14
Machine A
Admin
server
Machine B
ManagedServer 1
(5. If AS is not
available, MS1 obtains
cached configuration.)
Node
Manager
3. NM creates
the MS1 process.
4. MS1 obtains
the configuration.
1. NM determines
that MS1 needs
a restart.
2. NM obtains the remotestart username/password
and startup properties for MS 1.
8/6/2019 06-Wls Managing Lifecycle
15/24
How a Node Manager Shuts Down aManaged Server
15
Machine AAdmin
server
Machine B
Managed
Server 1 Node
Manager
1. User issues the shutdown command for MS1.
3. AS sends
the shutdown
command
for MS1 to
NM.
4. NM tries toshut down MS1.5. Stop MS1.
2. AS tries to
shut down
MS1.
Admin
Console
Operating
system
8/6/2019 06-Wls Managing Lifecycle
16/24
Node Manager Configuration and LogFiles
Two sets of files: The Node Manager config files, located inDOMAIN_HOME/servers/server_name/
data/nodemanager
The Node Manager log files, located inDOMAIN_HOME/servers/server_name/logs and /common/nodemanager
16
8/6/2019 06-Wls Managing Lifecycle
17/24
Node Manager Configuration and LogFiles
17
server_2
server_1
Node Manager log filesnodemanager.log
Node Manager configuration files:nodemanager.properties
nm_password.properties
nodemanager.domains
nm_data.properties
Server configuration files:boot.properties
startup.properties
Server configuration files:boot.properties
startup.properties
Server state files:server_1.lck
server_1.pidserver_1.state
Server state files:server_2.lckserver_2.pid
server_2.state
Server log files:
server_1.out
Server log files:server_2.out
Node
Manager
8/6/2019 06-Wls Managing Lifecycle
18/24
Starting/Stopping Servers with WLSAdmin Console
8/6/2019 06-Wls Managing Lifecycle
19/24
Starting/Stopping Servers with WLSAdmin Console Requirements
Admin Server has to be running Hosts the Console
Node Manager must be running to start servers fromthe console
8/6/2019 06-Wls Managing Lifecycle
20/24
Starting/Stopping With WLST WithoutNode Manager
Startingwls:offline/>startServer('AdminServer','mydomain','t3://localhost:70
01','weblogic','weblogic','c:/bea/user_projects/domains/mydomain','true','60000','false')
Stoppingwls:/offline> connect('weblogic','weblogic','t3://localhost:7001')
.connected
wls:/mydomain/serverConfig> shutdown(AdminServer',
Server','false',1000, block='false')
8/6/2019 06-Wls Managing Lifecycle
21/24
Creating a Managed Server on aRemote Computer
1.Install WLS on both computers.2.Create a managed server using the Administration Console.3.Create a managed server template using pack.4.Create a managed server on a remote computer usingunpack.
5.Start the remote managed server.
21
8/6/2019 06-Wls Managing Lifecycle
22/24
Creating a Managed Server on aRemote Computer
22
Computer one
FMW home
Domain directoryAdmin server
Managed svr template:config.xml
mg_svr_tmpl.jar
Computer two
FMW home
Domain directorymg_svr_tmpl.jarconfig.xmlpack
unpack
8/6/2019 06-Wls Managing Lifecycle
23/24
pack and unpack: Examples
23
On computer one (administration server):
On computer two (remote managed server):
[oracle@wls-sysadm]$ cd $WL_HOME/common/bin[oracle@wls-sysadm]$ pack -managed=true
-domain=/u01/app/oracle/user_projects/domains/mydomain-template=/home/oracle/work/mydomain_managed.jar-template_name="My Managed Server Domain"
[oracle@wls-mgdsvr2]$ cd $WL_HOME/common/bin[oracle@wls-mgdsvr2]$ unpack
-domain=/u01/app/oracle/user_projects/domains/mydomain-template=/home/oracle/work/mydomain_managed.jar
8/6/2019 06-Wls Managing Lifecycle
24/24
Domain scale-up using GridControl
24
http://bit.ly/WLS11gDomainScaleup
http://bit.ly/WLS11gDomainScaleuphttp://bit.ly/WLS11gDomainScaleupRecommended