1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to Start and Stop Weblogic Servers

Discussion in 'Oracle Development General' started by mn185015, Apr 19, 2013.

  1. mn185015

    mn185015 Active Member

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    Noida
    There are many ways to start & stop weblogic Admin and managed server(s)

    You can start/stop Admin Server using -

    [A] Script
    "java weblogic.server" command
    [ The weblogic.Server class is the main class for a WebLogic Server instance ]
    [C] From startup option on windows
    [D] WLST with or without node manager

    .
    You can start managed server(s) using -

    [A] scripts
    admin console
    [C] using WLST
    [D] using node manager
    [E] java weblogic.server command
    [ The weblogic.Server class is the main class for a WebLogic Server instance ]


    USING SCRIPTS

    Script To Start Admin Server
    startWebLogic.cmd or .sh

    Script to start Managed Server
    startManagedWebLogic.sh or .cmd
    .
    To Start WebLogic Administration Server

    Go to domain your domain directory

    cd $ORACLE_HOME/user_projects/domains/<your_domain_name>/bin

    On Window run below script
    startWebLogic.cmd

    On unix/Linux, run below script
    $ ./startWebLogic.sh

    Once server start successfully, you will see below message in the server log file
    " <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>"

    Note : - Admin server log file you will find under DOMAIN/servers/<Admin_Server_Name>/logs with name as your_admin_server_name.log as well as your_admin_server_name.out if you are starting using node manager.

    To start Managed Server

    Go to YOUR_DOMAIN/bin
    $ORACLE_HOME/user_projects/domains/<domain_name>/bin

    On windows -
    startManagedWebLogic.cmd [ name_of_your_managed_server ] [ admin_server_url ]

    For example -

    To start managed server with name ManSer1 where admin server running on localhost on port 7001
    startManagedWebLogic.cmd ManSer1 http://localhost:7001


    Note :-

    If you want to start and stop managed servers from admin console then make sure to use node manager otherwise you will get an error message that there is no associated machine with the managed server like below.

    The server JJTU_Server-1 does not have a machine associated with it.

    In this case make sure to create a machine associated with an running active node manager and then assign server to that node manager.


    START USING weblogic.server command

    To start admin server

    First got to your domain/bin and run setDomainEnv.sh, then run below commands

    $ java -Dweblogic.Name=<Admin_Server_Name> -Dweblogic.ConfigFile=config.xml -Dweblogic.RootDirectory=<Path_Of_Your_Domain_Directory> weblogic.Server

    Example -

    java -Dweblogic.Name=JJTU_AdminServer -Dweblogic.ConfigFile=C:\Oracle\Middleware2\user_projects\domains\JJTU_Domain1\config\config.xml -Dweblogic.RootDirectory=C:\Oracle\Middleware2\user_projects\domains\JJTU_Domain1 weblogic.Server


    To start Managed Server

    First got to your domain/bin and run setDomainEnv.sh, then run below commands


    java -Dweblogic.Name=YOUR_MANAGED_SERVER_NAME -Dweblogic.management.server=http://<HOSTNAME_WHERE_ADMIN_RUNNING>:<ADMIN_SERVER_PORT> -Dweblogic.RootDirectory=<Path_Of_Your_Domain_Directory> weblogic.Server

    Example -

    java -Dweblogic.Name=ManSer1 -Dweblogic.management.server=http://localhost:7001 -Dweblogic.RootDirectory=C:\Oracle\Middleware2\user_projects\domains\JJTU_Domain1 weblogic.Server

    where my admin server running on localhost on port 7001 and managed server name is ManSer1 and C:\Oracle\Middleware2\user_projects\domains\JJTU_Domain1 is my domain directory


    To Start/Stop Using WLST


    Note - Make sure to modify host, port, path, server names according to your environment on below mentioned commands

    Go to your domain/bin directory

    run setDomainEnv.[cmd][sh]

    Go to WLST prompt

    java weblogic.WLST

    start node manager using WLST ( if not running there otherwise skip to next step )

    startNodeManager(verbose='true',NodeManagerHome='C:\\Oracle\\Middleware\\wlserver_12.1\\common\\nodemanager',ListenPort='40046',ListenAddress='localhost')

    Connect With Node Manager

    nmConnect('weblogic','webl0gic','localhost','40046','JJTU_Domain1','C:\\Oracle\\Middleware2\\user_projects\\domains\\JJTU_Domain1','plain')

    Start Admin Server

    nmStart('JJTU_AdminServer')

    To Start Managed Server

    connect with admin server

    connect('weblogic','webl0gic','localhost:40510')

    Start Managed Server

    start('ManSer1')