It's all about Weblogic..!!

June 30, 2010

Steps to run a managed server on remote machine by setting up a distributed environment

Filed under: Core — streethawkz @ 2:37 pm

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 )
Note :
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 :
– ListenAddress=
– ListenPort=5556
– SecureListener=false
– StartScriptEnabled=false
.
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>
*************************************************************
– 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
mon/nodemanager…
Successfully enrolled this machine with the domain directory at D:/BEA_Home/WLS_Home/com
mon/nodemanager
.
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
—————-
.
NOTES :
.
nmEnroll :
.
Command Category: Node Manager Commands
Use with WLST: Online
.
Description
.
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.
.
Syntax :
.
nmEnroll([domainDir], [nmHome])
.
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.
.
Example :
.
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.
wls:/mydomain/serverConfig> nmEnroll(‘c:/bea/mydomain/common/nodemanager’)
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
wls:/mydomain/serverConfig>
—————-
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,
‘newServer’
or
“newServer”.
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:
readTemplate(‘c:\\userdomains\\mytemplates\\mytemplate.jar’)
or
readTemplate(r’c:\userdomains\mytemplates\mytemplate.jar’)
On Linus Machines you can use the following syntax :
Example :
nmEnroll (‘//opt//app//beaprd//osb//user_projects//domains//amp’)
or
nmEnroll (‘//opt//app//beaprd//osb//user_projects//domains//amp’,’//opt//app//beaprd//osb//wlserver_10.3//common//nodemanager’)
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.
or
nmEnroll()

11 Comments »

  1. great great logic

    Comment by lkafle — December 7, 2011 @ 9:41 am

  2. wonderful Info thanks for sharing

    Comment by Urs Friend Subha — October 10, 2012 @ 12:24 am

  3. A lot of thanks. Can toy explain, why i should create DOMAIN on both physical boxex?

    Comment by Andrii — November 1, 2012 @ 3:20 pm

    • You can either create a new domain on both physical machines or copy the domain from one machine to another…

      Sent from my HTC OneX

      Comment by streethawkz — November 1, 2012 @ 5:15 pm

  4. Hey There. I discovered your weblog the use of msn. This is a really neatly written article.
    I will be sure to bookmark it and come back to learn extra of your useful
    information. Thank you for the post. I’ll certainly return.

    Comment by Streetwear Brands — January 6, 2013 @ 9:47 am

  5. Thanks for sharing your info. I really appreciate your efforts and
    I am waiting for your next write ups thanks once again.

    Comment by www.online5casinos.com — June 17, 2013 @ 12:06 pm

  6. Very good article! We are linking to this great article on
    our website. Keep up the good writing.

    Comment by Harold — August 11, 2013 @ 11:22 pm

  7. If you are just starting to study Asian, remaining inspired is important
    for obtaining final results. Not so, Mike’s book is full of practical information and facts and
    ideas, and is an ideal study for all in search of the Intruth”. While the leaf turned the river a golden color the emperor drank it regardless and extremely much enjoyed it.

    Comment by Shelly — April 3, 2014 @ 7:09 am

  8. I think this is one of the most significant information for me.
    And i’m glad reading your article. But wanna remark on few general things,
    The site style is ideal, the articles is really nice :
    D. Good job, cheers

    Comment by Chimney cleaners Multnomah county — April 22, 2014 @ 2:40 am

  9. I hope we have to create domain in machine A and we have to tar in machine A and untar in machine B .after this we have to do this domain enroll right and this we call it horizontal .if i am wrong pls excuse..

    And thanks alot bro to share u r valuable time to write this post …..

    Comment by Harish — October 25, 2014 @ 8:30 pm

  10. And bro could you please post me horizontal cluster step by step please ….

    Comment by Harish — October 25, 2014 @ 8:31 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: