Book Image

Oracle WebLogic Server 12c Advanced Administration Cookbook

By : Dalton Iwazaki
Book Image

Oracle WebLogic Server 12c Advanced Administration Cookbook

By: Dalton Iwazaki

Overview of this book

Table of Contents (15 chapters)
Oracle WebLogic Server 12c Advanced Administration Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Starting/Stopping the WebLogic Managed Server


This recipe will show how to start and stop the WebLogic Managed Server from the Administration Console.

Getting ready

The Node Manager must be up and running in each of the computers of the WebLogic domain.

How to do it...

Carry out the following steps to start and stop the WebLogic Managed Server:

  1. Access the Administration Console with your web browser at http://prod01.domain.local:7001/console.

  2. Navigate to the Settings for Domain page by clicking on Home and then Domain or by clicking the PROD_DOMAIN link.

  3. Click on the Control tab.

  4. Select the checkbox to the left of the WebLogic Server name, and click on the Start button to start the servers or the Shutdown button to shutdown. The Shutdown button has two options: When work completes or Force Shutdown Now. Select Force Shutdown Now.

  5. Confirm the operation by clicking on the Yes button on the Server Life Cycle Assistant page.

How it works...

When a start/stop operation is invoked for Managed Server, the Administration Console issues this command to the Node Manager. The Node Manager receives the startup parameters and credentials from the Administration Console and starts the Managed Server.

The Managed Server then contacts the Administration Server and checks for configuration changes and if necessary, updates it. If the Administration Server is not reachable, the Managed Server uses the local copy of the configuration from the $DOMAIN_HOME/config/* directory.

It's possible to start the WebLogic Server instances without the Node Manager; but unless you have your own monitoring and high availability method to the WebLogic domain, it is recommended to use the Node Manager in production environments.

There's more...

The Managed Server can also be started and stopped using WLST.

Starting/stopping the Managed Servers with WLST and the Node Manager

Carry out the following steps:

  1. Log in as a wls user to shell and start WLST:

    [wls@prod01]$ $WL_HOME/common/bin/wlst.sh
    
  2. Connect to the Administration Server using wlsadmin as the user, <pwd> as the password, and t3://prod01.domain.local:7001 as the server URL:

    wls:/offline>connect("wlsadmin","<pwd>","t3://prod01.domain.local:7001")
    
  3. Run the following WLST command to start PROD_Server01:

    start('PROD_Server01','Server')
    
  4. To stop the Managed Server, type the following command:

    shutdown('PROD_Server01','Server')
    

The WLST method works the same way as the Administration Console. The Administration Console and WLST are both clients accessing the Node Manager, and both invoke start/stop operations on it.

Starting/stopping with the provided shell script

You can use the startManagedWebLogic.sh and stopManagedWebLogic.sh script located at the $DOMAIN_HOME/bin directory:

  1. Go to the WebLogic domain's bin directory:

    [wls@prod01]$ cd $DOMAIN_HOME/bin
    
  2. Start the Managed Server PROD_Server01 typing:

    [wls@prod01]$ ./startManagedWebLogic.sh PROD_Server01 t3://prod01.domain.local:7001
    
  3. The server will initiate the startup process and ask for a WebLogic administrator username and password:

    Enter username to boot WebLogic server: wlsadmin
    Enter password to boot WebLogic server:
    
  4. Type wlsadmin as the username and <password> you previously specified at the domain creation as the password.

  5. The WebLogic Managed Server will start.

  6. To stop the PROD_Server01 Managed Server, provide the credentials wlsadmin/<password>:

    [wls@prod01]$ ./stopManagedWebLogic.sh PROD_Server01 t3://prod01.domain.local:7001
    Stopping Weblogic Server...
    
    Initializing WebLogic Scripting Tool (WLST) ...
    
    Welcome to WebLogic Server Administration Scripting Shell
    
    Type help() for help on available commands
    
    Please enter your username :wlsadmin
    Please enter your password :<password>
    Connecting to t3://prod01.domain.local:7001 with userid wlsadmin ...
    Successfully connected to Admin Server 'PROD_AdminServer' that belongs to domain 'PROD_DOMAIN'.
    
    Warning: An insecure protocol was used to connect to the
    server. To ensure on-the-wire security, the SSL port or
    Admin port should be used instead.
    
    Shutting down the server PROD_Server01 with force=false while connected to PROD_AdminServer ...
    
    Exiting WebLogic Scripting Tool.
    
    Done
    

Note

Scripts usage

startManagedWebLogic.sh <serverName> <admin_url>

stopManagedWebLogic.sh <serverName> <admin_url>

stopManagedWebLogic.sh <serverName> <admin_url> <user> <password>

The boot.properties file must be created the same way it was created before in order to provide the credentials, otherwise WebLogic will not start.

Tip

WebLogic Server will look for the credentials provided in the boot.properties file under $DOMAIN_HOME/servers/<servername>/security/ when starting from the script.

On the other hand, the credentials will be stored automatically in $DOMAIN_HOME/servers/<servername>/data/nodemanager/boot.properties if the startup command is issued to the Node Manager. WebLogic Server will not ask for the username/password.

See also

  • Starting the Node Manager

  • Starting the Administration Server