Fusion Middleware Documentation
Advanced Search


Administering Oracle Fusion Middleware
Close Window

Table of Contents

Show All | Collapse

4 Starting and Stopping Oracle Fusion Middleware

This chapter describes procedures for starting and stopping Oracle Fusion Middleware, including the Administration Server, Managed Servers, and components.

It contains the following sections:

4.1 Overview of Starting and Stopping Procedures

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.

4.2 Starting and Stopping Oracle WebLogic Server Administration and Managed Servers

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:

4.2.1 Starting and Stopping Administration Server

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]

4.2.2 Starting and Stopping Node Manager

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.8.1 for more information.

You can start Node Manager using the WLST command line or a script.

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.

4.2.3 Starting and Stopping Managed Servers

You can start and stop Managed Servers using Fusion Middleware Control or WLST commands and scripts, as described in the following topics:

4.2.3.1 Starting and Stopping Managed Servers Using Fusion Middleware Control

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, you must first configure Node Manager, as described in Section 2.8.1.

To start or stop a WebLogic Server Managed Server using Fusion Middleware Control:

  1. From the navigation pane, expand the domain.

  2. Select the Managed Server.

  3. 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.

4.2.3.2 Starting and Stopping Managed Servers Using Scripts

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

For information about using WLST to start and stop Managed Servers, see "Managing the Server Life Cycle" in Understanding the WebLogic Scripting Tool.

4.2.4 Enabling Servers to Start Without Supplying Credentials

You can enable the Administration Server and Managed Servers to start without prompting you for the administrator user name and password.

  1. For the Administration Server, create a boot.properties file:

    1. Create the following directory:

      DOMAIN_HOME/servers/AdminServer/security
      
    2. 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
      
  2. For each Managed Server:

    1. Create the following directory:

      DOMAIN_HOME/servers/server_name/security
      
    2. Copy the boot.properties file you created for the Administration Server to the security directory you created in the previous step.

  3. 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.

4.2.5 Setting Up Oracle WebLogic Server as a Windows Service

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 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

4.3 Starting and Stopping Components

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:

4.3.1 Starting and Stopping Components Using Fusion Middleware Control

To start or stop a component:

  1. From the navigation pane, navigate to the component.

  2. Select the component, such as OHS.

  3. From the dynamic target menu, choose Control, then Start Up or Shut Down.

4.3.2 Starting and Stopping Components Using the Command Line

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 can use scripts to call WLST commands to start and stop the components, as described in the following topics:

4.3.2.1 Starting and Stopping Java 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 Web Services Manager Policy Manager, use the following command:

startApplication("wsm-pm")

4.3.2.2 Starting and Stopping System Components

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 Oracle HTTP Server in a standalone domain or a WebLogic Server domain.

    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.

4.4 Starting and Stopping Fusion Middleware Control

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.

4.5 Starting and Stopping Applications

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:

4.5.1 Starting and Stopping Java EE Applications Using Fusion Middleware Control

To start or stop a Java EE application using Fusion Middleware Control:

  1. From the navigation pane, expand Application Deployments.

  2. Select the application.

  3. From the Application Deployment menu, choose Control, then Start Up or Shut Down.

4.5.2 Starting and Stopping Java EE Applications Using WLST

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.

4.6 Starting and Stopping Your Oracle Fusion Middleware Environment

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.

4.6.1 Starting an Oracle Fusion Middleware Environment

To start an Oracle Fusion Middleware environment:

  1. Start the database that hosts the metadata schemas. The following steps illustrate one method for starting the database.

    1. Navigate to the location of the database. For example, the database may reside on a different host than Oracle Fusion Middleware.

    2. Set the ORACLE_HOME environment variable to the Oracle home for the database.

    3. Set the ORACLE_SID environment variable to the SID for the database (default is orcl.)

    4. Start the Net Listener:

      ORACLE_HOME/bin/lsnrctl start
      
    5. 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.

  2. Start the Oracle WebLogic Server Administration Server as described in Section 4.2.1.

  3. Start Node Manager as described in Section 4.2.2.

  4. Start any Oracle Identity Management components, such as Oracle Internet Directory, which form part of your environment.

  5. Start the Oracle WebLogic Server 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.

  6. 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
    

4.6.2 Stopping an Oracle Fusion Middleware Environment

To stop an Oracle Fusion Middleware environment:

  1. 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
    
  2. Stop the Oracle WebLogic Server Managed Servers, as described in Section 4.2. Any applications deployed to the server are also stopped.

  3. Stop any11g Oracle Identity Management components, such as Oracle Internet Directory, which form part of your environment.

  4. Stop the Administration Server as described in Section 4.2.1.

  5. Stop Node Manager as described in Section 4.2.2.

  6. Start the database that hosts the metadata schemas. The following steps illustrate one method for stopping the database.

    1. Navigate to the location of the database. For example, the database may reside on a different host than Oracle Fusion Middleware.

    2. Set the ORACLE_HOME environment variable to the Oracle home for the database.

    3. Set the ORACLE_SID environment variable to the SID for the database (default is orcl).

    4. Stop the database instance:

      ORACLE_HOME/bin/sqlplus /nolog
      SQL> connect SYS as SYSDBA
      SQL> shutdown
      SQL> quit
      
    5. Stop the Net Listener:

      ORACLE_HOME/bin/lsnrctl stop
      

      For more information about stopping an Oracle Database, see the Oracle Database Administrator's Guide.

4.7 Starting and Stopping: Special Topics

This section contains the following special topics about starting and stopping Oracle Fusion Middleware:

4.7.1 Starting and Stopping in High Availability Environments

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 the High Availability Guide for information about starting and stopping in high-availability environments.

4.7.2 Forcing a Shutdown of Oracle Database

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