Monday, July 30, 2012

EM12c - How to take oms logs in debug mode?

Run below command on OMS to activate debug log and collect emoms.log/trc.

Fetch the current setting of logging by running below command
%<middleware_home>/oms/bin/emctl get property -sysman_pwd  <repos user psswd> -name log4j.logger.oracle.sysman
Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0 
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Value for property log4j.logger.oracle.sysman for oms <hostname>:<port>_Management_Service is null


Then set the log level to debug
%<middleware_home>/oms/bin/emctl set property -sysman_pwd  <repos user psswd> -name log4j.logger.oracle.sysman -value DEBUG -module logging
Oracle Enterprise Manager Cloud Control 12c Release 12.1.0.1.0 
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Property log4j.logger.oracle.sysman for oms <hostname>:<port>_Management_Service has been set to value DEBUG
OMS restart is not required to reflect the new property value

After enabling OMS java debug log, visit required EM pages
Take the OMS logs i.e. EMGC_OMS1.out, emoms.log and emoms.trc etc.

Wednesday, July 11, 2012

EM12c: How to discover FMW targets automatically using auto discover feature?


EM 12c cloud control has a concept of auto discovery of targets
It involves two steps:
1. Discovering the potential target
2. Promoting the target and assigning it to an EM agent

Users can enable this automatic discovery of potential targets on a host.

To enable auto discovery, one needs to ensure that EM agent has the discovery part of plugin deployed on the host.

After auto discovery is configured to run on the managed host, discovery takes place periodically and sends potential targets to the Management repository.

Users can review these targets from the discovery results UI and then promote the target, so taht EM can monitor and manage these.

Ensure that agent has been deployed on the managed host.

1. Select Setup menu-> Add Target-> Configure Auto Discovery.

2. Set the schedule(in days) at which the discovery job will be run. This schedule will be applied to all selected hosts. By default the job will run every 24 hours.

3. Click Add Host. Select the host machine where you want to discover targets.

4. Select the host in the table, then click Edit Parameters to specify the Middleware Home(s) to search for targets.
 (Note: The Middleware Home is the top-level directory for all Oracle Fusion Middleware products, created when Oracle WebLogic Server is installed. e.g. /u01/app/middleware)

5. Click OK to enable the automatic discovery.

6. Once automatic discovery has been enabled, one should verify Setup -> Add Target->Auto Discovery Results regularly to view the list of discovered targets.

7. Select the Non-Host Targets tab to view the discovered Oracle Fusion Middleware targets.

8. Select a target e.g. select Oracle WebLogic Domain target type then click Promote.
For promotion of WLS domain target, provide following parameters:
        The hostname for the WebLogic Administration Server
        The WebLogic Administration Server port.
        The WebLogic Administration Server user name and password.
        A Unique Domain Identifier for domain
        EM Agent that will be used to discover the FMW targets.

9. Click Continue. EM will discover all FMW targets within the WLS domain.

10. Click Close in the Finding Targets dialog to automatically assign EM Agents to the discovered targets.

11. Click Add Targets to assign EM Agents as listed in the Assign Agents page.

12. Click Close. The Results page displays the targets and Agent assignments.

13. Click OK when finished.

Wait for sometime before these targets are visible and monitored. All the agents used for monitoring the targets must be up.

Note: The automatic discovery feature is not supported for Oracle WebLogic Server versions 7.x or 8.x.

Wednesday, July 04, 2012

EM12c: How to fix java.lang.UnsatisfiedLinkError: /tmp/libjamagent.so.1: failed to map segment from shared object: Operation not permitted error while deploying Jamagent?

Problem: While deploying jamagent, following error is seen in jamagent log:
12/07/04 07:58:34 JAM Agent: jaminit.init()
12/07/04 07:58:34 JAM Agent: jaminit.init() Instantiating jamagent
12/07/04 07:58:34 OS is Linux
12/07/04 07:58:34 arch is i386
12/07/04 07:58:34 JAM Agent loadNative() Wrote to [/tmp/libjamagent.so.1]
12/07/04 07:58:34 >>java.library.path: /u01/usr/apps/abc/10.1.3/appsutil/jdk/jre/lib/i386/server:/u01/usr/apps/abc/10.1.3/appsutil/jdk/jre/lib/i386:/u01/usr/apps/abc/10.1.3/appsutil/jdk/
12/07/04 07:58:34 JAM Agent: loadNative Exception loading [/tmp/libjamagent.so.1] /tmp/libjamagent.so.1: /tmp/libjamagent.so.1: failed to map segment from shared object: Operation not permitted
12/07/04 07:58:34 java.lang.UnsatisfiedLinkError: /tmp/libjamagent.so.1: /tmp/libjamagent.so.1: failed to map segment from shared object: Operation not permitted
12/07/04 07:58:34       at java.lang.ClassLoader$NativeLibrary.load(Native Method)
12/07/04 07:58:34       at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
12/07/04 07:58:34       at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1699)
12/07/04 07:58:34       at java.lang.Runtime.load0(Runtime.java:770)
12/07/04 07:58:34       at java.lang.System.load(System.java:1003)
12/07/04 07:58:34       at jamagent.jamagent.loadNative(jamagent.java:688)
12/07/04 07:58:34       at jamagent.jamagent.<init>(jamagent.java:995)
12/07/04 07:58:34       at jamagent.jaminit.init(jaminit.java:52)

Possibility is that error is encountered when /tmp directory is mounted with -noexec option.

Solution: Make /tmp directory executable using following command:
mount -o remount,exec /tmp

Retry deploying jamagent.