# APM agent for java is not working : Response code 410

**URL:** <https://discuss.elastic.co/t/apm-agent-for-java-is-not-working-response-code-410/245715>\
**Category:** APM\
**Tags:** java, server\
**Created:** [August 20, 2020, 7:06am UTC](https://discuss.elastic.co/t/apm-agent-for-java-is-not-working-response-code-410/245715 "2020-08-20T07:06:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gijo](https://avatars.discourse-cdn.com/v4/letter/g/59ef9b/32.png) [@gijo](https://discuss.elastic.co/u/gijo)\
**Post date:** [August 20, 2020, 7:06am UTC](https://discuss.elastic.co/t/apm-agent-for-java-is-not-working-response-code-410/245715/1 "2020-08-20T07:06:28Z")

</div>

Hi,

I have created a new elastic cloud deployment with version 7.8.1. And i have downloaded apm server with version 1.170.  
I added the apm parameters to my Java application.But the logs are not being sent.  
I get the following errors

2020-08-20 06:55:51.144 [elastic-apm-server-reporter] INFO co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Backing off for 36 seconds (+/-10%)  
2020-08-20 06:56:29.513 [elastic-apm-server-reporter] ERROR co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - Error sending data to APM server: [https://4a6ae8b5a758459ab79f00ecbbda5468.apm.eu-west-1.aws.cloud.es.io:443/intake/v2/events](https://4a6ae8b5a758459ab79f00ecbbda5468.apm.eu-west-1.aws.cloud.es.io:443/intake/v2/events), response code is 410  
2020-08-20 06:56:29.513 [elastic-apm-server-reporter] WARN co.elastic.apm.agent.report.IntakeV2ReportingEventHandler - {"ok":false,"message":"Deleted resource."}

The APM url is active and running.  
APM server url - [https://e5addd4da1e744a7a7e71b77c7194a80.apm.eu-west-1.aws.cloud.es.io:443](https://e5addd4da1e744a7a7e71b77c7194a80.apm.eu-west-1.aws.cloud.es.io:443)

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [August 20, 2020, 8:00am UTC](https://discuss.elastic.co/t/apm-agent-for-java-is-not-working-response-code-410/245715/2 "2020-08-20T08:00:26Z")

</div>

It looks like your agent is using a different APM Server URL. The URL in the log message

```
https://4a6ae8b5a758459ab79f00ecbbda5468.apm.eu-west-1.aws.cloud.es.io:443/intake/v2/events

```

does not match the one you pasted at the end

```
https://e5addd4da1e744a7a7e71b77c7194a80.apm.eu-west-1.aws.cloud.es.io:443

```

I suspect the 410 status is being returned because the agent is connecting to an APM Server from a deleted cloud deployment.

---

<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:** [September 10, 2020, 4:00am UTC](https://discuss.elastic.co/t/apm-agent-for-java-is-not-working-response-code-410/245715/3 "2020-09-10T04:00:36Z")

</div>

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