# ERROR \[beater\] beater/beater.go:142 failed to listen:listen tcp 13.233.140.23:8200: bind: cannot assign requested address

**URL:** <https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154>\
**Category:** APM\
**Created:** [March 13, 2019, 1:03pm UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154 "2019-03-13T13:03:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ammu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ammu/32/41904_2.png) [@ammu](https://discuss.elastic.co/u/ammu)\
**Post date:** [March 13, 2019, 1:03pm UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/1 "2019-03-13T13:03:07Z")

</div>

If you are asking about a problem you are experiencing, please use the following template, as it will help us help you. If you have a different problem, please delete all of this text 🙂

**Kibana version** :

**Elasticsearch version** :

**APM Server version** :

**APM Agent language and version** :

**Browser version** :

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**:

**Fresh install or upgraded from other version?**

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

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

**Steps to reproduce** :  
1.  
2.  
3.

**Errors in browser console (if relevant)**:

**Provide logs and/or server output (if relevant)**:

---

<div class="post-metadata">

**Author:** ![gil](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gil/32/41911_2.png) [@gil](https://discuss.elastic.co/u/gil)\
**Post date:** [March 14, 2019, 4:12pm UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/2 "2019-03-14T16:12:46Z")

</div>

Hello @ammu, can you provide any relevant command line settings or configuration options you've set? This error is common when the `apm-server.host` setting uses an IP that doesn't exist on the system. For example:

```auto
apm-server -E apm-server.host=1.2.3.4:8200 -e
...
ERROR	[beater]	beater/beater.go:142	failed to listen:listen tcp 1.2.3.4:8200: bind: can't assign requested address

```

To listen on all external interfaces specify `:8200` or `0.0.0.0:8200`. To listen on a specific interface, please ensure the IP plumbed matches your configuration.

---

<div class="post-metadata">

**Author:** ![ammu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ammu/32/41904_2.png) [@ammu](https://discuss.elastic.co/u/ammu)\
**Post date:** [March 18, 2019, 4:53am UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/3 "2019-03-18T04:53:35Z")

</div>

HI @gil

Thanks a lot for the response.

Just wanted to know, where do I find this apm-server.host configuration file. I tried to locate but didn't find.

I do have done the relevant changes in apm-server.yml.

Regards  
Amit Singh Bisht

---

<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:** [March 18, 2019, 5:14am UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/4 "2019-03-18T05:14:30Z")

</div>

@ammu `apm-server.host` is the name of a config variable, not a file. In your apm-server.yml, you should have something like:

```auto
apm-server:
  host: "hostname:8200"

```

`13.233.140.23` is an EC2/AWS IP. If I recall correctly, public IP addresses are not seen by the instance; public IPs are NAT'd through to the instance via its private IP address.

If you want to expose your APM Server, then change the `host` value in apm-server.yml so it looks like this:

```auto
 apm-server:
  host: ":8200"

```

---

<div class="post-metadata">

**Author:** ![ammu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ammu/32/41904_2.png) [@ammu](https://discuss.elastic.co/u/ammu)\
**Post date:** [March 18, 2019, 6:22am UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/5 "2019-03-18T06:22:22Z")

</div>

Hi @axw,

Correct I am using aws ec2 instance.

I got the point for  
**apm-server:**  
\*\* host: ":8200"\*\*. But my elastic is running on a different instance. How do I define the IP address of my elastic node in yml file ???

Instance 1 : kibana and APM  
Instance 2: Elastic.

Regards  
Amit Singh Bisht

---

<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:** [March 18, 2019, 6:41am UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/6 "2019-03-18T06:41:15Z")

</div>

@ammu To specify the IP address(es) of Elasticsearch, you need to configure `output.elasticsearch.hosts` instead. Please refer to [https://www.elastic.co/guide/en/apm/server/current/elasticsearch-output.html](https://www.elastic.co/guide/en/apm/server/current/elasticsearch-output.html).

---

<div class="post-metadata">

**Author:** ![ammu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ammu/32/41904_2.png) [@ammu](https://discuss.elastic.co/u/ammu)\
**Post date:** [March 18, 2019, 9:55am UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/7 "2019-03-18T09:55:08Z")

</div>

Hi @axw,

Port 8200 is resolved. I appreciate your support.

Need one more help. Any idea of below error " [root@apmserver bin]# ./elasticsearch  
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N  
OpenJDK 64-Bit Server VM warning: INFO: os::commit\_memory(0x00000000c5330000, 986513408, 0) failed; error='Cannot allocate memory' (errno=12)

# 

# There is insufficient memory for the Java Runtime Environment to continue.

# Native memory allocation (mmap) failed to map 986513408 bytes for committing reserved memory.

# An error report file with more information is saved as:

# logs/hs\_err\_pid3076.log

"  
It comes, when I am installing elastic.

Regards  
Amit Singh Bisht

---

<div class="post-metadata">

**Author:** ![jalvz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jalvz/32/45613_2.png) [@jalvz](https://discuss.elastic.co/u/jalvz)\
**Post date:** [March 18, 2019, 3:29pm UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/8 "2019-03-18T15:29:32Z")

</div>

Hi @ammu, you can specify the maximum heap size in the jvm.options file: [https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html)

So if e.g your machine has 1Gb of RAM you can set -Xmx500mb

Hope this helps

---

<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 8, 2019, 11:35am UTC](https://discuss.elastic.co/t/error-beater-beater-beater-go-142-failed-to-listen-listen-tcp-13-233-140-23-bind-cannot-assign-requested-address/172154/9 "2019-04-08T11:35:17Z")

</div>

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