# JAVA APM Agent Config in Wildfly 8 with JAVA 1.8.0\_144

**URL:** <https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377>\
**Category:** APM\
**Tags:** java\
**Created:** [April 3, 2020, 9:54am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377 "2020-04-03T09:54:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andre\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_lima/32/65616_2.png) [@Andre\_Lima](https://discuss.elastic.co/u/Andre_Lima)\
**Post date:** [April 3, 2020, 9:54am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/1 "2020-04-03T09:54:53Z")

</div>

**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:

```auto
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:

```auto
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

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [April 3, 2020, 10:24am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/2 "2020-04-03T10:24:38Z")

</div>

Hello,  
add please log\_level to standalone.conf as

```auto
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.

---

<div class="post-metadata">

**Author:** ![Andre\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_lima/32/65616_2.png) [@Andre\_Lima](https://discuss.elastic.co/u/Andre_Lima)\
**Post date:** [April 3, 2020, 10:42am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/3 "2020-04-03T10:42:54Z")

</div>

> [@nugusbayevkk](#):
>
> set "JAVA\_OPTS=%JAVA\_OPTS% -Delastic.apm.log\_level=DEBUG"

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

```auto
===============================================================================

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

```

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [April 3, 2020, 10:46am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/4 "2020-04-03T10:46:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Andre\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_lima/32/65616_2.png) [@Andre\_Lima](https://discuss.elastic.co/u/Andre_Lima)\
**Post date:** [April 3, 2020, 10:56am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/5 "2020-04-03T10:56:38Z")

</div>

Hi @ [nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)  
How can i attch the all log here? in post have some caracters limitation...

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [April 3, 2020, 10:58am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/6 "2020-04-03T10:58:15Z")

</div>

you can send here link to [gist.github.com](http://gist.github.com) url and paste all log there.

---

<div class="post-metadata">

**Author:** ![Andre\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_lima/32/65616_2.png) [@Andre\_Lima](https://discuss.elastic.co/u/Andre_Lima)\
**Post date:** [April 3, 2020, 11:06am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/7 "2020-04-03T11:06:34Z")

</div>

Hi Thanks again, follow the link at below:

> <https://gist.github.com/aluislima/0d755d8de1d93b5744a278843c9694df#file-gistfile1-txt>

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

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [April 3, 2020, 11:13am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/8 "2020-04-03T11:13:30Z")

</div>

Can you set configuration of [application\_packages](https://www.elastic.co/guide/en/apm/agent/java/current/config-stacktrace.html#config-application-packages) with your application root package?

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

```

And try again send request.

---

<div class="post-metadata">

**Author:** ![Andre\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_lima/32/65616_2.png) [@Andre\_Lima](https://discuss.elastic.co/u/Andre_Lima)\
**Post date:** [April 3, 2020, 11:27am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/9 "2020-04-03T11:27:11Z")

</div>

> [@nugusbayevkk](#):
>
> set "JAVA\_OPTS=%JAVA\_OPTS% -Delastic.apm.application\_packages=com.example.app,com.example.app2

Follow at below, same behavior:

> <https://gist.github.com/aluislima/f77ca29b91a4f114a2c150d265389cbe>

---

<div class="post-metadata">

**Author:** ![nugusbayevkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nugusbayevkk/32/126683_2.png) [@nugusbayevkk](https://discuss.elastic.co/u/nugusbayevkk)\
**Post date:** [April 3, 2020, 11:35am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/10 "2020-04-03T11:35:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Andre\_Lima](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andre_lima/32/65616_2.png) [@Andre\_Lima](https://discuss.elastic.co/u/Andre_Lima)\
**Post date:** [April 3, 2020, 12:29pm UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/11 "2020-04-03T12:29:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [April 27, 2020, 4:24am UTC](https://discuss.elastic.co/t/java-apm-agent-config-in-wildfly-8-with-java-1-8-0-144/226377/13 "2020-04-27T04:24:13Z")

</div>

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