You are on page 1of 17

There are various environments where you might use this function of automatically restarting servers.

You
can restart the server1 server process in a stand-alone WebSphere Application Server environment, for
eample. !ere is a list of processes you might consider restarting"
The server1 process on a stand-alone Application Server
The dmgr process on a deployment manager node
The nodeagent server process on any Application Server node in a deployment manager cell
The jmsserver process on the application server node, if the Application Server node has the embedded messaging feature
The IBM HTTP Server process
The IBM HTTP Administration process
The WebSphere Embedded Messaging Publish And SubscribeWASnodenamejmsserver process, if the Application
Server node has the embedded messaging feature
The WebSphere Embedded Messaging Publish And SubscribeWASnodenameserver1 process, if the Application
Server node has the embedded messaging feature
You can create Windows services during installation, using the installation wi#ard. The wi#ard lets you
create services for these servers"
The server1 process in a stand-alone base product environment, defined as a manually started (versus automatic) service
The IBM HTTP Server process and the IBM TT! Administration process, defined as automatically started services "hen
you choose to install the IBM TT! Server feature during the base product installation
The dmgr process on a deployment manager node, defined as a manually started (versus automatic) service
The installation wi#ard does not provide a way to create a service for a node agent because the
deployment manager instantiates each node agent after installation when you add an application server
node to the deployment manager cell. $or this reason, you must manually create a function that
automatically starts a failed nodeagent server process.
You must manually create a shell script that automatically starts any of the processes previously
mentioned, on a %&'(-based operating system. )ach Windows service or %&'( shell script controls a single
process, such as a stand-alone WebSphere Application Server instance. *ultiple stand-alone Application
Server processes re+uire multiple Windows services or %&'( scripts, which you can de,ne.
'n a &etwor- .eployment environment, the addNode or startNode command starts a single unmonitored
node agent process only, and does not start all of the processes that you might de,ne on the node. While
running, the node agent monitors and restarts Application Server processes on that node, on either a
Windows or a %&'(-based platform. )ach Application Server process has *onitoring/olicy con,guration
settings that the node agent uses when monitoring and restarting the process.
't is recommended that you set up a monitored node agent process manually, either through a Windows
service, or through the rc.was eample shell script on %&'(-based platforms. The operating system
monitors and automatically restarts the node agent server, nodeagent, if the process terminates
abnormally, which means that it stops without going through a normal shutdown. 't is also recommended
that you set up the deployment manager server, dmgr, as a monitored process. As mentioned, you can do
this during installation on a Windows platform. 0n a %&'(-based platform, use the rc.was eample shell
script to set up the deployment manager dmgr server as a monitored process.
'f you do not install the WebSphere Application Server base product or the WebSphere Application Server
&etwor- .eployment product as a Windows service during installation, you can use the WASService.exe
command line tool, in the install_root1bin directory, to do so at a later time. You can use the tool to add any
WebSphere Application Server process as a Windows service. The operating system can then monitor each
server process, and restart the server if it stops.
Steps for this tas-
#$ !"ptional# $se the installation %i&ard to set up a %indo"s service to automatically monitor and restart processes related to
the %ebSphere Application Server product$
o /erform the following procedure from the installation wi#ard for the &etwor- .eployment
product"
a$ &lic' 'un WebSphere Application Server (et%or) *eplo+ment as a service$
b$ (nter your user I) and pass"ord and clic' (e,t$
The installation wi#ard creates the following service during the installation"
IBM WebSphere Application Server V5 - dmgr
The '2* WebSphere Application Server 34 - dmgr service controls the dmgr server process,
which is the deployment manager server that administers the cell.
*$ !"ptional# A-ter installing, use the %ASService$e+e tool to manually define the nodeagent server process as a %indo"s
service$
You can use the same tool to manually de,ne a Windows service for another installation or
con,guration instance of either the base WebSphere Application Server product or the &etwor-
.eployment product.
,$ !"ptional# A-ter installing, set up a -.I/-based shell script to automatically monitor and restart the nodeagent server or any
other related server process$
a. 0ocate the rc.was e+ample shell script, "hich is in the install_root1bin directory$
b. &reate a ne" shell script for each process that the operating system is to monitor and restart$
c. (dit each shell script according to comments in its header, "hich provide instructions for identifying a %ebSphere
Application Server process$
d. (dit the inittab table of the operating system, to add an entry for each shell script you have created$
5omments in the header of the rc.was script show a sample inittab entry line for adding the
script. This inittab entry causes the %&'(-based system to call each shell script whenever the
system initiali#es. As it runs, each shell script monitors and starts the server process you
speci,ed.
6. Similar to a Windows service, each shell script monitors and restarts an individual WebSphere
Application Server server process in a stand-alone environment, or a node agent or deployment
manager process in an WebSphere Application Server &etwor- .eployment environment.
7esults
You can also use the Start the Server and Stop the Server commands to control the '2* WebSphere
Application Server on a Windows system. Access these commands from the Start menu, clic-ing Start >
rograms > IBM WebSphere > Application Server V5.!.
You can also use the Start the Manager and Stop the Manager commands to control the &etwor-
.eployment dmgr server on a Windows system. Access these commands from the Start menu, clic-ing
Start > rograms > IBM WebSphere > "eplo#ment Manager V5.!.
Note$
/rocesses started by a startServer 8or startNode or startManager9 command are not running as
monitored processes, regardless of how you have con,gured them.
$or eample, you can con,gure a base application server as a WebSphere Application Server Windows
service. !owever, if you start the application server instance using the startServer command, the
Windows system does not monitor or restart the Application Server because it was not started as a
Windows service. The same is true on %&'(-based platforms. You must start the server process with a shell
script based on the eample rc.was script, to have the server running as a monitored process.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
startNode command
The start(ode command reads the configuration file for the node agent process and constructs a launch command$ )epending on the
options that you specify, the start(ode command creates a ne" 1ava virtual machine (12M) A!I to run the agent process, or "rites
the launch command data to a file$ 3ou must run this command from the install:root1bin directory of a %ebSphere Application
Server installation$
S#ntax
start&ode ;options<
arameters
The following options are available for the startNode command"
.no%ait
Tells the start(ode command not to "ait for successful initiali4ation of the node agent process$
./uiet
Suppresses the progress information that the start(ode command prints in normal mode$
.log-ile 0-ile(ame1
Specifies the location of the log file to "hich information gets "ritten$
.replacelog
5eplaces the log file instead of appending to the current log$
.trace
6enerates trace information into a file for debugging purposes$
.timeout 0seconds1
Specifies the "aiting time before node agent initiali4ation times out and returns an error$
.statusport 0port(umber1
Specifies that an administrator can set the port number for node agent status callbac'$
.script 20script -ile(ame13
6enerates a launch script "ith the start(ode command instead of launching the node agent process directly$ The launch script
name is an optional argument$ If you do not provide the launch script name, the default script file name is
start:=node&ame>, based on the name of the node$
.4.0javaoption1
Specifies options to pass through to the 1ava interpreter$
.username 0name1
Specifies the user name for authentication if security is enabled in the server$ Acts the same as the -user option$
.user 0name1
Specifies the user name for authentication if security is enabled in the server$ Acts the same as the -username option$
.pass%ord 0pass%ord1
Specifies the pass"ord for authentication if security is enabled in the server$
.help
!rints a usage statement$
.5
!rints a usage statement$
&xamples
The following eamples demonstrate correct synta"
start&ode
start&ode -script 8produces the start:node.bat or .sh ,le9
start&ode -trace 8produces the startnode.log ,le9
startServer command
The startServer command reads the configuration file for the specified server process and starts the server$ )epending on the options
you specify, you can launch a ne" 1ava virtual machine (12M) A!I to run the server process, or "rite the launch command data to a
file$ 3ou can run this command from the install:root1bin directory of a %ebSphere Application Server installation, or a .et"or'
)eployment installation$
S#ntax
startServer =server> ;options<
where server is the name of the con,guration directory of the server you want to start. This argument is
re+uired.
arameters
The following options are available for the startServer command"
.no%ait
Tells the startServer command not to "ait for successful initiali4ation of the launched server process$
./uiet
Suppresses the progress information that the startServer command prints in normal mode$
.log-ile 0-ile(ame1
Specifies the location of the log file to "hich information is "ritten$
.replacelog
5eplaces the log file instead of appending to the current log$
.trace
6enerates trace information to the log file for debugging purposes$
.timeout 0seconds1
Specifies the "aiting time before server initiali4ation times out and returns an error$
.statusport 0port(umber1
Specifies that an administrator can set the port number for server status callbac'$
.script 20script -ile(ame13
6enerates a launch script "ith the startServer command instead of launching the server process directly$ The launch script
name is an optional argument$ If you do not supply the launch script name, the default script file name is start:=server>
based on the =server> name passed as the first argument to the startServer command$
.4 0javaoption1
Specifies options to pass through to the 1ava interpreter$
.username 0name1
Specifies the user name for authentication if security is enabled in the server$ Acts the same as the -user option$
.user 0name1
Specifies the user name for authentication if security is enabled in the server$ Acts the same as the -username option$
.pass%ord 0pass%ord1
Specifies the pass"ord for authentication if security is enabled in the server$
.help
!rints a usage statement$
.5
!rints a usage statement$
&xamples
The following eamples demonstrate correct synta"
startServer server1
startServer server1 -script 8produces the start:server1.bat or .sh ,les9
startServer server1 -trace 8produces the startserver.log ,le9
startManager command
The startManager command reads the configuration file for the .et"or' )eployment manager process and constructs a launch
command$ )epending on the options you specify, the startManager command launches a ne" 1ava virtual machine (12M) A!I to run
the manager process, or "rites the launch command data to a file$ 3ou must run this command from the install:root1bin directory
of a .et"or' )eployment installation$
S#ntax
start*anager ;options<
arameters
The following options are available for the startManager command"
.no%ait
Tells the startManager command not to "ait for successful initiali4ation of the deployment manager process$
./uiet
Suppresses the progress information that the startManager command prints in normal mode$
.log-ile 0-ile(ame1
Specifies the location of the log file to "hich information gets "ritten$
.replacelog
5eplaces the log file instead of appending to the current log$
.trace
6enerates trace information into a file using the startManager command for debugging purposes$
.timeout 0seconds1
Specifies the "aiting time before deployment manager initiali4ation times out and returns an error$
.statusport 0port(umber1
Specifies that an administrator can set the port number for deployment manager status callbac'$
.script 20script -ile(ame13
6enerates a launch script "ith the startManager command instead of launching the deployment manager process directly$ The
launch script name is an optional argument$ If you do not provide the launch script name, the default script file name is
=start:dmgr>$
.4.0javaoption1
Specifies options to pass through to the 1ava interpreter$
.username 0name1
Specifies the user name for authentication if security is enabled in the server$ Acts the same as the -user option$
.user 0name1
Specifies the user name for authentication if security is enabled in the server$ Acts the same as the -username option$
.pass%ord 0pass%ord1
Specifies the pass"ord for authentication if security is enabled in the server$
.help
!rints a usage statement$
.5
!rints a usage statement$
&xamples
The following eamples demonstrate correct synta"
start*anager
start*anager -script 8produces the start:dmgr.bat or .sh ,le9
start*anager -trace 8produces the startmanager.log ,le9
WASService command
The WASService command line tool lets you add any WebSphere Application Server server process as a
Windows service. WebSphere Application Server server processes that you could add as Windows services
include"
Any base Application Server, such as the default server1 process
The jmsserver process that e+ists on a base Application Server node "hen you have installed the embedded messaging server
feature and the node is part of a deployment manager cell
The nodeagent process on a base Application Server node that is part of a deployment manager cell
The deployment manager process, dmgr, on the .et"or' )eployment node
The WASService.ee command ,le is located in the bin subdirectory of the install_root directory.
Starting an existing service
WASService.ee ;-start< service_name
'reating a service
WASService.ee -add service_name
-server&ame Server
;-was!ome install_root<
;-con,g7oot confguration_repository_directory<
;-startArgs additional_start_arguments<
;-stopArgs additional_stop_arguments<
;-userid execution id -password password<
;-log$ile service_log_fle<
;-log7oot server_log_directory<
;-userScript path?setup5md@ine.bat<
;-restart true A -restart false<
"eleting a service
WASService.ee -remove service_name
Stopping a r(nning service
WASService.ee -stop service_name
)etrieving service stat(s
WASService.ee -status service_name
arameters
Supported arguments include"
.add service_name
&reates a service named service_name$
.con-ig'oot configuration_repository_directory
7ptional parameter that identifies the configuration directory of the installation root directory of a %ebSphere Application
Server product$
.log6ile service_log_file
7ptional parameter that identifies a log file that the WASService command uses to record its activity$
.log'oot server_log_directory
7ptional parameter that identifies a "sinstance server log directory that the WASService command uses to determine if the
server is running$
.remove service_name
)eletes the specified service$
.restart true 7 -alse
5estarts the e+isting service automatically if tyhe service fails "hen set to true$
.server Server_name
Identifies the server that the service controls$
.start service_name
Starts the e+isting service$ The -start parameter is the default parameter8 you can omit the -start parameter and still start the
service$
.startArgs additional_start_arguments
7ptional parameter that identifies additional parameters$
.status service_name
5eturns the current status of the service, "hich includes "hether the service is running or stopped$
.stop service_name
Stops the specified service$
.stopArgs additional_stop_arguments
7ptional parameter that identifies additional parameters$
.userid execution_ID .pass%ord password
7ptional parameters that identify a privileged userid and pass"ord$
.userScript path8setup9md:ine;bat
7ptional parameter that identifies a setup9md:ine;bat command file that the WASService command uses to understand
"sinstance nodes$
.%asHome install_root
7ptional parameter that identifies the installation root directory of the %ebSphere Application Server product$
'reating a nodeagent service
This eample creates a service called IBMWAS5Service - nodeagent that starts the nodeagent process"
WASService -add nodeagent
-servername nodeagent
-was!ome B."?/rogram $iles?WebSphere?AppServerB
-log,le B."?/rogram $iles?WebSphere?AppServer?logs?nodeagent?startServer.logB
-restart true
'reating a deplo#ment manager service
This eample creates a service called IBMWAS5Service - dmgr that starts the dmgr process"
WASService -add dmgr
-servername dmgr
-was!ome B."?/rogram $iles?WebSphere?.eployment*anagerB
-log,le B."?/rogram $iles?WebSphere?.eployment*anager?logs?dmgr?startServer.logB
-restart true
'reating an Application Server service
This eample creates a service called IBMWAS5Service - server that starts an Application Server process"
WASService -add serverC
-servername serverC
-was!ome B."?/rogram $iles?WebSphere?AppServerB
-log,le B."?/rogram $iles?WebSphere?AppServer?logs?dmgr?startServer.logB
-restart true
9on-iguring WebSphere <;=
'on*g(ration doc(ments
WebSphere Application Server stores con,guration data for servers in several documents in a cascading
hierarchy of directories. The con,guration documents describe the available application servers, their
con,gurations, and their contents. *ost con,guration documents have (*@ content.
+ierarch# o, directories o, doc(ments
The cascading hierarchy of directories and the documentsD structure support multi-node replication to
synchroni#e the activities of all servers in a cell. 'n a &etwor- .eployment environment, changes made to
con,guration documents in the cell repository, are automatically replicated to the same con,guration
documents that are stored on nodes throughout the cell.
At the top of the hierarchy is the cells directory. 't holds a subdirectory for each cell. The names of the cell
subdirectories match the names of the cells. $or eample, a cell named cell! has its con,guration
documents in the subdirectory cell!.
0n the &etwor- .eployment node, the subdirectories under the cell contain the entire set of documents for
every node and server throughout the cell. 0n other nodes, the set of documents is limited to what applies
to that speci,c node. 'f a con,guration document only applies to node!, then that document eists in the
con,guration on node! and in the &etwor- .eployment con,guration, but not on any other node in the
cell.
)ach cell subdirectory has the following ,les and subdirectories"
The cell.ml file, "hich provides configuration data for the cell
9iles such as security.ml, virtualhosts.ml, resources.ml, and variables.ml, "hich provide configuration data
that applies across every node in the cell
The clusters subdirectory, "hich holds a subdirectory for each cluster defined in the cell$ The names of the subdirectories
under clusters match the names of the clusters$
)ach cluster subdirectory holds a cluster.ml ,le, which provides con,guration data speci,cally for
that cluster.
The nodes subdirectory, "hich holds a subdirectory for each node in the cell$ The names of the nodes subdirectories match the
names of the nodes$
)ach node subdirectory holds ,les such as variables.ml and resources.ml, which provide
con,guration data that applies across the node. &ote that these ,les have the same name as those
in the containing cellDs directory. The con,gurations speci,ed in these node documents override the
con,gurations speci,ed in cell documents having the same name. $or eample, if a particular
variable is in both cell- and node-level variables.ml ,les, all servers on the node use the variable
de,nition in the node document and ignore the de,nition in the cell document.
)ach node subdirectory holds a subdirectory for each server de,ned on the node. The names of the
subdirectories match the names of the servers. )ach server subdirectory holds a server.ml ,le,
which provides con,guration data speci,c to that server. Server subdirectories might hold ,les such
as security.ml, resources.ml and variables.ml, which provide con,guration data that applies only
to the server. The con,gurations speci,ed in these server documents override the con,gurations
speci,ed in containing cell and node documents having the same name.
The applications subdirectory, "hich holds a subdirectory for each application deployed in the cell$ The names of the
applications subdirectories match the names of the deployed applications$
)ach deployed application subdirectory holds a deployment.ml ,le that contains con,guration data
on the application deployment. )ach subdirectory also holds a M&-A-IN. subdirectory that holds a
EC)) application deployment descriptor ,le as well as '2* deployment etensions ,les and bindings
,les. .eployed application subdirectories also hold subdirectories for all .war and entity bean .Far
,les in the application. 2inary ,les such as .Far ,les are also part of the con,guration structure.
An eample ,le structure is as follows"
cells
cell/
cell.ml resources.ml virtualhosts.ml variables.ml security.ml
nodes
node0
node.ml variables.ml resources.ml serverinde.ml
serverA
server.ml variables.ml
nodeAgent
server.ml variables.ml
node1
node.ml variables.ml resources.ml serverinde.ml
applications
sampleApp/
deployment.ml
M&-A-IN.
application.ml ibm-application-et.ml ibm-application-bnd.ml
sampleApp2
deployment.ml
M&-A-IN.
application.ml ibm-application-et.ml ibm-application-bnd.ml
'hanging con*g(ration doc(ments
You can use one of the administrative tools 8console, wsadmin, Eava A/'s9 to modify con,guration
documents or edit them directly. 't is preferable to use the administrative console because it validates
changes made to con,gurations. B5on,guration document descriptionsB states whether you can edit a
document using the administrative tools or must edit it directly.
'on*g(ration doc(ment descriptions
*ost con,guration documents have (*@ content. The table below describes the documents and states
whether you can edit them using an administrative tool or must edit them directly.
'f possible, edit a con,guration document using the administrative console because it validates any
changes that you ma-e to con,gurations. You can also use one of the other administrative tools 8wsadmin
or Eava A/'s9 to modify con,guration documents. %sing the administrative console or wsadmin scripting to
update con,gurations is less error prone and li-ely +uic-er and easier than other methods.
!owever, you cannot edit some ,les using the administrative tools. 5on,guration ,les that you must edit
manually have an ( in the Man(al editing re3(ired column in the table below.
"oc(ment descriptions
9on-iguration -ile :ocations Purpose Manual
editing
re/uired
admin-auth#.ml config:cells:cell_name: )efine a role for administrative
operation authori4ation$
/
app.policy config:cells:cell_name:nodes:node_name: )efine security permissions for
application code$
/
cell.ml config:cells:cell_name: Identify a cell$
cluster.ml config:cells:cell_name:clusters:cluster_name: Identify a cluster and its members
and "eights$
This ,le is only available
with the &etwor-
.eployment product.
deployment.ml config:cells:cell_name:applications:application_name: &onfigure application deployment
settings such as target servers and
application-specific server
configuration$
,lter.policy config:cells:cell_name: Specify security permissions to be
filtered out of other policy files$
/
integral-Fms-
authori#ations.ml
config:cells:cell_name: !rovide security configuration
data for the integrated messaging
system$
/
library.policy config:cells:cell_name:nodes:node_name: )efine security permissions for
shared library code$
/
multibro-er.ml config:cells:cell_name: &onfigure a data replication
message bro'er$
namestore.ml config:cells:cell_name: !rovide persistent name binding
data$
/
naming-auth#.ml config:cells:cell_name: )efine roles for a naming
operation authori4ation$
/
node.ml config:cells:cell_name:nodes:node_name: Identify a node$
pmirm.ml config:cells:cell_name: &onfigure !MI re;uest metrics$ /
resources.ml config:cells:cell_name:
config:cells:cell_name:nodes:node_name:
config:cells:cell_name:nodes:node_name:servers:server_name:
)efine operating environment
resources, including 1)B&, 1MS,
1avaMail, -50, 1&A resource
providers and factories$
security.ml config:cells:cell_name: &onfigure security, including all
user I) and pass"ord data$
server.ml config:cells:cell_name:nodes:node_name:servers:server_name: Identify a server and its
components$
serverinde.ml config:cells:cell_name:nodes:node_name: Specify communication ports
used on a specific node$
spi.policy config:cells:cell_name:nodes:node_name: )efine security permissions for
service provider libraries such as
resource providers$
/
variables.ml config:cells:cell_name:
config:cells:cell_name:nodes:node_name:
config:cells:cell_name:nodes:node_name:servers:server_name:
&onfigure variables used to
parameteri4e any part of the
configuration settings$
virtualhosts.ml config:cells:cell_name: &onfigure a virtual host and its
MIM( types$

You might also like