Showing posts with label Monitoring. Show all posts
Showing posts with label Monitoring. Show all posts

Sunday, March 13, 2011

FAQ #32 - How to get started with JRockit Mission Control, Pt. 1

Introduction

JRockit Mission Control is a suite of tools that can be used to monitor, profile and manage the JRockit Java virtual machine. Among other, managing the JRockit Virtual Machine includes performing garbage collection on demand and eliminating memory leaks. JRockit is the virtual machine used in a production system by the WebLogic application server.


Main Theme

Installation of JRockit Mission Control

JRockit Mission Control must be installed on a client machine through which a target JRockit virtual machine running on a server machine can be monitored, profiled and managed. To download JRockit Mission Control, go to the JRockit Family Download page.

Accept the license agreement, select the appropriate version for your client operating system and proceed with the download. Once downloaded, start the installation by executing the file downloaded. Follow the installation wizard choosing in most cases the default options presented by the installer.


During the installation you will be given the option to install the JRockit JRE in the client machine. Select Yes (Install Public JRE) and click Next to proceed.


The installer will proceed with the installation of both the JRockit JRE and the JRockit Mission Control. Verify that the installation was successful and click Done.


Once installed, you can start the JRockit Mission Control by running the jrmc program in the target installation directory. When installed on a Microsoft Windows operating system a shortcut called Oracle JRockit Mission Control 4.0.1 is created under the Oracle JRockit JDK R28.1 for Java SE 6 with JRMC 4.0.1 (32-bit) group - for the version installed.


Before proceeding with Mission Control, you will have to configure the target JRockit Java virtual machine to allow its management via the Mission Control suite.


Configuration of target JRockit Java Virtual Machine

For the sake of this example, we will configure a WebLogic SOA deployment consisting of one administration server and two managed servers - one for SOA and another for BAM. Similar configuration steps can be taken to configure your own setup. Start by ensuring that your WebLogic is configured to run on the JRockit Java virtual machine. This should be the case in all production environments. To ensure that we are indeed using JRockit, we will manually set the JAVA_VENTOR parameter to Oracle in the setDomainEnv script.


We will also add a parameter called ENABLE_MNGMNT_CONSOLE in setDomainEnv to control whether JRockit is started to allow its management.

Thats all with the setDomainEnv script. We will proceed by adding a few lines in the startWebLogic script. Here we will check to see whether the management console is enabled and if it is we will check if the management console startup options are set. If there are none specified, we will specify some defaults. We will see below when configuring the managed servers that the management console start up options can be set in the startManagedWebLogic script. The lines that we will add to the startWebLogic script are:


As you can see in the above picture, we are starting the JRockit virtual machine with the -Xmanagement switch specifying no secure sockets, no authentication and 7091 as the default connection port. Each WebLogic server must be configured to allow Mission Control connections on a separate port.

We will conclude the configuration changes by adding the following lines to the startManagedWebLogic script:


What we have done here is configure a different JRockit management port for each managed server. In this case we need to make sure that the actual names of the managed servers are correct, so this needs to be adapted for your setup.

Now we can start the SOA domain. For each server, observe that the management options are set correctly.




Mission Control Connection Setup

Now that we have the target JRockit virtual machines configured to allow Mission Control management connections - remember that each WebLogic server runs on its own virtual machine, we can proceed by creating the connections to each virtual machine from within the Mission Control suite. To create a new connection, right-click on the Connectors node and select New Connection.


In the New Connection dialog specify the WebLogic server host name or IP address, the management connection port and the connection name. Click on the Test connection button to test the connection.


We will create a separate connection for each WebLogic administration and managed server configured for the SOA domain above. After creating all the connections the Mission Control suite should look like this:


To start a monitor session for each configured virtual machine, right-click on the appropriate connection  and select Start Console.


This will open a monitor console as it is shown below.


Additional monitor consoles can be opened by right-clicking on another connection and selecting Start Console. Each monitor session will be shown in a separate tab in Mission Control.



Conclusion

This concludes this first part of getting started with the JRockit Mission Control. In the next part we will look at some of the features of the Mission Control.

Until the next time, keep on JDeveloping!


Code

http://jdeveloperfaq.googlecode.com/files/JDeveloperFAQNo32.zip








Tuesday, February 2, 2010

FAQ #11 - How to install and configure Fusion Middleware Control on JDeveloper 11g R1



Introduction


The Oracle Enterprise Manager 11g Fusion Middleware Control application offers a number of ADF performance monitor and configuration options. These and more are described in the Oracle® Fusion Middleware Administrator's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1) manual. This FAQ will guide you through the installation and configuration of Fusion Middleware Control on the standalone WLS that ships along with JDeveloper 11g.


Main Theme

In order to install Fusion Middleware Control, you will need to download both the Repository Creation Utility and the Application Development Runtime installation packages from the Oracle Fusion Middleware 11gR1 Software Downloads. Look for them under the Required Additional Software section.


Installation of the Repository Creation Utility

Once you are done with these downloads, unzip them and start first with the  installation of the Repository Creation Utility by running the rsu.bat installation script. It can be found in the rcuHome\BIN folder. Click Next in the Welcome page and select Create on the Create Repository screen to create a new repository.


In the Database Connection Details page specify the necessary database details where the repository schemas will be created. For Oracle databases, Oracle 10g version 10.2.0.4.0 or higher and 11g version 11.1.0.7.0 or higher is required.


In the Select Components page, specify a schema prefix - defaults to DEV, and select the schemas to be installed. At a minimum, install the schemas for AS Common Schemas, WebLogic Communication Services and SOA and BPM Infrastructure.


In the pages that follow, specify the schema passwords and the names of the tablespaces to be created. Finally, click Create in the Summary page to proceed with the creation of the infrastructure schemas.


Upon completion of the schema creation process, a summary screen will be shown where you can verify the successful creation of each component selected earlier.

Installation of the Application Development Runtime


Now that the repository infrastructure schemas are installed, proceed with the installation of the Application Development Runtime. Prior to its installation, I strongly suggest that you make a backup of your middleware home directory, just in case you need to restore it at anytime in the future. Start the installation of the Application Development Runtime by running the setup.exe installation program in the Disk1 folder. Make sure that you specify the -jreLoc argument and the location of the JRockit Java Runtime otherwise it won't start.


The Welcome screen will be displayed upon successful startup of the installation. Click Next to navigate to the Prerequisite Checks page.


Ignore the Checking service pack error since we will specify the correct middleware home directory in the next page. In the Specify Installation Location page, specify the middleware home directory where you installed the standalone WLS that ships along with JDeveloper. This is usually the middleware home where JDeveloper is installed.


Click Install in the Installation Summary page to proceed with the installation and ensure that the installation completes smoothly.


In the Installation Complete page click Finish to exit from the installation program.


WLS configuration using the Fusion Middleware Configuration Wizard

Once the installation is complete, observe the new group of shortcuts called Oracle Application Developer 11g - Home 1 that was created by the installation program.


From there, select Configure Application Server to configure the Fusion Middleware Control on the standalone WLS. In the Welcome page select Create a new WebLogic domain to create a new domain configured specifically with Enterprise Manager Fusion Middleware Control and click Next.


In the Select Domain Source page ensure that both the Oracle Enterprise Manager and the Oracle JRF products are selected and click Next.


In the Specify Domain Name and Location page, enter the name and location of the domain.


In the next pages specify the administrator account credentials and select the domain startup mode and JDK. In the Select Optional Configuration page, select the Administration Server, Managed Servers, Clusters and Machines and Deployments and Services options.


In the Configure the Administration Server page accept the defaults and click Next. In the Configure Managed Servers page, add a managed server as shown below.


Skip the Configure Clusters page and in the Configure Machines page add your development machine as a WLS machine.


Assign the administration and the managed servers to the machine you specified in the Assign Servers to Machines page as shown below.


In the Target Deployments to Clusters or Servers page make sure that the ADF libraries are applied to both the administration and the managed servers as shown below.


Leave the selections as they are in the Target Services to Clusters to Servers page and verify your selections in the Configuration Summary page. Then click Create to create the domain. The Fusion Middleware Configuration Wizard will then proceed with the creation of the domain.



Node Manager configuration

Once the domain is created, one more thing that needs to be configured is the Node Manager. The node manager configuration file can be located in the %MIDDLEWARE_HOME%\wlserver_10.3\common\nodemanager directory but it does not exist until the node manager runs for the very first time. So, select the Node Manager shortcut from the Start menu and run it. Then exit from the node manager by closing its window.


The nodemanager.properties configuration file should have been created now in the directory mentioned above. Open the file and change the line that reads StartScriptName=startWebLogic.cmd to StartScriptName=startManagedWebLogic.cmd. Also, the line that reads StartScriptEnabled=false to StartScriptEnabled=true and add the line StopScriptEnabled=true. In summary, it should look similar to this:


Now start both the Node Manager and the Administration Server. The administration server can be started by selecting the Start Admin Server for Weblogic Server Domain shortcut under the User Projects for the domain you just created.



Fusion Middleware Control

The Enterprise Manager 11g Fusion Middleware Control can be started by navigating to the http://localhost:7001/em URL. Login as weblogic/weblogic1 to get access to it.


To verify that a managed server can be started successfully, navigate to the WebLogic Domain | %domain% | %managed_server% in the tree view and from the WebLogic Server menu select Control | Start Up to start it.



The following dialog should be displayed once the managed server is started successfully.


Finally, one last thing that needs to be done is to apply the JRF template to enable some of the features of the Enterprise Manager. So, with your managed server selected in the tree view, click on the Apply JRF Template button to apply it.


Once applied, you should see the successful confirmation shown below.


Deploy and Monitor

Now you can deploy your applications and monitor them with the Fusion Middleware Control. If you haven't done yet, setup a connection in JDeveloper and deploy your application as described in FAQ #3 - How to deploy an ADF application on a standalone WebLogic server directly from JDeveloper. Then from the Fusion Middleware Control, under the Farm_%domain% | Application Deployments select the application deployed to view its specific details (Summary, Entry Points, Web Services, Modules, Response and Load and Most Requested).


Use the Application Deployment | ADF menu to monitor and configure ADF-specific functionalities of your application.


Conclusion

Once installed, you can use Enterprise Manager 11 Fusion Middleware Control for your development deployments on your local standalone WLS to monitor and configure various aspects of your application during the development process.

Until the next time, keep on JDeveloping!


References


Oracle® Fusion Middleware Administrator's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1)
Oracle® Fusion Middleware Administrator's Guide 11g Release 1 (11.1.1)



Notes

There are a few issues that I run into during the installation that I am still unable to figure out. I am suspecting that they are related to library conflicts. Any input towards their resolution is highly appreciated.


  • When I select ADF Performance from the ADF menu, I get no data and the following exception in the  server log console: java.lang.IllegalStateException: The expression "#{bindings.genRegion.regionModel}" (that was specified for the RegionModel "value" attribute of the region component with id "genRegion_dlg") evaluated to null.
  • When I select Configure ADF Business Components from the ADF menu, I get a Configuration settings are unavailable because %application% is down message and the following warning in the log console: 








Related Posts Plugin for WordPress, Blogger...