This chapter describes procedures for starting and stopping Oracle Fusion Middleware, including the Administration Server, Managed Servers, and components.
It contains the following sections:
Starting and Stopping Administration and Managed Servers and Node Manager
Starting and Stopping Your Oracle Fusion Middleware Environment
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 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.
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:
You can start and stop the Oracle WebLogic Server Administration Server 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
To stop an Administration Server, use the following script:
DOMAIN_HOME/bin/stopWebLogic.sh username password [admin_url]
By default, Node Manager is configured when you configure Oracle Fusion Middleware. If Node Manager is not configured, it is very important to change the Node Manager property StartScriptEnabled
to True
. If this property is set to False
, you will encounter errors or problems when starting Managed Servers configured for use by Oracle Fusion Middleware components. See Section 2.7.1 for more information.
You can start Node Manager using the WLST command line or a script.
For example, to start Node Manager, use the following script:
(UNIX) DOMAIN_HOME/bin/startNodeManager.sh (Windows) DOMAIN_HOME\bin\startNodeManager.cmd
To stop Node Manager, close the command shell in which it is running.
Alternatively, after having set the nodemanager.properties attribute QuitEnabled to true (the default is false), you can use WLST to connect to Node Manager and shut it down. For more information, see stopNodeManager in the WLST Command Reference for WebLogic Server.
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 JRF or Oracle SOA Suite, you must first configure Node Manager, as described in Section 2.7.1.
To start or stop a WebLogic Server Managed Server using Fusion Middleware Control:
From the navigation pane, expand 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 (Windows) DOMAIN_HOME\bin\stopManagedWebLogic.cmd managed_server_name admin_url
When prompted, enter your user name and password.
For information about using WLST to start and stop Managed Servers, see "Managing the Server Life Cycle" in Understanding the WebLogic Scripting Tool.
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:
DOMAIN_HOME/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:
DOMAIN_HOME/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.1 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.
For more information, see "Boot Identity Files" in Administering Server Startup and Shutdown for Oracle WebLogic Server.
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 Administering 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 Managed 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_home\wlserver\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, navigate to the component.
Select the component, such as OHS.
From the dynamic target menu, choose Control, then Start Up or Shut Down.
If a component is a Java component, you can use WLST commands to start and stop the component. If a component is a system component, you can use scripts to call WLST commands to start and stop the components, as described in the following topics:
To start and stop Java components, use the WLST startApplication
and stopApplication
commands:
startApplication(appName, [options]) stopApplication(appName, [options])
For example, to start Oracle Web Services Manager Policy Manager, use the following command:
startApplication("wsm-pm")
If a component is a system component, you can use scripts to call WLST commands to start and stop the components or you can use WLST commands:
To start and stop system components using scripts, use the startComponent and stopComponent scripts. You can use this method for system components, such as Oracle HTTP Server, in a standalone domain or a WebLogic Server domain. You must invoke them from the host that contains the Administration Server.
The scripts are located in
(UNIX) DOMAIN_HOME/bin (Windows) DOMAIN_HOME\bin
To start or stop a component using these scripts, use the following syntax:
./startComponent.sh component_name [storeUserConfig] [showErrorStack] ./stopComponent.sh component_name [storeUserConfig] [showErrorStack]
In the syntax:
component_name
: The name of the component instance, such as ohs1.
storeUserConfig
: When specified, the script will prompt you for the user name and password. Then, it will ask you if you want to store the user configuration in a properties file. If you specify y
, it creates a user configuration file and an associated key file. The user configuration file contains an encrypted user name and password. The key file contains a secret key that is used to encrypt and decrypt the user name and password. The following shows the names and location of the properties files:
user_home/.wlst/nm-key-domain_name.props user_home/.wlst/nm-cfg-domain_name.props
After you have stored the information in the properties file, when you run the scripts subsequently, you will not be prompted for a user name and password.
showErrorStack
: Provides more detailed error information, including all of the messages in the error stack. Specify this option if you need to determine the cause of errors.
For example, to start an Oracle HTTP Server instance called ohs1:
./startComponent.sh ohs1
You can also use these scripts to start and stop system components remotely. In that case, the scripts read the configuration to determine the location of the component.
To start system components using WLST commands, you can use one of the following methods:
The nmstart command. You can use this method for Oracle HTTP Server in a standalone domain or a WebLogic Server domain.
For example, to start the Oracle HTTP Server component OHS1, use the following WLST commands:
nmConnect(domainName='domain_name', username='username', password='password') nmstart(serverName='OHS1', serverType='OHS')
The WLST start command. You can use this method for Oracle HTTP Server in a standalone domain.
For example, to start the Oracle HTTP Server component OHS1, use the following WLST commands:
connect('username','password','hostname:port') start('OHS1')
To stop system components using WLST commands, use the WLST nmkill command.
For example, to kill the Oracle HTTP Server component OHS1, use the following WLST commands:
nmKill(serverName='ohs1', serverType='OHS')
To decide which method to use, note the following:
If you are using a WLST script, use the WLST commands.
To quickly start and stop system components interactively, use the scripts.
To start and stop system components remotely, use the scripts.
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.1.
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.
For information about starting and stopping Oracle Fusion Middleware components, such as Oracle SOA Suite or Oracle WebCenter Portal, see the administration guide for that component.
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 Understanding the 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 a particular order.
To start an Oracle Fusion Middleware environment:
Start the database that hosts the metadata schemas. The following steps illustrate one method for starting the database.
Navigate to the location of the database. For example, the database may reside on a different host than Oracle Fusion Middleware.
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
.)
Start the Net Listener:
ORACLE_HOME/bin/lsnrctl start
Start the database instance:
ORACLE_HOME/bin/sqlplus /nolog
SQL> connect SYS as SYSDBA
SQL> startup
SQL> quit
For more information about starting an Oracle Database, see the Oracle Database Administrator's Guide.
Start the Administration Server as described in Section 4.2.1.
Start Node Manager as described in Section 4.2.2.
Start any Oracle Identity Management components, such as Oracle Internet Directory, which form part of your environment.
Start the Managed Servers as described in Section 4.2.3.2.
Note: The start up of a Managed Server will typically start up the applications which are deployed to it. Therefore, it should not be necessary to manually start applications after the Managed Server startup.
Start all other system components, such as Oracle HTTP Server:
(UNIX) DOMAIN_HOME/bin/startComponent.sh component_name (Windows) DOMAIN_HOME\bin\startComponent.cmd component_name
To stop an Oracle Fusion Middleware environment:
Stop system components, such as Oracle HTTP Server. You can stop them in any order:
(UNIX) DOMAIN_HOME/bin/stopComponent.sh component_name (Windows) DOMAIN_HOME\bin\stopComponent.cmd component_name
Stop the Managed Servers, as described in Section 4.2. Any applications deployed to the server are also stopped.
Stop any11g Oracle Identity Management components, such as Oracle Internet Directory, which form part of your environment.
Stop the Administration Server as described in Section 4.2.1.
Stop Node Manager as described in Section 4.2.2.
Start the database that hosts the metadata schemas. The following steps illustrate one method for stopping the database:
Navigate to the location of the database. For example, the database may reside on a different host than Oracle Fusion Middleware.
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
For more information about stopping an Oracle Database, see the Oracle Database Administrator's Guide.
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:
active-active solutions
active-passive solutions
See the 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.
For more information about shutting down an Oracle Database, Oracle Database Administrator's Guide in the Oracle Database documentation library