# Apm server logs not telling if it's getting a request

**URL:** <https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002>\
**Category:** APM\
**Tags:** dotnet, server\
**Created:** [October 22, 2020, 12:49pm UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002 "2020-10-22T12:49:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [October 22, 2020, 12:49pm UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/1 "2020-10-22T12:49:49Z")

</div>

Hi, using apm server on kubernetes. I have turned on the debug logs. The application guy is telling that he is sending the request to apm server with log message. How can I validate it in apm that it is processing that request? Apm server logs doesn't have any entry of request it received.

Also how can I validate that apm server is sending the request to elasticsearch. Apm logs doesn't have any info.

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [October 22, 2020, 1:32pm UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/2 "2020-10-22T13:32:26Z")

</div>

Hi @Divit_Sharma,  
if the APM Server receives a request it generally logs something similar to `<timestamp> INFO	[request]	middleware/log_middleware.go:101	request accepted <some details>` on the `INFO` level.

In `DEBUG` mode it also logs information around how many events are published to elasticsearch. By default the server starts with log level `INFO` in which case nothing is logged for successfully sending data to Elasticsearch.

No log entries indicate that no requests are received by the APM Server. Since it sounds like the instrumented app contains logs for sending events to the server, is there a proxy between the app and the APM Server that might terminate/block the request?

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [October 23, 2020, 7:59am UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/3 "2020-10-23T07:59:26Z")

</div>

Thanks for the information. Will revert tomorrow. No proxy is configured.

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [October 23, 2020, 8:24am UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/4 "2020-10-23T08:24:23Z")

</div>

Hi,

I am able to telnet to apm server on kubernetes on 8200.

When I hit [http://apmserver:8200](http://apmserver:8200), it showing me blank response. Absolutely nothing. No error as well.

In logs, I can see

Connection to backoff(elasticsearch ) established.

Successfully obtained connection to Kibana.

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [October 23, 2020, 5:03pm UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/5 "2020-10-23T17:03:41Z")

</div>

FYI, SECRET TOKEN had to be added. Changes should be made so that apm throws error that token is missing.

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [October 27, 2020, 7:38am UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/6 "2020-10-27T07:38:10Z")

</div>

Glad to hear you found the issue.  
When the secret token is configured and missing in a request, the APM Server usually logs an `ERROR` and the agent receives a response `401 unauthorized` and is supposed to log information accordingly.

Could you provide more information about which APM Server version and agent you are using?

---

<div class="post-metadata">

**Author:** ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)\
**Post date:** [October 27, 2020, 8:38am UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/7 "2020-10-27T08:38:45Z")

</div>

7.9.2 APM Server on kubernetes. DOTNET agent latest. Agent should not matter since even curl request without token gave blank response.

---

<div class="post-metadata">

**Author:** ![simitt](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simitt/32/106406_2.png) [@simitt](https://discuss.elastic.co/u/simitt)\
**Post date:** [October 27, 2020, 9:08am UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/8 "2020-10-27T09:08:55Z")

</div>

When calling `http://apmserver:8200` without a secret token it is expected to return a `200` with an empty response body; whereas if a secret token were provided, detailed information about e.g. the server version would be returned. This is intended behavior, as it is used as a healthcheck endpoint that is also available for RUM agents (which do not support secret tokens).  
However, when the agent makes a request to ingest data it calls `http://apmserver:8200/intake/v2/events` in which case a `401` is returned and an error is logged. In my previous comment I was referring to the agent requests.

If you'd like to try it out with `curl`, you can download a sample request body from the [APM Server docs](https://www.elastic.co/guide/en/apm/server/7.9/example-intake-events.html) and run a command like `curl -i -H "Content-type: application/x-ndjson" --data-binary @sample-data.ndjson http://localhost:8200/intake/v2/events`

---

<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:** [November 17, 2020, 5:09am UTC](https://discuss.elastic.co/t/apm-server-logs-not-telling-if-its-getting-a-request/253002/9 "2020-11-17T05:09:01Z")

</div>

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