JAVA APM Agent Config in Wildfly 8 with JAVA 1.8.0_144

Kibana version: 7.6.2

Elasticsearch version: 7.6.2

APM Server version: 7.6.2

APM Agent language and version: elastic-apm-agent-1.15.0.jar

Browser version: Chrome

Original install method (e.g. download page, yum, deb, from source, etc.) and version: Download Page

Fresh install or upgraded from other version?
Fresh install

Is there anything special in your setup? For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

NO

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Hi It's my first time here, I ask apologize if my questions sounds like dummy.

I have an application based on JAVA that usage Wildfly 8 for webserver and JDK: 1.8.0_144.

I've implemented elastic with kibana, apm server in separated windows server (192.168.1.52)

In my tests i'm judge the elastic implementation it's works fine, but all time i'm trying implement the java agent on my application server it's not work, kibana not receive any data.

I'm following the agent configuration at below in standalone.conf in wildfly:

set "JAVA_OPTS=%JAVA_OPTS% -javaagent:D:\elastic\agent1150.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.service_name=myapptest"
set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.server_urls=http://192.168.1.52:8200"

When I try to take a agent test in kibana (check the agent status): I received this message: No data has been received from agents yet

I've just tried to perform agent1150.jar file in cmd, and I receive this message at below:

C:\Windows\system32>java -javaagent:D:/elastic/agent1150.jar
2020-04-03 06:51:42.703 [main] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean
2020-04-03 06:51:43.000 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.15.0 as my-service on Java 1.8.0_144 (Oracle Corporation) Windows Server 2016 10.0
2020-04-03 06:51:43.000 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - To enable all features and to increase startup times, please configure application_packages
2020-04-03 06:51:43.375 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
2020-04-03 06:51:43.719 [elastic-apm-server-healthcheck] WARN co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server http://localhost:8200/ is not available (Connection refused: connect)
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
where options include:
    -d32          use a 32-bit data model if available
    -d64          use a 64-bit data model if available
    -client       to select the "client" VM
    -server       to select the "server" VM
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose:[class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  require the specified version to run
    -showversion  print product version and continue
    -jre-restrict-search | -no-jre-restrict-search
                  Warning: this feature is deprecated and will be removed
                  in a future release.
                  include/exclude user private JREs in the version search
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions with specified granularity
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions with specified granularity
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
    -agentlib:<libname>[=<options>]
                  load native agent library <libname>, e.g. -agentlib:hprof
                  see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
                  load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
                  load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
                  show splash screen with specified image
See http://www.oracle.com/technetwork/java/javase/documentation/index.html for more details.
2020-04-03 06:51:44.578 [elastic-apm-init-instrumentation-shutdown-hook] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to STOPPED state
2020-04-03 06:51:44.578 [elastic-apm-init-instrumentation-shutdown-hook] INFO co.elastic.apm.agent.report.ApmServerReporter - dropped events because of full queue: 0
2020-04-03 06:51:44.593 [elastic-apm-init-instrumentation-shutdown-hook] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Reported events: 0
2020-04-03 06:51:44.593 [elastic-apm-init-instrumentation-shutdown-hook] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Dropped events: 0
2020-04-03 06:51:44.593 [elastic-apm-circuit-breaker] INFO co.elastic.apm.agent.impl.circuitbreaker.CircuitBreaker - Stopping the Circuit Breaker thread.

I Don't know if the jdk ver that i've in this server it's not compatible with this agent, ou it's some configuration that i'll need apply in standalone.conf

Hello,
add please log_level to standalone.conf as

set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.log_level=DEBUG"

Can you send all your wildfly server log after changing configuration?
Before send some request to your application.

Hi first of all many thanks to trying to help me here, follow at below the logs:

===============================================================================



2020-04-03 07:11:02.631 [elastic-apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: {  "build_date": "2020-03-26T04:22:03Z",  "build_sha": "8827b43d24eaf42391ea815bb9fa12bdef5d6bce",  "version": "7.6.2"}

2020-04-03 07:11:02.663 [main] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean

2020-04-03 07:11:02.991 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.15.0 as myapptest on Java 1.8.0_144 (Oracle Corporation) Windows Server 2016 10.0

2020-04-03 07:11:02.991 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - To enable all features and to increase startup times, please configure application_packages

2020-04-03 07:11:03.287 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state

{"outcome" => "success"}


2020-04-03 07:29:44 Commons Daemon procrun stdout initialized
Calling "D:\TrueVUE_APP\wildfly-8.2.0.Final\bin\standalone.conf.bat"

Setting JAVA property to "C:\jdk18\\bin\java"

===============================================================================



  JBoss Bootstrap Environment



  JBOSS_HOME: "D:/TrueVUE_APP/wildfly-8.2.0.Final"



  JAVA: "C:\jdk18\\bin\java"



  JAVA_OPTS: "-client -Dprogram.name=standalone.bat  -Xms1300m -Xmx1300m -XX:MaxPermSize=350m   -Djdk.xml.entityExpansionLimit=0 -Dcom.vue.isJavaEE=true -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -javaagent:D:\elastic\agent1150.jar -Delastic.apm.service_name=myapptest -Delastic.apm.server_urls=http://192.168.1.52:8200 -Delastic.apm.log_level=DEBUG"



===============================================================================



2020-04-03 07:29:46.484 [elastic-apm-server-healthcheck] DEBUG co.elastic.apm.agent.report.ApmServerHealthChecker - Starting healthcheck to http://192.168.1.52:8200/

2020-04-03 07:29:46.500 [main] DEBUG co.elastic.apm.agent.impl.payload.SystemInfo - container ID is null

2020-04-03 07:29:46.500 [elastic-apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: {  "build_date": "2020-03-26T04:22:03Z",  "build_sha": "8827b43d24eaf42391ea815bb9fa12bdef5d6bce",  "version": "7.6.2"}

2020-04-03 07:29:46.516 [elastic-apm-server-healthcheck] DEBUG co.elastic.apm.agent.report.ApmServerHealthChecker - APM server http://192.168.1.52:8200/ version is: 7.6.2

2020-04-03 07:29:46.531 [main] INFO co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean

2020-04-03 07:29:46.782 [main] INFO co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.15.0 as myapptest on Java 1.8.0_144 (Oracle Corporation) Windows Server 2016 10.0

2020-04-03 07:29:46.782 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - service_name: 'myapptest' (source: Java System Properties)

2020-04-03 07:29:46.782 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - server_urls: 'http://192.168.1.52:8200' (source: Java System Properties)

2020-04-03 07:29:46.782 [main] DEBUG co.elastic.apm.agent.configuration.StartupInfo - log_level: 'DEBUG' (source: Java System Properties)

2020-04-03 07:29:46.782 [main] WARN co.elastic.apm.agent.configuration.StartupInfo - To enable all features and to increase startup times, please configure application_packages

2020-04-03 07:29:46.813 [elastic-apm-remote-config-poller] DEBUG co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Reloading configuration from APM Server http://192.168.1.52:8200/config/v1/agents

2020-04-03 07:29:46.828 [elastic-apm-remote-config-poller] DEBUG co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Central configuration is disabled. Set kibana.enabled: true in your APM Server configuration.

2020-04-03 07:29:46.844 [elastic-apm-remote-config-poller] DEBUG co.elastic.apm.agent.configuration.ApmServerConfigurationSource - Scheduling next remote configuration reload in 300s

2020-04-03 07:29:47.203 [main] DEBUG co.elastic.apm.agent.impl.circuitbreaker.GCStressMonitor - Registering a heap memory pool (Eden Space) for stress monitoring

2020-04-03 07:29:47.203 [main] DEBUG co.elastic.apm.agent.impl.circuitbreaker.GCStressMonitor - Registering a heap memory pool (Tenured Gen) for stress monitoring

2020-04-03 07:29:47.203 [main] DEBUG co.elastic.apm.agent.impl.circuitbreaker.SystemCpuStressMonitor - Successfully obtained reference to the getSystemCpuLoad method of this JVM's OperatingSystemMXBean implementation

2020-04-03 07:29:47.203 [main] DEBUG co.elastic.apm.agent.jmx.JmxMetricTracker - Deferring initialization of JMX metric tracking until capture_jmx_metrics is set.

2020-04-03 07:29:47.203 [main] INFO co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state

2020-04-03 07:29:47.391 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying instrumentation co.elastic.apm.agent.httpclient.ApacheHttpClientInstrumentation

2020-04-03 07:29:47.391 [main] DEBUG co.elastic.apm.agent.bci.bytebuddy.CustomElementMatchers - org.apache.http.impl.execchain.ClientExecChain was loaded by Bootstrap ClassLoader

2020-04-03 07:29:47.423 [main] DEBUG co.elastic.apm.agent.bci.ElasticApmAgent - Applying instrumentation co.elastic.apm.agent.httpclient.ApacheHttpAsyncClientInstrumentation

Thanks @Andre_Lima, here we see that connection with apm-server is ok.
Can you send some http request to your application on wildfly server? And resend logs again.

Hi @ nugusbayevkk
How can i attch the all log here? in post have some caracters limitation...

you can send here link to gist.github.com url and paste all log there.

Hi Thanks again, follow the link at below:

I've made some http requests with the application but log not changed.

Can you set configuration of application_packages with your application root package?

set "JAVA_OPTS=%JAVA_OPTS% -Delastic.apm.application_packages=com.example.app,com.example.app2

And try again send request.

Follow at below, same behavior:

@Andre_Lima, I mean you should set your application packages.
com.example.app replace with your value.

Ok, but i dont know which are, but i'll consulting my dev team, thx untill now

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.