This chapter describes procedures for starting and stopping Oracle Fusion Middleware, including the Administration Server, Managed Servers, and components.
It contains the following topics:
Oracle Fusion Middleware is a flexible product that you can start and stop in different ways, depending on your requirements. In most situations, you can use Fusion Middleware Control, Oracle WebLogic Server Administration Console, or the WLST or OPMN commands to start or stop Oracle Fusion Middleware components.
These tools are completely compatible and, in most cases, can be used interchangeably. For example, you can start a J2EE component using WLST and stop it using Fusion Middleware Control.
Note:
For information about starting and stopping servers for IBM WebSphere, see "Starting and Stopping Servers on IBM WebSphere" in the Oracle Fusion Middleware Third-Party Application Server Guide.
You can start Oracle WebLogic Server Administration Servers using the WLST command line. You can start and stop Managed Servers using scripts, the WLST command line, the WebLogic Server Administration Console, or Fusion Middleware Control. The following sections describe how to start and stop WebLogic Servers using the WLST command line, Fusion Middleware Control, or both:
If a Managed Server contains other Oracle Fusion Middleware products, such as Oracle SOA Suite, Oracle WebCenter Portal, or Oracle JRF, the Managed Servers environment must be configured to set the correct classpath and parameters. This environment information is provided through the start scripts, such as startWebLogic and setDomainEnv, which are located in the following directory:
DOMAIN_HOME/bin
If the Managed Servers are started by Node Manager (as is the case when the servers are started by the Oracle WebLogic Server Administration Console or Fusion Middleware Control), Node Manager must be instructed to use these start scripts so that the server environments are correctly configured. Specifically, Node Manager must be started with the property StartScriptEnabled=true
.
There are several ways to ensure that Node Manager starts with this property enabled. As a convenience, Oracle Fusion Middleware provides the following script, which adds the property StartScriptEnabled=true
to the nodemanager.properties file:
(UNIX) ORACLE_COMMON_HOME/common/bin/setNMProps.sh. (Windows) ORACLE_COMMON_HOME\common\bin\setNMProps.cmd
For example, on Linux, execute the setNMProps script and start Node Manager:
ORACLE_COMMON_HOME/common/bin/setNMProps.sh MW_HOME/wlserver_n/server/bin/startNodeManager.sh
When you start Node Manager, it reads the nodemanager.properties file with the StartScriptEnabled=true
property, and uses the start scripts when it subsequently starts Managed Servers. Note that you need to run the setNMProps script only once.
Also note that when the StartScriptEnable property is set to true, the Node Manager reads the startWebLogic script, which in turns reads the setDomainEnv script. As a result, you must make any tuning changes by editing the setDomainEnv script. Any changes that are performed using the command line or Administration Console will not be implemented when Node Manager starts the servers. For example, if you use the Administration Console to change the server start arguments, those changes are written to config.xml, but the Node Manager ignores these settings and uses those in setDomainEnv.
See Also:
"Using Node Manager" in the Oracle Fusion Middleware Node Manager Administrator's Guide for Oracle WebLogic Server for other methods of configuring and starting Node Manager
You can start and stop Oracle WebLogic Server Administration Servers using the WLST command line or a script. When you start or stop the Administration Server, you also start or stop the processes running in the Administration Server, including the WebLogic Server Administration Console and Fusion Middleware Control.
For example, to start an Administration Server, use the following script:
DOMAIN_HOME/bin/startWebLogic.sh -Dweblogic.management.username=weblogic -Dweblogic.management.password=password -Dweblogic.system.StoreBootIdentity=true
To stop an Administration Server, use the following script:
DOMAIN_HOME/bin/bin/stopWebLogic.sh username password [admin_url]
You can start and stop Managed Servers using Fusion Middleware Control or WLST commands and scripts, as described in the following topics:
Fusion Middleware Control and the Oracle WebLogic Server Administration Console use Node Manager to start Managed Servers. If you are starting a Managed Server that does not contain Oracle Fusion Middleware products other than Oracle WebLogic Server, you can start the servers using the procedure in this section.
However, if the Managed Server contains other Oracle Fusion Middleware products, such as Oracle SOA Suite, Oracle WebCenter Portal, or Oracle JRF, you must first configure Node Manager, as described in Section 4.2.1.
To start or stop a WebLogic Server Managed Server using Fusion Middleware Control:
From the navigation pane, expand the farm, then WebLogic Domain, and then the domain.
Select the Managed Server.
From the WebLogic Server menu, choose Control, then Start Up or Shut Down.
Alternatively, you can right-click the server, then choose Control, then Start Up or Shut Down.
You can use a script or WLST to start and stop a WebLogic Server Managed Server.
For example, to start a WebLogic Server Managed Server, use the following script:
(UNIX) DOMAIN_HOME/bin/startManagedWebLogic.sh managed_server_name admin_url (Windows) DOMAIN_HOME\bin\startManagedWebLogic.cmd managed_server_name admin_url
When prompted, enter your user name and password.
To stop a WebLogic Server Managed Server, use the following script:
(UNIX) DOMAIN_HOME/bin/stopManagedWebLogic.sh managed_server_name admin_url username password (Windows) DOMAIN_HOME\bin\stopManagedWebLogic.cmd managed_server_name admin_url username password
You can enable the Administration Server and Managed Servers to start without prompting you for the administrator user name and password.
For the Administration Server, create a boot.properties file:
Create the following directory:
MW_HOME/user_ projects/domains/domain_name/servers/AdminServer/security
Use a text editor to create a file called boot.properties in the security directory created in the previous step, and enter the following lines in the file:
username=adminuser password=password
For each Managed Server:
Create the following directory:
MW_HOME/user_ projects/domains/domain_name/servers/server_name/security
Copy the boot.properties file you created for the Administration Server to the security directory you created in the previous step.
Restart the Administration Server and Managed Servers, as described in Section 4.2.2 and Section 4.2.3.
Note:
When you start the Administration Server or Managed Server, the user name and password entries in the file are encrypted.
For security reasons, minimize the time the entries in the file are left unencrypted. After you edit the file, start the server as soon as possible in order for the entries to be encrypted.
See Also:
"Boot Identity Files" in the Oracle Fusion Middleware Managing Server Startup and Shutdown for Oracle WebLogic Server for more information
If you want a WebLogic Server instance to start automatically when you boot a Windows host computer, you can set up the server as a Windows service. For complete information, see "Setting Up a WebLogic Server Instance as a Windows Service" in the Oracle Fusion Middleware Managing Server Startup and Shutdown for Oracle WebLogic Server.
However, that chapter describes the process for a standalone Oracle WebLogic Server installation. When Oracle WebLogic Server is part of an Oracle Fusion Middleware environment, you must set the environment to include references to ORACLE_COMMON. To do that, the script that you create is slightly different from that in "Example Script for Setting Up a Server as a Windows Service". The following shows the correct script:
echo off SETLOCAL set DOMAIN_NAME=myWLSdomain set USERDOMAIN_HOME=d:\Oracle\config\domains\myWLSdomain set SERVER_NAME=myWLSserver set PRODUCTION_MODE=true set JAVA_OPTIONS=-Dweblogic.Stdout="d:\Oracle\config\domains\myWLSdomain\ stdout.txt" -Dweblogic.Stderr="d:\Oracle\config\domains\myWLSdomain\stderr.txt" set ADMIN_URL=http://adminserver:7501 set MEM_ARGS=-Xms40m -Xmx250m call %USERDOMAIN_HOME%\bin\setDomainEnv.cmd call "d:\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd" ENDLOCAL
You can start and stop components using the command line, the WebLogic Server Administration Console, or Fusion Middleware Control, depending upon the component. The following topics describe how to start and stop components using Fusion Middleware Control and the command line:
To start or stop a component:
From the navigation pane, expand the farm, then navigate to the component.
Select the component, such as SoaInfra.
From the dynamic target menu, choose Control, then Start Up or Shut Down.
Note:
If OPMN is not started, you cannot start system components such as Oracle HTTP Server or Oracle Internet Directory using Fusion Middleware Control. To start OPMN, use the following command:
opmnctl start
If a component is a Java component, you use WLST commands to start and stop the component. If a component is a system component, you use opmnctl
commands to start and stop the components.
To start and stop Java components, use the WLST startApplication
and stopApplication
commands:
startApplication(appName, [options]) stopApplication(appName, [options])
For example, to start Oracle Directory Integration Platform, use the following command:
startApplication("DIP")
To start and stop system components, use the opmnctl
command-line tool. It is located in the following directory:
(UNIX) ORACLE_INSTANCE/bin (Windows) ORACLE_INSTANCE\bin
To start or stop OPMN and all system processes, such as Oracle HTTP Server:
opmnctl startall opmnctl stopall
To start, stop, or restart a component using opmnctl:
opmnctl startproc ias-component=component_name opmnctl stopproc ias-component=component_name opmnctl restartproc ias-component=component_name
For example, to start Oracle HTTP Server, ohs1:
opmnctl startproc ias-component=ohs1
To start, stop, or restart the subprocess of a component:
opmnctl stopproc process-type=process opmnctl startproc process-type=process opmnctl restartproc process-type=process
If Fusion Middleware Control is configured for a domain, it is automatically started or stopped when you start or stop an Oracle WebLogic Server Administration Server, as described in Section 4.2.2.
Oracle Management Agent is designed specifically for monitoring particular Oracle Fusion Middleware components.
To start Oracle Management Agent, use the following command:
opmnctl startproc ias-component=EMAGENT
To stop Oracle Management Agent, use the following command:
opmnctl stopproc ias-component=EMAGENT
You can start and stop applications using Fusion Middleware Control, the WebLogic Server Administration Console, or the WLST command line. The following topics describe how to start and stop applications using Fusion Middleware Control and the command line:
To start or stop a Java EE application using Fusion Middleware Control:
From the navigation pane, expand Application Deployments.
Select the application.
From the Application Deployment menu, choose Control, then Start Up or Shut Down.
To start or stop a SOA Composite application using Fusion Middleware Control:
From the navigation pane, expand the farm, then SOA, and then soa-infra.
Select the application.
On the SOA Composite page, click Start Up or Shut Down.
To start or stop a Java EE application with the WLST command line, use the following commands:
startApplication(appName, [options]) stopApplication(appName, [options])
The application must be fully configured and available in the domain. The startApplication
command returns a WLSTProgress object that you can access to check the status of the command. In the event of an error, the command returns a WLSTException. For more information about the WLSTProgress object, see "WLSTProgress Object" in the Oracle Fusion Middleware Oracle WebLogic Scripting Tool.
This section provides procedures for starting and stopping an Oracle Fusion Middleware environment. An environment can consist of an Oracle WebLogic Server domain, an Administration Server, multiple Managed Servers, Java components, system components, including Identity Management components, and a database used as a repository for metadata. The components may be dependent on each other. Therefore, it is important to start and stop them in the proper order.
You can follow these procedures when you need to completely shut down your Oracle Fusion Middleware environment. For example, when preparing to perform a complete backup of your environment, or apply a patch.
To start an Oracle Fusion Middleware environment:
Start any database-based repository:
Set the ORACLE_HOME environment variable to the Oracle home for the database.
Set the ORACLE_SID environment variable to the SID for the database (default is orcl
.)
ORACLE_HOME/bin/lsnrctl start
Start the database instance:
ORACLE_HOME/bin/sqlplus /nolog
SQL> connect SYS as SYSDBA
SQL> startup
SQL> quit
Start the Oracle WebLogic Server Administration Server as described in Section 4.2.2.
If you have not already done so, configure Node Manager, as described in Section 4.2.1.
Ensure Node Manager is running. If Node Manager is not running, start it by executing the following command:
(UNIX) DOMAIN_HOME/bin/startNodeManager.sh (Windows) DOMAIN_HOME\bin\startNodeManager.sh
Start Oracle Identity Management system components:
Set the ORACLE_HOME environment variable to the Oracle home and ORACLE_INSTANCE environment variables for the Identity Management components.
Start OPMN and all system components:
(UNIX) ORACLE_INSTANCE/bin/opmnctl startall (Windows) ORACLE_INSTANCE\bin\opmnctl startall
Start the Oracle WebLogic Server Managed Servers as described in Section 4.2.3.2. Any applications deployed to the server are also started.
Start OPMN and all other system components, such as Oracle HTTP Server.
Set the ORACLE_HOME and ORACLE_INSTANCE environment variables to the Oracle home and Oracle instance for the system components.
Start OPMN and all system components in that Oracle instance:
(UNIX) ORACLE_INSTANCE/bin/opmnctl startall (Windows) ORACLE_INSTANCE\bin\opmnctl startall
If your environment includes components that are targets monitored by Oracle Management Agent, start Oracle Management Agent, as described in Section 4.5.
To stop an Oracle Fusion Middleware environment:
Stop system components, such as Oracle HTTP Server. You can stop them in any order.
Set the ORACLE_HOME and ORACLE_INSTANCE environment variables to the Oracle home and Oracle instance for the system components.
Stop OPMN and all system components in that Oracle instance:
(UNIX) ORACLE_INSTANCE/bin/opmnctl stopall (Windows) ORACLE_INSTANCE\bin\opmnctl stoptall
If your environment includes components that are targets monitored by Oracle Management Agent, stop Oracle Management Agent, as described in Section 4.5.
Stop the Oracle WebLogic Server Managed Servers, as described in Section 4.2. Any applications deployed to the server are also stopped.
Stop Oracle Identity Management components:
Set the ORACLE_HOME environment variable to the Oracle home for the Identity Management components.
Stop OPMN and all system components:
(UNIX) ORACLE_INSTANCE/bin/opmnctl stopall (Windows) ORACLE_INSTANCE\bin\opmnctl stoptall
Stop the Administration Server as described in Section 4.2.2.
If you want to stop Node Manager, you can use the kill command:
kill -9 PID
Stop any database-based repository:
Set the ORACLE_HOME environment variable to the Oracle home for the database.
Set the ORACLE_SID environment variable to the SID for the database (default is orcl
).
Stop the database instance:
ORACLE_HOME/bin/sqlplus /nolog
SQL> connect SYS as SYSDBA
SQL> shutdown
SQL> quit
Stop the Net Listener:
ORACLE_HOME/bin/lsnrctl stop
This section contains the following special topics about starting and stopping Oracle Fusion Middleware:
There are special considerations and procedures for starting and stopping High Availability environments, such as:
Oracle Fusion Middleware Cold Failover Cluster
Oracle Application Server Disaster Recovery
See:
Oracle Fusion Middleware High Availability Guide for information about starting and stopping in high-availability environments
If you find that the Oracle Database instance is taking a long time to shut down, you can use the following commands to force an immediate shutdown:
ORACLE_HOME/bin/sqlplus /nolog
SQL> connect SYS as SYSDBA
SQL> SHUTDOWN IMMEDIATE;
An immediate database shutdown proceeds with the following conditions:
No new connections are allowed, nor are new transactions allowed to be started, after the statement is issued.
Any uncommitted transactions are rolled back. (If long uncommitted transactions exist, this method of shutdown might not complete quickly, despite its name.)
Oracle does not wait for users currently connected to the database to disconnect. Oracle implicitly rolls back active transactions and disconnects all connected users.
The next startup of the database will not require any instance recovery procedures.
See Also:
Oracle Database Administrator's Guide in the Oracle Database 11g documentation library