Tuesday, September 13, 2011

WebLogic Domains, Servers, Machines and Node Managers

It's been awhile since my last post. In my current project, I need to be able to use WebLogic more effectively - that got me started on using its servers/machines functionality.

Previously, I simply created a single domain and deployed all my apps on the Admin domain. According to my tech support, this is not best practice. Since my company apps is deployed as separate war files and each war is quite memory intensive, the recommendation is to create a new server (leave the domain as what it is meant for - administrative purpose only) and deploy each app on its own server.

So how do you configure this then?

To create a Managed Server in an existing domain:

1.If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
2.In the left pane of the Console, select Environment > Servers.
3.In the Servers table, click New.
4.On the Create a New Server: Server Properties page:
a.Enter the name of the server in the Name field.
Each server within a domain must have a name that is unique for all configuration objects in the domain. Within a domain, each server, machine, cluster, JDBC connection pool, virtual host, and any other resource type must be named uniquely and must not use the same name as the domain.

The server name is not used as part of the URL for applications that are deployed on the server. It is for your identification purposes only. The server name displays in the Administration Console, and if you use WebLogic Server command-line utilities or APIs, you use this name to identify the server.

b.In Listen Address, if you want to limit the valid addresses for a server instance, enter an IP address or DNS name. Otherwise, URLs to the server can specify any of the host computer's IP address, any DNS name that maps to one of the IP addresses, or the localhost string.
See Configuration Options.

c.In Listen Port, enter the port number from which you want to access the server instance.
If you run multiple server instances on a single computer, each server must use its own listen port.

d.Specify whether or not this server will be a stand alone server or will belong to a cluster.
If this server is part of a cluster:

•Select an existing cluster from the drop down list.
•Select the button to create a new cluster
See Create a cluster.

e.Click Next.
f.Review the configuration options you have chosen.
g.Click Finish.
5.To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
Not all changes take effect immediately—some require a restart (see Use the Change Center).


Create and configure machines to run on UNIX


A machine is the logical representation of the computer that hosts one or more WebLogic Server instances. Each managed server must be assigned to a machine.

To create and configure

1.If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
2.In the Administration Console, expand Environment and select Machines. The Machines table displays in the right pane showing all the machines defined in the domain.

3.Click New.
4.Enter a name for the new machine in the Name attribute field.
This name is used to identify the machine within the WebLogic Server domain. This name does not have to correspond to the machine's network name.

5.Select UNIX in the Machine OS field.
6.Click Ok. The new machine is displayed in the Machines table.

7.Select the name of the machine you just created.
8.Select the Configuration tab, then select General.
a.To specify a non-privileged user account under which the server instance runs, place a check mark in the Enable Post-bind UID field and enter the user ID in the Post-Bind UID field.
The user ID that you enter must have read, write, and execute privileges within the BEA Home directory, the WebLogic Server product directory tree, and your domain directory.

The default value of the Post-Bind UID field, nobody, is a standard UNIX account that provides the least possible privileges. While the nobody account is acceptable for use in a development environment, in a production environment, BEA recommends that you create an operating-system user account specifically for running instances of WebLogic Server. See "Securing the WebLogic Server Host."

b.To specify a non-privileged group instead of (or in addition to) providing a user ID, place a check mark in the Enable Post-bind GID field and enter the group ID in the Post-Bind GID field.
9.Select the Node Manager tab.
a.Select the Node Manager type from the drop down box in the Type field.
For more information on different Node Manager types, see Node Manager Administrator's Guide.

b.Enter the DNS name or IP address upon which Node Manager listens in the Listen Address box.
If you identify the Listen Address by IP address, you must disable Host Name Verification on Administration Servers that will access Node Manager. For more information and instructions, see "Using Hostname Verification" in Managing WebLogic Security.

c.Enter a value in the Listen Port field. This is the port where Node Manager listens for incoming requests.
d.If you have set the Type field to SSH or RSH, you should specify values in the Node Manager Home and Shell Command fields.
For more information on configuring Node Manager using SSH or RSH, see Node Manager Administrator's Guide.

10.Click Save.
11.To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
Not all changes take effect immediately—some require a restart (see Use the Change Center).



Assign server instances to machines
Before you begin

Ensure you have created a machine and the Managed Server you want to add to it. For information on creating a Managed Server, see Create Managed Servers.



1.If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
2.In the Administration Console, expand Environment and select Servers.
3.Click the name of the server to which you wish to assign a machine.
4.Click the Configuration tab, then click General.
5.Select the machine you want to assign the server to in the Machine field.
Note: You cannot change the machine of the Administation Server using the Administration Console. You cannot change the cluster or machine of a running server.

6.Click Save.
7.To activate these changes, in the Change Center of the Administration Console, click Activate Changes.



Finally configure the username and password under the Server -> Configuration -> Server Start


Then you can start the server using ./startManagedWebLogic.sh 81Platform http://localhost:7001