Posted on

How to start Weblogic Node Manager

The Node Manager is a WebLogic Server utility that enables you to start, shut down and restart the Administration Server and the Managed Server instances from a remote location. Although Node Manager is optional, it is highly recommended to use it for applications with high availability requirements.

A Node Manager process is not associated with a specific WebLogic domain but with a Machine. You can use the same Node Manager process to control server instances in any WebLogic Server domain, as long as the server instances reside on the same Machine as the Node Manager process.

The Node Manager must run on each computer that hosts WebLogic Server instances (whether Administration Server or Managed Server) that you want to control with Node Manager.
The Node Manager communicates with Administration Servers and Managed Servers using two-way SSL. The default WebLogic Server installation includes demonstration Identity and Trust keystores that allow you to use SSL out of the box. The keystores—DemoIdentity.jks and DemoTrust.jks—are installed in $MW_HOME\wlserver\server\libfolder.

Starting Weblogic Node Manager

Look up for the script named startNodeManager.sh / startNodeManager.cmd within the folder $MW_HOME\wlserver\server\bin

Before starting the Node Manager, you need to have the correct environment available so, at first, execute the script setWLSEnv which is located as well in the bin folder:

C:\Weblogic\wlserver\server\bin>setWLSEnv.cmd

Next, start the Node Manager using the script:

C:\Weblogic\wlserver\server\bin>startNodeManager.cmd

Now verify that the Node Manager is actually running on the port selected in the Machine configuration:

<23-jul-2012 11.34.09> <INFO> <Plain socket listener started on port 5556>
23-jul-2012 11.34.09 weblogic.nodemanager.server.Listener run INFO: Plain socket listener started on port 5556

The startNodeManager script contains all the JVM options needed to customize the Node Manager process, which will be ultimately triggered by the weblogic.NodeManager class.

Common issues when starting the Node Manager

Since the Node Manager uses by default native libraries to optimize its work, some issues can raise if your environment is not configured properly. A very common issue is:

“weblogic.nodemanager.common.ConfigException: Native version is enabled but node manager native library could not be loaded”

You can fix this by making sure that the Library Path is set properly. There are some variables available like “LD_LIBRARY_PATH (UNIX only)” and “SHLIB_PATH” (For HP-UX operating system) to set the correct Library Path:

Example: (For Solaris/Linux)

export LD_LIBRARY_PATH=$WL_HOME/server/lib/solaris:$WL_HOME/server/lib/solaris/ociXXX_X

Alternatively, you can create/update the file $MW_HOME/wlserver/common/nodemanager/nodemanager.properties (where nodemanager.properties is Node Manager’s properties file created at start-up) with the entry:

NativeVersionEnabled=false

Posted on

Adding a new Weblogic Managed Server

oracle weblogic book oracle weblogic books

Within a Weblogic domain, server instances other than the Administration Server are referred to as Managed Servers. Managed Servers host the components and associated resources that constitute your applications—for example, JSPs and EJBs. When a Managed Server starts up, it connects to the domain’s Administration Server to obtain configuration and deployment settings.
Let’s see how to add a Managed Server from the Administration Console:

1.       Navigate to the Environment | Servers option and click on the “New” button.

2.       The New Server window will let you define the basic server properties. For the purpose of this example, we will choose as Server Name “WLSNode1” and enter 7003 as Server Port. Leave the “No, this is a stand-alone server” option selected in the lower part of the GUI (In Chapter 9 we will describe how to create a cluster from a set of managed nodes).

oracle weblogic book oracle weblogic books

Choose Finish. This will take you to the Servers view which now includes the server WLSNode1 as shown by the following picture:

oracle weblogic book oracle weblogic books

Posted on

Adding a new Weblogic Machine

oracle weblogic book oracle weblogic books

Before creating Weblogic Managed Servers, we will need to define a new Machine to host them. A Machine refers to the logical representation of the computer that is hosting one or more instances of Weblogic Servers. In order to create a new Machine, perform the following steps:

  1. In the left pane of the Console, expand Environment and select Machines. The Machines table displays in the main panel showing all the machines defined in the domain.
  2. Click on the Add button. The following screen will be displayed:

oracle weblogic book oracle weblogic books

oracle weblogic book oracle weblogic books

The Machine 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.

In the lower part of this form, you have the option to select the operating system where the machine is running. This has relevance especially if you are using Unix. (In one minute we will show the impact of this choice). Click Next.

As shown by the following screen, you need to select the properties that will be used to configure the Node Manager on this machine.

oracle weblogic book oracle weblogic books

oracle weblogic book oracle weblogic books

By default the communication between the Administration server and the Node Manager is secured using the SSL protocol. If you are having troubles in connecting to the Node Manager the “Debug Enabled” option can provide additional information in the log files of the Node Manager.

Click on Finish to complete the Machine creation. Once created a new Machine, the administration server will be able to use the Machine definition of the computer with Node Manager in order to start the remote servers.

Posted on

How to disable on demand deployment of Weblogic console?

oracle weblogic book oracle weblogic books

As we said, by default the Oracle Weblogic console is deployed on demand (that is, on first request). If you want to have it deployed as part of the boot process, perform the following tasks:

1. Log on to the WebLogic console and click on your domain (e.g. base_domain), in the left navigation bar of the WLS console.

2. Open the Configuration tab and then the General sub-tab; deselect the checkbox labeled “Enable on-demand deployment of internal applications” and Click on the Save button.

oracle weblogic book oracle weblogic books

Posted on

Configuring Weblogic using the Console

oracle weblogic book oracle weblogic books

Through the Administration Console, System administrators can easily perform all WebLogic Server management tasks without having to learn the low level API or the underlying management architecture. The Administration Server persists changes to attributes in the config.xml file for the domain you are managing.

In the following recipes we will learn how to move our first steps with the Administration Console; as we said, the Administration Console is accessible by default at the following address: http://localhost:7001/console.

Now type in the user and password you have entered in the server installation. Once logged in, here is how the Administration Console looks like:

oracle weblogic book oracle weblogic books

As you can see, the Administration Console is composed of several panels; the most interesting ones for us are the following:

1.       The Change Center Panel

To provide secure and predictable means for distributing configuration changes in a domain, Weblogic Server uses a change management process that loosely resembles a database transaction. Therefore, you need to acquire the configuration with a Lock & Edit before performing changes on it and commit changes using the Release Configuration.

oracle weblogic book oracle weblogic books

In development environment, the lock-acquire and release is done automatically for you by Oracle WLS. If you want to modify this behavior, you have to go through the upper Preferences link and disable the flag “Automatically Acquire Lock and Activate Changes

2.     The Domain Structure Panel

This panel is a tree that you can use to navigate into the application server’s resources. Click on any of the nodes in the Domain Structure tree to go to that page. Click the “+” (plus) icon in the Domain Structure to expand a node and the “-“(minus) icon to collapse the node. Once selected an item from the domain, the focus is on the Main panel window:

3.     The Main Panel

This is the core panel where you perform your administration tasks on your resources. Every operation is usually performed through intuitive wizards which are displayed in this panel.

Posted on

Oracle Weblogic Configuration File

WLS core configuration file, named config.xml, is located in the config folder of your domain:

MW_HOME/user_projects/domains/DOMAIN_NAME/config/config.xml

Although this file is a well-formed XML document (that you can modify using a text editor), you should think of it as a database that you would only directly update under unusual circumstances. It contains the core configuration parameter settings for each server, cluster and resource in the domain. As you can see from the following code snippet, the Java EE resources such as data sources and JMS resources are included in a separate XML file respectively in the jdbc and jms subfolders:

<domain>     <name>base_domain</name>    <domain-version>12.1.1.0</domain-version>  . . . . .    <jms-system-resource>      <name>SystemModule-0</name>      <target>WLSNode1,AdminServer</target>      <descriptor-file-name>jms/systemmodule-0-jms.xml</descriptor-file-name>    </jms-system-resource>       <jdbc-system-resource>      <name>Oracle Datasource</name>      <target>WLSCluster</target>      <descriptor-file-name>jdbc/Oracle_Datasource-7849-jdbc.xml</descriptor-file-name>    </jdbc-system-resource>  . . . . .  </domain>

 In the next recipes we will show some more details about the Web administration console.

Posted on

Starting Weblogic Administration Server

The first step in learning the server administration is obviously starting the administration server. Move to your domain’s “bin” folder which is located at:

$MW_HOME/user_projects/domains/[your_domain]/bin

Supposing that you have chosen”C:\Weblogic” as middleware home and elected “base_domain” as your domain:

cd C:\Weblogic\user_projects\domains\base_domain\bin  C:\Weblogic\user_projects\domains\base_domain\bin>startWebLogic.cmd

. . . ..
<20-lug-2012 10.06.40 CEST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>

Once the server is started you can enter into its core management instrument, which is the Web Console. The console is accessible, by default, at the following HTTP address:
http://localhost:7001/console

oracle weblogic book oracle weblogic books

Since the Web administration console is deployed on demand, the first time you will try to access it the browser will put you on waiting for a minute.

oracle weblogic book oracle weblogic booksAt this point, you can log in using the administration credentials that you have supplied during the installation. If you have accidentally lost your administration password, turn to the last recipe of this book (In Chapter 11) which describes how to replace it with a new one.

Posted on

Oracle Weblogic Filesystem

oracle weblogic book oracle weblogic books

Oracle WLS file system

Once installed Oracle WLS and having set up your first domain, you should have a well-defined structure available on your file system which starts from the MW_HOME and contains the following subfolders below it:

oracle weblogic book oracle weblogic books

The domains folder contains all the domains you have created. Each domain in turn contains the following directory structure:

  • autodeploy: In development mode, WLS automatically deploys any applications or modules that you place in this directory.
  • bin: This directory contains the scripts that are used for starting and stopping the Administration Server and the Managed Servers in the domain.
  • config: The configuration of the domain is contained here in a file named config.xml. This directory contains some additional folder such as:
    • jdbc: used to store data source XML configurations.
    • jms: used to store JMS specific XML configurations.
    • deployments: used internally by WLS to store deployments in staging mode.
  • console-ext: This directory contains extensions which can be applied to the Administration Console.
  • init-info: This directory contains files that are used for Weblogic domain provisioning. You should not modify any file in this directory.
  • lib: Any JAR file that you put in this directory is added to the JVM classpath of each server instance in the domain.
  • pending: This directory contains the domain configuration files that represent the configuration changes that have been requested, but not yet activated.
  • security: This directory holds the Administration server security files and security-related files that are shared in your domain.
  • servers: This folder contains the subdirectories for the Administration and Managed Servers. Each of these folders, contain data that is specific to each server instance.
  • tmp: Used internally for temporarily storing files. 

 

 

 

 

 

 

 

 

 

Additionally, the MW_HOME directory contains some folders shared by your WLS distribution such as wlserver which hosts the following directories:

  • common: this folder contains several core script files into its bin subfolder which are used for domain creation (config.sh ), template creation (config_builder.sh) and to start the wlst scripting tool (wlst.sh ).
  • endorsed: contains some XML parsing libraries which can be added to the JDK through the standard endorsing mechanism
  • server: this folder contains some installation specific core files. Within its bin folder, you can find some shells, the most relevant one is startNodeManagerthat is used to manage remotely your Managed servers. Within the lib folder you can find the WLS core libraries (such as weblogic.jar), the default server certificates, and the JDBC drivers among the others. 

 

 

Posted on

Creating a Weblogic domain template

oracle weblogic book oracle weblogic books

To create a new Oracle WebLogic Server domain template you can use the Domain Template Builder. Follow these steps in order to launch it:

1.       From the terminal window, navigate to the location of the Domain Template Builder tool. It is found under <MIDDLEWARE_HOME>/wlserver/common/bin.

2.       Run the tool by entering the following command (config_builder.bat for Windows users):

$ ./config_builder.sh

The Domain Template wizard will start. In the “Create a New Template” window of the builder, select “Create a Domain Template as shown by the following snapshot:

Continue reading Creating a Weblogic domain template