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

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 :slight_smile:

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):

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:

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.

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

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

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:

 apm-server:
  host: ":8200"
1 Like

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

1 Like

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

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

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

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

Hope this helps

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