# Error with Java APM agent on kubernetes: Failed to handle event of type METRICS with this error: / by zero

**URL:** <https://discuss.elastic.co/t/error-with-java-apm-agent-on-kubernetes-failed-to-handle-event-of-type-metrics-with-this-error-by-zero/240853>\
**Category:** APM\
**Tags:** java\
**Created:** [July 12, 2020, 6:25pm UTC](https://discuss.elastic.co/t/error-with-java-apm-agent-on-kubernetes-failed-to-handle-event-of-type-metrics-with-this-error-by-zero/240853 "2020-07-12T18:25:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chakradhar\_Bandla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chakradhar_bandla/32/71998_2.png) [@Chakradhar\_Bandla](https://discuss.elastic.co/u/Chakradhar_Bandla)\
**Post date:** [July 12, 2020, 6:25pm UTC](https://discuss.elastic.co/t/error-with-java-apm-agent-on-kubernetes-failed-to-handle-event-of-type-metrics-with-this-error-by-zero/240853/1 "2020-07-12T18:25:02Z")

</div>

I am trying to run **Java APM agent on Kubernetes with Springboot 2.3.1.RELEASE**

**I get the following error**

> [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - _Failed to handle event of type METRICS with this error: / by zero_

It works well if I run it on VM with same Java version

**How I am using**

> java -javaagent:elastic-apm-agent-1.17.0.jar -Delastic.apm.service\_name=myapp -Delastic.apm.application\_packages=com.example -Delastic.apm.server\_urls=[http://apm-server:8200](http://apm-server:8200) -jar my-application.jar

**APM Agent language and version** : Java, elastic-apm-agent-1.17.0.jar,1.16.0.jar, 1.15.0.jar

**Java version**

```auto
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r0)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)

```

**More logs**

```auto
co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean
co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.17.0 as myapp on Java 1.8.0_121 (Oracle Corporation) Linux 3.10.0-1062.4.3.el7.x86_64

co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state
co.elastic.apm.agent.servlet.ServletVersionInstrumentation - Servlet container info = Apache Tomcat/9.0.36

ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Failed to handle event of type TRANSACTION with this error: / by zero

```

I tried with previous agent versions 1.16.0 & 1.15.0 but I still get the same error.

Can anyone please help me 🙂  
Thank you very much in advance

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [July 13, 2020, 3:45am UTC](https://discuss.elastic.co/t/error-with-java-apm-agent-on-kubernetes-failed-to-handle-event-of-type-metrics-with-this-error-by-zero/240853/2 "2020-07-13T03:45:05Z")

</div>

Hi and welcome to the APM forum!

Please provide the exact configuration you are using. Normally, such an error is expected when setting `server_urls` to an empty string.

---

<div class="post-metadata">

**Author:** ![Chakradhar\_Bandla](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/chakradhar_bandla/32/71998_2.png) [@Chakradhar\_Bandla](https://discuss.elastic.co/u/Chakradhar_Bandla)\
**Post date:** [July 13, 2020, 7:45am UTC](https://discuss.elastic.co/t/error-with-java-apm-agent-on-kubernetes-failed-to-handle-event-of-type-metrics-with-this-error-by-zero/240853/3 "2020-07-13T07:45:15Z")

</div>

@Eyal_Koren Thank you 🙂

Sorry my bad, yeah the server urls weren't correctly passed to docker ..

---

<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:** [August 3, 2020, 3:45am UTC](https://discuss.elastic.co/t/error-with-java-apm-agent-on-kubernetes-failed-to-handle-event-of-type-metrics-with-this-error-by-zero/240853/4 "2020-08-03T03:45:17Z")

</div>

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