AD4J java agent incorrectly registers as port 5555 when running under OC4J 10.1.2.x

(Doc ID 564329.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Enterprise Manager Base Platform - Version 10.2.0.4 and later
Information in this document applies to any platform.
***Checked for relevance on 22-Mar-2013***

Symptoms

You have deployed the java agent of an AD4J 10.2.0.4 Release 1 (Build 2807) to an OC4J instance running within an Application Server 10.1.2.x installation. However, the PORT that the AD4J agent dynamically discovers and registers with the AD4J console has an unexpected value. The AD4J agent registers with the default port value of 5555 rather than the AJP port that OPMN has dynamically assigned to that instance.

This causes issues if AD4J is to be used in conjunction with multiple OC4J instances, since each JVM in this scenario is always registered with the same 5555 value and causes a conflict at the JAM Console, where only one JVM can be seen.

In the case of multiple AD4J java agents running in different AD4J instances, this problem can be overcome by manually assigning distinct id's after the agent's deployment, which can be achieved by editing the web.xml file for the deployed AD4J agent and adding a jamjvmid servlet parameter, as shown below:

  <servlet>
    <servlet-name>jamagent</servlet-name>
    <servlet-class>jamagent.jaminit</servlet-class>

      <init-param>
        <param-name>jamconshost</param-name>
        <param-value>10.141.160.47</param-value>
        <description>Jam console host - demolnx.auptyma.com</description>
      </init-param>
      <init-param>
        <param-name>jamconsport</param-name>
        <param-value>3600</param-value>
        <description>Jam console port</description>
      </init-param>
      <init-param>
        <param-name>jamconsretr</param-name>
        <param-value>90</param-value>
        <description>Seconds to wait before retrying connection to disconnected console</description>
      </init-param>
      <init-param>
        <param-name>jamtimeout</param-name>
        <param-value>900</param-value>
        <description>Timeout in seconds for long operations</description>
      </init-param>
      <init-param>
        <param-name>jamloglevel</param-name>
        <param-value>10</param-value>
        <description>Jam log level</description>
      </init-param>
      <init-param>
        <param-name>jammaxbackoff</param-name>
        <param-value>10</param-value>
        <description>Max backed off time to wait for GC to finish</description>
      </init-param>
      <init-param>
        <param-name>jamlibdir</param-name>
        <param-value>/tmp</param-value>
        <description>Default directory for extracting native libraries</description>
      </init-param>
      <init-param>
        <param-name>jamkeepalivetimeout</param-name>
        <param-value>1200</param-value>
        <description>Keep alive timeout in seconds for agent to re-connect to the console</description>
      </init-param>
      <init-param>
        <param-name>jamjvmid</param-name>
        <param-value>SOME UNIQUE VALUE</param-value>
        <description>Unique Identifier for JVM.</description>
      </init-param>

      <load-on-startup>1</load-on-startup>
  </servlet>


However, this is of specific impact if you plan to run multiple instances of the same OC4J process via
OPMN's "numproc" setting, in which case the same web.xml file will be used by all instances of the same OC4J instance (and therefore the jamjvmid will not be unique between those instances).

In the event that the opmn.xml configuration for any OC4J instance where the agent has been deployed also has numprocs > 1, all AD4J agents will register using the default 5555 value for the javajvmid parameter and it is not be possible to see, interact with or analyze more than one of these instances via the AD4J console.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms