Home » Oracle » Weblogic » How to start/stop Node manager and Managed server in Weblogic

How to start/stop Node manager and Managed server in Weblogic

We will be discussing weblogic Node manager and managed server start/stop in this article.

How to stop/start Node Manager in Weblogic

  • The Node Manager is the WebLogic Server utility to control the lifecycle—start, stop, and restart of the WebLogic Managed Server instances and the Administration Server.
  • It should be available on each and every node in a distributed Weblogic env
  • Suppose you have created a domain TEST_DOMAIN consisting of two servers test01 and test02. Then node manager should be activated on both the nodes

How to start the Node manager
(1)Log in as the oracle user on the machine test01 where the weblogic server is installed and set the below environment variable

JAVA_HOME=/u00/app/oracle/jdk1.70_21
export JAVA_HOME
MW_HOME=/u00/app/oracle/weblogic
export MW_HOME
WL_HOME=/u00/app/oracle/weblogic/wlserver_10.3
export WL_HOME
DOMAIN_NAME=/u00/app/oracle/weblogic/user_projects/domain/test_domain
export DOMAIN_NAME

(2) Navigate to the below folder

$ cd $WL_HOME/server/bin

(3) Start the Node Manager in the background. Since it’s the first time you are starting it, the $WL_HOME/common/nodemanager/nodemanager.properties file will be created.

$ nohup ./startNodeManager.sh & 
[1] <6962>
nohup: appending output to `nohup.out'

(3) Do the same on the test02 machine and on all the machines of the WebLogic domain.


How Node manager works
(1) You can leave the default values created for nodemanager.properties.
The Node Manager has started and is listening to port 5556. The <PID> value is the number of the newly created process.

(2) The node manager running on the server test01 and test02 should be reachable and able to receive start and stop commands from the Administration Console.

See also  Initialization SQL Statement - Custom" (FND_INIT_SQL) profile option

How to shutdown the Node Manager
There is no formal command to shut down the Node Manager, so you’ll have to do it manually, killing the process:
1. Find the <PID>value of the Node Manager process:

$ ps aux | grep weblogic.NodeManager | grep -vgrep | awk '{print $2} '
<PID>

2. Issue a kill command to PID to finish it:

$ kill <PID>

Starting/Stopping the WebLogic Managed Server


Suppose you have created the Managed server in your weblogic domain as part of the configuration, Now how to start them

There are two possible ways to execute it

(1) With the help of Node manager
(2) Without the help of Node manager

I will be explaining in detail both these options

With the help of Node manager

(1) For this option, Node manager should be running on each weblogic node. Read the above section on how to configure and start it up

(2) Now Access the Administration Console with your web browser at

http://<admin url >/console.

Navigate to the Settings for Domain page by clicking on Home and then Domain or by clicking the TEST_DOMAIN link.
(3) Click on the Control tab.
(4) Select the checkbox to the left of the WebLogic Server name -> 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.
See also  How to submit a concurrent program from the backend

The Managed Server can also be started and stopped using WLST with the Node Manager
Here are the steps to start 

1. Log in as the oracle user on the machine test01 where the weblogic server is installed and set the below environment variable

JAVA_HOME=/u00/app/oracle/jdk1.70_21 
export JAVA_HOME
MW_HOME=/u00/app/oracle/weblogic
export MW_HOME
WL_HOME=/u00/app/oracle/weblogic/wlserver_10.3
export WL_HOME
DOMAIN_NAME=/u00/app/oracle/weblogic/user_projects/domain/test_domain
export DOMAIN_NAME

2. Now start WLST

$WL_HOME/common/bin/wlst.sh 

3 . Connect to the Administration Server using wlst as the user, <pwd> as the password, and t3://<admin url> as the server URL:

wls:/offline>connect("weblogic","<pwd>","t3://<admin url>")

4. Run the following WLST command to start mang_test01( Manage server)

start('mang_test01','Server')

The above command will start the managed server

5. Now similarly we can stop the managed server
To stop the Managed Server, type the following command:

shutdown('mang_test01','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.

Without the help of Node manager

(1) You can use the startManagedWebLogic.sh and stopManagedWebLogic.sh script located at the $DOMAIN_HOME/bin directory:
(2)Log in as the oracle user on the machine test01 where the weblogic server is installed and set the below environment variable

JAVA_HOME=/u00/app/oracle/jdk1.70_21
export JAVA_HOME
MW_HOME=/u00/app/oracle/weblogic
export MW_HOME
WL_HOME=/u00/app/oracle/weblogic/wlserver_10.3
export WL_HOME
DOMAIN_NAME=/u00/app/oracle/weblogic/user_projects/domain/test_domain
export DOMAIN_NAME

Go to the WebLogic domain’s bin directory and Start the Managed Server mang_test01 using the below command

cd $DOMAIN_HOME/bin
$ ./startManagedWebLogic.sh mang_test01 t3://<admin url>


(3) The server will initiate the startup process and ask for a WebLogic administrator username and password:
Enter a username to boot the WebLogic server: weblogic
Enter the password to boot the WebLogic server:
(4) Type weblogic 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 mang_test01 Managed Server, provide the credentials
weblogic/<password>:
$ ./stopManagedWebLogic.sh mang_test01 t3://<admin url>

See also  How to perform Installation of an EBS 12.2 Vision Instance

Note
Scripts usage

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

How to avoid entering the weblogic username and password and start it in the background

1. Go to the Managed Server root folder:

$ cd $DOMAIN_HOME/servers/<servername>/security/

2. Create a new file called boot. properties with weblogic as the username and the
<password> value you specified:


$ echo -ne “username=weblogic\npassword=
<password>” > boot.properties
$ cat boot.properties
username=weblogic
password=<password>

The next time you start WebLogic Managed, it will use the credentials from the boot.properties file. The file will also be encrypted:

cat boot.properties
password={PES}I0giDJGR0FATHnfPsoZvpmF/Ipc\=
username={PES}PsS/IccG3VgZv6LP1zj+Ro1JBDb2ZE\=


3) start the weblogic server in the background

nohup ./startManagedWebLogic.sh <serverName> <admin_url> &
[1] <7585>


The <7585> value is the process ID of the Managed Server. The standard output (stdout) and standard error (stderr) of the process will be appended to a file called $DOMAIN_HOME/bin/nohup.out.

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

Related articles

Weblogic Interview questions: Awesome Weblogic Interview questions to help you |How to access the admin console|States of the Weblogic Server|multicast and unicast
Weblogic Installation: In this article learn how to perform weblogic installation. This is a Step by step instruction guide for this task along with screenshots.
weblogic domain creation : Check out this post for step by step guide for weblogic domain creation,how to avoid giving password while starting weblogic administration server
awk command in Unix

Leave a Comment

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

Scroll to Top