Below are the steps to run a managed server on remote machine by setting up a distributed environment :
Consider two physical boxes with weblogic installation on each ( of any required version )
Make sure that the directory structure of WLS on both the physical boxes are identical.
Same WLS versions installed on both of them.
Create a domain on both the physical boxes.
Configuration that needs to be done on the local machine ( i.e the physical box where the Admin server is running )
Start the Admin server and login to the console.
Create a managed server ( say MS_remote ) and let the listen address of this server be the IP address/DNS name of the remote physical box.
Now create a virtual machine on the console ( say remote_mac )and add the managed server ” MS_remote ” to it. Let the listen address of this machine be the IP address/DNS name of the remote physical box.
Click remote_mac –> ” Nodemanager ” tab.
Specify the nodemanager listen address as the the IP address/DNS name of the remote physical box.
Check if the listen port is “5556″ and type is plain.
Below are the configurations that needs to be done on the remote physical box :
Edit the nodemanager.properties files located in //common/nodemanager/ and make the folowing changes :
Open a command prompt on the remote physical box and run the following commands :
– Run setDomain.env to set the environment. ( located in /user_projects/domains//bin )
– Start WLST using the command below :
– C:\ java weblogic.WLST
Initializing Weblogic Scripting Tool (WLST)…
Welcome to Weblogic Server Administration Scripting Shell
Type help () for help on available commands
– wls:/offline> connect()
Now you will be prompted for the required details as follows
Please enter your username [weblogic]: weblogic
Please enter your password [weblogic]: ********
Please enter your server URL [t3://localhost:7001]: t3://10.10.71.24:7001
Connecting to t3://10.10.71.24:7001 with userid weblogic…
Successfully connected to Admin Server ‘AdminServer’ that belongs to domain ‘base_domain’.
Now lets enroll this machine using the command nmEnroll()
Wls: /base_domain/serverConfig> nmEnroll ()
Enrolling this machine with the domain directory at D:/BEA_Home/WLS_Home/com
Successfully enrolled this machine with the domain directory at D:/BEA_Home/WLS_Home/com
Note : Most of the time we get errors while running the nmEnroll command, check out the NOTES at the end of this document to learn more about nmEnroll().
Now goto admin console and check the status of the node manger. It should be active –> reachable
Start the managed server ‘MS_remote ‘.
You can see the folder ‘MS_remote’ created under /common/nodemanager/servers in which you can see the logs. ( on the remote physical box ).
Remote managed server is successfully configured now and its status should be running
Command Category: Node Manager Commands
Use with WLST: Online
Enrolls the machine on which WLST is currently running.
WLST must be connected to an Administration Server to run this command;
WLST does not need to be connected to Node Manager.
This command downloads the following files from the Administration Server:
– Node Manager secret file (nm_password.properties), which contains the encrypted username and password that is used for server authentication
– SerializedSystemIni.dat file
– This command also updates the nodemanager.domains file under the WL_HOME/common/nodemanager directory with the domain information, where WL_HOME refers to the top-level installation directory for WebLogic Server.
You must run this command once per domain per machine unless that domain shares the root directory of the Administration Server.
If the machine is already enrolled when you run this command, the Node Manager secret file (nm_password.properties) is refreshed with the latest information from the Administration Server.
In the event of an error, the command returns a WLSTException.
Argument – domainDir – Optional.
Path of the domain directory to which you want to save the Node Manager secret file (nm_password.properties) and SerializedSystemIni.dat file.
This argument defaults to the directory in which WLST was started.
Argument – nmHome – Optional.
Path to the Node Manager home.
The nodemanager.domains file, containing the domain information, is written to this directory.
This argument defaults to WL_HOME/common/nodemanager, where WL_HOME refers to the top-level installation directory for WebLogic Server.
The following example enrolls the current machine with Node Manager and saves the Node Manager secret file (nm_password properties) and SerializedSystemIni.dat file to c:/bea/mydomain/common/nodemanager/nm_password.properties.
The nodemanager.domains file is written to WL_HOME/common/nodemanager by default.
Enrolling this machine with the domain directory at c:\bea\mydomain\common\nodemanager….
Successfully enrolled this machine with the domain directory at C:\bea\mydomain\common\nodemanager
Syntax for WLST Commands :
Follow this syntax when entering WLST commands or writing them in a script:
Command names and arguments are case sensitive.
Enclose arguments in single or double quotes. For example,
If you specify a backslash character (\) in a string, either precede the backslash with another backslash or precede the entire string with a lower-case r character.
The \ or r prevents Jython from interpreting the backslash as a special character.
For example when specifying a file pathname that contains a backslash:
On Linus Machines you can use the following syntax :
Enrolling this machine with the domain directory at //opt//app//beaprd//osb//user_projects//domains//amp …
Successfully enrolled this machine with the domain directory at /opt/app/beaprd/osb/user_projects/domains/amp.