How to stop, start and restart an Oracle WebLogic Server?

Oracle WebLogic Server is a Java EE application server currently developed by Oracle Corporation. You can start, stop and restart both the administration and the managed servers in two ways:

  1. Using the WebLogic Server Administration Console
  2. Using WebLogic Scripting Tool (WLST)

1) Stop and start an Oracle WebLogic Server using the WebLogic Server Administration Console

This is only possible if your Admin Server has been started using a node manager. See nmConnect (https://docs.oracle.com/middleware/1213/wls/WLSTC/reference.htm#WLSTC476) Using WLST Commands to Start the Administration Server

  1. Navigate to the Oracle WebLogic Server Administration console
    • https://YOUR_MACHINE_URL:THE_ADMIN_SERVER_PORT/console
  2. Login with the WebLogic username and password
  3. Under YOUR_DOMAIN on the left, expand Environment.
  4. Select Servers.
  5. Select the Control tab.
  6. Click the checkbox to the left of each Managed Server name. (If you don’t see a checkbox it means you don’t have the right user)
  7. Click Start.
  8. On the Server Life Cycle Assistant, click Yes. The server state changes to STARTING.
  9. Click the Refresh icon. The server state changes to RUNNING.

2) Stop and start an Oracle WebLogic Server using WebLogic Scripting tool WLST

To stop and start an Oracle WebLogic Server using WebLogic Scripting tool WLST you’ll need ssh access to the UNIX instance running your WebLogic and sudo access to the WebLogic user. This allows you access to the default start and stop script shipped with your WebLogic installation.

# 1) First step is to sudo as the unix user with weblogic access (replace YOUR_SUDO_USER with yours)
ssh YOUR_USER@YOUR_LINUX_SERVER
sudo su - YOUR_SUDO_USER
# 2) Locate your installed weblogic domain start file
find / -name startManagedWebLogic.sh -type f -print 2>/dev/null
#or if you use mlocate
locate startManagedWebLogic.sh
## After a while this command should print something like :
##/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startManagedWebLogic.sh
# (Optionnal) set the stopWeblogic.sh to force = true so you don't have to wait endlessly for all activity to be over
vim /YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/stopWeblogic.sh
#update this field from echo "shutdown('${SERVER_NAME}', 'Server', ignoreSessions='true')" >> "shutdown-${SERVER_NAME}.py" to
echo "shutdown('${SERVER_NAME}', 'Server', force="true", ignoreSessions='true')" >> "shutdown-${SERVER_NAME}.py"
# 3) Run to stop a Managed Weblogic Server name YOUR_MANAGED_SERVER :
nohup ./YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/stopManagedWeblogic.sh YOUR_MANAGED_SERVER t3://YOUR_ADMIN_URL:YOUR_ADMIN_PORT >stop_log.out 2>&1 &
# 4) Run to start a Managed Weblogic Server name YOUR_MANAGED_SERVER :
nohup ./YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startManagedWeblogic.sh YOUR_MANAGED_SERVER t3://YOUR_ADMIN_URL:YOUR_ADMIN_PORT >start_log.out 2>&1 &
# 5) Run to stop / start the whole domain :
## STOP
/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/stopWeblogic.sh
## START
/YOUR_SUDO_USER/weblogic/user_projects/domains/YOUR_DOMAIN/bin/startWeblogic.sh >start.out 2>&1 &

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.