# Error while dialing: dial tcp: lookup apm-server on 127.0.0.11:53

**URL:** <https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354>\
**Category:** APM\
**Tags:** elastic-stack-monitoring, docker, server, open-telemetry\
**Created:** [September 19, 2023, 11:57am UTC](https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354 "2023-09-19T11:57:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hamad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamad/32/123276_2.png) [@Hamad](https://discuss.elastic.co/u/Hamad)\
**Post date:** [September 19, 2023, 11:57am UTC](https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354/1 "2023-09-19T11:57:17Z")

</div>

I have installed apm-server to show traces and metrics that are being exported from otel. I can see my service on the APM on kibana but cant see the traces that are exported by otel. while seeing logs of otel collector on docker i found following log:

```auto
 info exporterhelper/queued_retry.go:430 Exporting failed. Will retry the request after interval. {"kind": "exporter", "data_type": "traces", "name": "otlp/elastic", "error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing: dial tcp: lookup apm-server on 127.0.0.11:53: no such host\"", "interval": "6.545859934s"}

```

```auto
warn zapgrpc/zapgrpc.go:195 [core] [Channel #6 SubChannel #7] grpc: addrConn.createTransport failed to connect to {Addr: "apm-server:8200", ServerName: "apm-server:8200", }. Err: connection error: desc = "transport: Error while dialing: dial tcp: lookup apm-server on 127.0.0.11:53: no such host" {"grpc_log": true}

```

my apm-server.yml file:

```auto
output.elasticsearch:
  hosts: ['localhost:9200']
  username: elastic
  password: changeme

```

my otel config file:

```auto
exporters:
  otlp:
    endpoint: 'http://localhost:8200'
    tls:
      insecure: true
    headers:
      Authorization: 'Bearer '

service:
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [zipkin, logging, otlp]
    metrics:
      receivers: [otlp]
      exporters: [logging, otlp]
    logs:
      receivers: [otlp]
      exporters: [logging, otlp]

```

---

<div class="post-metadata">

**Author:** ![lahsivjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lahsivjar/32/101451_2.png) [@lahsivjar](https://discuss.elastic.co/u/lahsivjar)\
**Post date:** [September 26, 2023, 3:44am UTC](https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354/2 "2023-09-26T03:44:53Z")

</div>

Hello @Hamad ,

> I can see my service on the APM on kibana

Are you able to see metrics exported from OTEL in kibana?

> while seeing logs of otel collector on docker i found following log

It looks like your OTEL collector cannot access APM-Server. I see in the configuration that you are using `localhost:8200` as the OTLP endpoint, I don't think the OTEL collector running on docker can reach the APM-Server on localhost no matter where it is running without some special handling. Can you confirm that APM-Server is reachable from OTEL collector docker container?

---

<div class="post-metadata">

**Author:** ![Hamad](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hamad/32/123276_2.png) [@Hamad](https://discuss.elastic.co/u/Hamad)\
**Post date:** [September 26, 2023, 7:06am UTC](https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354/3 "2023-09-26T07:06:44Z")

</div>

Hey @lahsivjar , thanks for replying. I was facing multiple issues with setting up apm server locally so shifted to elastic cloud. It was a lot easier to setup apm on cloud.

---

<div class="post-metadata">

**Author:** ![lahsivjar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lahsivjar/32/101451_2.png) [@lahsivjar](https://discuss.elastic.co/u/lahsivjar)\
**Post date:** [September 26, 2023, 8:14am UTC](https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354/4 "2023-09-26T08:14:20Z")

</div>

Glad to hear that 🙂

---

<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:** [October 24, 2023, 8:15am UTC](https://discuss.elastic.co/t/error-while-dialing-dial-tcp-lookup-apm-server-on-127-0-0-11-53/343354/5 "2023-10-24T08:15:20Z")

</div>

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