aws-observability / aws-otel-collector

AWS Distro for OpenTelemetry Collector (see ADOT Roadmap at https://github.com/orgs/aws-observability/projects/4)

Home Page:https://aws-otel.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ADOT EC2 not listening for traffic with IPv4, defaults to IPv6. Unable to communicate to the instance from anywhere.

pfilbin90 opened this issue · comments

Describe the bug
EC2 collector created through Cloudformation reports status okay, everything is ready.

sudo /opt/aws/aws-otel-collector/bin/aws-otel-collector-ctl  -a status
{
  "status": "running",
  "starttime": "2024-05-23T23:10:10+00:00",
  "version": "v0.39.0"
}

However, the server appears to only be listening for requests via IPv6.
Because it's only listening on IPv6, my application fails to send metrics to the EC2 instance.

Steps to reproduce
Create the OTEL Collector on EC2 using the provided cloudformation stack, try to test the server with curl and netstat.

curl -v localhost:4317
* Host localhost:4317 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:4317...
* Connected to localhost (::1) port 4317
> GET / HTTP/1.1
> Host: localhost:4317
> User-Agent: curl/8.5.0
> Accept: */*
>
* Received HTTP/0.9 when not allowed
* Closing connection
curl: (1) Received HTTP/0.9 when not allowed  
sudo netstat -tuln | grep 4317
tcp6       0      0 :::4317                 :::*                    LISTEN

What did you expect to see?
Proper communication to the server on the running port (in this case it's 4317 which is the default).

For netstat, I would expect to see the server listening on port 4317 for IPv4:

sudo netstat -tuln | grep 4317
tcp       0       0.0.0.0:4317                 :::*                    LISTEN

What did you see instead?
Instead I saw the failures posted above. Attempted curl on localhost and also from another instance and both failed with above error.

Environment
My environment is an AWS EC2 running in a public subnet with an internet gateway on the route table. Security group and NACL has been wide open to all traffic for testing purposes.

Additional context
My configuration of the aws-otel-collector is just set to the default. I haven't changed anything on the EC2 yet because I'm simply just trying to make the first connection.

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

This issue was closed because it has been marked as stale for 30 days with no activity.