Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent respond 404 page not found from 8126 port on EKS Fargate #17524

Closed
naruse666 opened this issue Jun 8, 2023 · 2 comments
Closed

agent respond 404 page not found from 8126 port on EKS Fargate #17524

naruse666 opened this issue Jun 8, 2023 · 2 comments

Comments

@naruse666
Copy link

I'm running datadog-agent as a sidecar.
And set this up as reference Amazon EKS on AWS Fargate.

When I run curl localhost:8126 from my application to the datadog-agent container, it returns a 404 page not found.

When curl localhost:8126/info was executed, a correct response was returned.

This PR discusses ECS Fargaate, but a 404 is responded to as well.
I'm aware that kubernetes can connect as localhost to the sidecar.
DataDog/dd-trace-rb#1446

I'm hoping to learn something from the answers, as no one else seems to have faced this problem.

result of agent statuscommand

===============
Agent (v7.45.0)
===============
=========
APM Agent
=========
  Status: Running
  Pid: 401
  Uptime: 76144 seconds
  Mem alloc: 10,213,336 bytes
  Hostname:
  Receiver: 0.0.0.0:8126
  Endpoints:
    https://trace.agent.datadoghq.com

  Receiver (previous minute)
  ==========================
    No traces received in the previous minute.

Agent Environment
v7.45.0

Describe what happened:
agent had response 404 page not found.

Describe what you expected:
correct response from port 8126.

Steps to reproduce the issue:
run with

  • AWS EKS on Fargate v3.2.0
  • kubernetes version: 1.25.0

Additional environment details (Operating System, Cloud provider, etc):
kubernetes manifest I'm using. (ClusterRole is bound as document AWS EKS Fargate RBAC )

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
  labels:
    app: my-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      serviceAccountName: my-app
      containers:
        - name: my-app
          image: <MY_APP_IMAGE>
        - name: datadog-agent
          image: public.ecr.aws/datadog/agent:latest
          ports:
          - containerPort: 8126
          env:
          - name: DD_API_KEY
             value: <MY_API_KEY>
          - name: DD_APP_KEY
             value: <MY_APP_KEY>
          - name: DD_EKS_FARGATE
             value: "true"
          - name: DD_KUBERNETES_KUBELET_NODENAME
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: spec.nodeName
          - name: DD_SITE
             value: "datadoghq.com"
          - name: DD_CLUSTER_NAME
             value: "my-cluster"
@naruse666 naruse666 changed the title agent respond 404 page not found from 8126 port agent respond 404 page not found from 8126 port on EKS Fargate Jun 8, 2023
@vickenty
Copy link
Contributor

vickenty commented Jun 8, 2023

Hi @naruse666, the http server at port 8126 doesn't expect requests to the root url, so 404 response is normal, and shows that your application container can reach the apm agent fine.

If you have further questions, or have other issues using the agent, we have a dedicated team who can investigate your reports directly. Please contact Datadog support and and send them a flare demonstrating the issue.

Thanks!

@vickenty vickenty closed this as completed Jun 8, 2023
@naruse666
Copy link
Author

@vickenty, thanks for the answer.
I didn't know that.
If you have a link to a document that describes it, please let me know.

I'm currently facing a problem with ruby ddtrace not sending traces to agent.
Can I suspect a problem with ddtrace?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants