search cancel

UMA Liberty Agent not deploying to Container

book

Article ID: 229283

calendar_today

Updated On:

Products

APM

Issue/Introduction

We have installed UMA 21.4 in our Openshift environment.  We are receiving metrics on the Openshift cluster,nodes and pods.  We are attempting to use the autoattach feature to install the Liberty agent into one of our containers.

We have added this property to the environment variables in the container: CA_APM_MONITORING_ENABLED='true'

I have verified the existence of the app-container-monitor on all nodes.

UMA Liberty Agent not deploying to Container

The WAS Liberty version is 21.0.0_04 and the JAVA version is 1.8.0_sr6fp26.

 

Environment

Release : 20.2

Component : APM Agents

Resolution

UMA requires the tools.jar by default for autoattach function.
If your system don't have tools.jar, you can add the annotation "ca.broadcom.com/autoattach.java.attach.overrides: autoattach.java.filter.jvms=false" in the application deployment or pod to 
get the autoattach function to work.
 

Here's the example yaml file

metadata:
  name: liberty-test
  labels:
    app: liberty-test
  annotations:
    ca.broadcom.com/autoattach.enabled: "true"
    ca.broadcom.com/autoattach.java.attach.overrides: autoattach.java.filter.jvms=false
spec:
  replicas: 1
  template:
    metadata:
      name: liberty-test
      labels:
        app: liberty-test
    spec:
      containers:
        - name: liberty-test
          image: <yourimage>/liberty:full-java11-openj9-ubi
          ports:
            - containerPort: 9080
          env:
            - name: CA_APM_MONITORING_ENABLED
              value: "true"
          imagePullPolicy: Always
      restartPolicy: Always
  selector:
    matchLabels:
      app: liberty-test

Additional Information

 

Getting the following error

java version "1.8.0_281"
Java(TM) SE Runtime Environment (build 8.0.6.26 - pxa6480sr6fp26-20210216_01(SR6 FP26))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210216_465732 (JIT enabled, AOT enabled)
OpenJ9   - e5f4f96
OMR      - 999051a
IBM      - 358762e)
JCL - 20210108_01 based on Oracle jdk8u281-b09
, exitCode: 0
I0720 15:29:38.886963    5636 handler.go:206] APM Monitoring Enabled Env value is set as true for es-psv1--dev--f-chg2442408-apm-uma/es-psv1-2021072011-12-1-txnbh/es-psv1
E0720 15:30:04.115186    5636 handler.go:546] Err while executing command '["sh" "-c" "/opt/ibm/java/jre/bin/java -XX:+IgnoreUnrecognizedVMOptions -XshowSettings:properties -version"]' for container "fb8a74198fdf6471519a2a39704864fc1b2414330a40c76fb0536f37b00480ad": err: <nil>, result -> out: , err: Property settings:
    awt.toolkit = sun.awt.X11.XToolkit
    com.ibm.cpu.endian = little
    com.ibm.jcl.checkClassPath = 
    com.ibm.oti.configuration = scar
    com.ibm.oti.shared.enabled = true
    com.ibm.oti.vm.bootstrap.library.path = /opt/ibm/java/jre/lib/amd64/compressedrefs
        /opt/ibm/java/jre/lib/amd64
    com.ibm.oti.vm.library.version = 29
    com.ibm.system.agent.path = /opt/ibm/java/jre/lib/amd64
    com.ibm.util.extralibs.properties = 
    com.ibm.vm.bitmode = 64
    com.ibm.zero.version = 2
    file.encoding = ANSI_X3.4-1968
    file.encoding.pkg = sun.io
    file.separator = /
    ibm.signalhandling.rs = false
    ibm.signalhandling.sigchain = true
    ibm.signalhandling.sigint = true
    ibm.system.encoding = ANSI_X3.4-1968
    java.awt.fonts = 
    java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
    java.awt.printerjob = sun.print.PSPrinterJob
    java.class.path = .
    java.class.version = 52.0
    java.compiler = j9jit29
    java.endorsed.dirs = /opt/ibm/java/jre/lib/endorsed
    java.ext.dirs = /opt/ibm/java/jre/lib/ext
    java.fullversion = 8.0.6.26 - pxa6480sr6fp26-20210216_01(SR6 FP26)
JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210216_465732 (JIT enabled, AOT enabled)
OpenJ9   - e5f4f96
OMR      - 999051a
IBM      - 358762e
    java.home = /opt/ibm/java/jre
    java.io.tmpdir = /tmp
    java.lang.stringBuffer.growAggressively = false
    java.library.path = /opt/ibm/java/jre/lib/amd64/compressedrefs
        /opt/ibm/java/jre/lib/amd64
        /usr/lib64
        /usr/lib
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 8.0.6.26 - pxa6480sr6fp26-20210216_01(SR6 FP26)
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Oracle Corporation
    java.specification.version = 1.8
    java.vendor = IBM Corporation
    java.vendor.url = http://www.ibm.com
    java.version = 1.8.0_281
    java.vm.info = JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210216_465732 (JIT enabled, AOT enabled)
OpenJ9   - e5f4f96
OMR      - 999051a
IBM      - 358762e
    java.vm.name = IBM J9 VM
    java.vm.specification.name = Java Virtual Machine Specification
    java.vm.specification.vendor = Oracle Corporation
    java.vm.specification.version = 1.8
    java.vm.vendor = IBM Corporation
    java.vm.version = 2.9
    line.separator = \n 
    os.arch = amd64
    os.encoding = ANSI_X3.4-1968
    os.name = Linux
    os.version = 4.18.0-193.41.1.el8_2.x86_64
    osgi.checkConfiguration = false
    path.separator = :
    sun.arch.data.model = 64
    sun.boot.class.path = /opt/ibm/java/jre/lib/amd64/compressedrefs/jclSC180/vm.jar
        /opt/ibm/java/jre/lib/se-service.jar
        /opt/ibm/java/jre/lib/math.jar
        /opt/ibm/java/jre/lib/ibmorb.jar
        /opt/ibm/java/jre/lib/ibmorbapi.jar
        /opt/ibm/java/jre/lib/ibmcfw.jar
        /opt/ibm/java/jre/lib/ibmpkcs.jar
        /opt/ibm/java/jre/lib/ibmcertpathfw.jar
        /opt/ibm/java/jre/lib/ibmjgssfw.jar
        /opt/ibm/java/jre/lib/ibmjssefw.jar
        /opt/ibm/java/jre/lib/ibmsaslfw.jar
        /opt/ibm/java/jre/lib/ibmjcefw.jar
        /opt/ibm/java/jre/lib/ibmjgssprovider.jar
        /opt/ibm/java/jre/lib/ibmjsseprovider2.jar
        /opt/ibm/java/jre/lib/ibmcertpathprovider.jar
        /opt/ibm/java/jre/lib/xmldsigfw.jar
        /opt/ibm/java/jre/lib/xml.jar
        /opt/ibm/java/jre/lib/charsets.jar
        /opt/ibm/java/jre/lib/resources.jar
        /opt/ibm/java/jre/lib/rt.jar
        /opt/ibm/java/jre/lib/dataaccess.jar
    sun.boot.library.path = /opt/ibm/java/jre/lib/amd64/compressedrefs
        /opt/ibm/java/jre/lib/amd64
    sun.cpu.endian = little
    sun.io.unicode.encoding = UnicodeLittle
    sun.java.launcher = SUN_STANDARD
    sun.java.launcher.pid = 271
    sun.jnu.encoding = ANSI_X3.4-1968
    user.country = US
    user.dir = /opt/app-root/src
    user.home = /opt/app-root/src
    user.language = en
    user.name = default
    user.timezone = 
    user.variant = 

 

8/05/21 04:54:44 PM UTC [INFO] [IntroscopeAgent.InfrastructureAgent] Agent ocpat-f2r44-worker|ocpat|Kubernetes Agent%1 attributes sent to EM successfully
8/05/21 05:00:30 PM UTC [INFO] [IntroscopeAgent.SnmpCollector] Updating ATC graph vertex for introscope.agent.hostmonitor.profiles.localhost
8/05/21 07:11:37 PM UTC [INFO] [IntroscopeAgent.AutoAttach.Java.UnixDockerAttacher] ProcessOverrideDescriptor{pid='15', user='1002610000', elapsedTimeInSeconds='606170', commandString='/opt/ibm/java/jre/bin/java -javaagent:/opt/ibm/wlp/bin/tools/ws-javaagent.jar -Djava.awt.headless=true -Djdk.attach.allowAttachSelf=true -Xms2056m -Xmx2056m -Duser.timezone=EST -jar /opt/ibm/wlp/bin/tools/ws-server.jar defaultServer', overridden='false', additionalData='{ 'java':JVMInfo{ binaryPath='/opt/ibm/java/jre/bin/java', vendorName='IBM Corporation', vmName='IBM J9 VM', runtimeVersion='8.0.6.31 - pxa6480sr6fp31-20210510_01(SR6 FP31)', specificationVersion='8' }
, } ', attachPropertyOverrides='{ } ', agentPropertyOverrides='{ } ' } identified as Java process in container [ namespace/es-psv1--dev--f-chg2442408-apmchg pod/es-psv1-2021072914-17-1-l59sk container/es-psv1 id/0d8858958f4ff235b73cc18cd72d5b7474abe988fd92879522e699eb7553ab8a ]
8/05/21 07:11:37 PM UTC [INFO] [IntroscopeAgent.AutoAttach.Java.UnixDockerAttacher] Process: 15 in container: [ namespace/es-psv1--dev--f-chg2442408-apmchg pod/es-psv1-2021072914-17-1-l59sk container/es-psv1 id/0d8858958f4ff235b73cc18cd72d5b7474abe988fd92879522e699eb7553ab8a ] . identified as  JRE, looking for packaged tools.jar
8/05/21 07:11:37 PM UTC [INFO] [IntroscopeAgent.AutoAttach.Java.UnixDockerAttacher] Could not retrieve tools.jar in container [ namespace/es-psv1--dev--f-chg2442408-apmchg pod/es-psv1-2021072914-17-1-l59sk container/es-psv1 id/0d8858958f4ff235b73cc18cd72d5b7474abe988fd92879522e699eb7553ab8a ], please set autoattach.java.tools.repo.url property via annotation or autoattach property and restart app container. See details in the APM documentation for use.
8/05/21 07:11:37 PM UTC [INFO] [IntroscopeAgent.AutoAttach.Java.UnixDockerAttacher] tools.jar not packaged for this jvm - Skipping agent load for Process 15 in container [ namespace/es-psv1--dev--f-chg2442408-apmchg pod/es-psv1-2021072914-17-1-l59sk container/es-psv1 id/0d8858958f4ff235b73cc18cd72d5b7474abe988fd92879522e699eb7553ab8a ] . JVM Info JVMInfo{ binaryPath='/opt/ibm/java/jre/bin/java', vendorName='IBM Corporation', vmName='IBM J9 VM', runtimeVersion='8.0.6.31 - pxa6480sr6fp31-20210510_01(SR6 FP31)', specificationVersion='8' }