datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Error: unexpected end of JSON input when trying to create a flare

Open hden opened this issue 7 years ago • 2 comments

==============================
Datadog Cluster Agent (v1.3.1)
==============================

  Status date: 2019-06-21 11:14:53.254265 UTC
  Agent start: 
  Pid: 1
  Check Runners: 4
  Log Level: info

  Paths
  =====
    Config File: /etc/datadog-agent/datadog-cluster.yaml
    conf.d: /etc/datadog-agent/conf.d

  Clocks
  ======
    System UTC time: 2019-06-21 11:14:53.254265 UTC

  Hostnames
  =========
    ec2-hostname: ip-10-120-73-146.ap-northeast-1.compute.internal
    hostname: i-0678d0d305f2a9795
    instance-id: i-0678d0d305f2a9795
    socket-fqdn: datadog-cluster-agent-d99fd454d-skpp9
    socket-hostname: datadog-cluster-agent-d99fd454d-skpp9
    hostname provider: aws
    unused hostname providers:
      configuration/environment: hostname is empty
      gce: unable to retrieve hostname from GCE: status code 404 trying to GET http://169.254.169.254/computeMetadata/v1/instance/hostname

  Leader Election
  ===============
    Leader Election Status:  Running
    Leader Name is: datadog-cluster-agent-d99fd454d-skpp9
    Last Acquisition of the lease: Fri, 21 Jun 2019 11:12:09 UTC
    Renewed leadership: Fri, 21 Jun 2019 11:14:40 UTC
    Number of leader transitions: 3 transitions

  Custom Metrics Server
  =====================
    ConfigMap name: default/datadog-custom-metrics
    
    External Metrics
    ----------------
      Total: 2
      Valid: 2
      hpa:
      - name: nginx-hpa
      - namespace: media-api-proxy
      - uid: f8e84987-8b53-11e9-9579-06114a42e856
      labels:
      - kube_namespace: media-api-proxy
      metricName: nginx.net.request_per_s
      ts: 1.56111561e+09
      valid: true
      value: 0.06665849313139915
      hpa:
      - name: nginx-hpa
      - namespace: toreta-api-proxy
      - uid: 31e18c6c-8b53-11e9-96ac-0a0be03c2aac
      labels:
      - kube_namespace: toreta-api-proxy
      metricName: nginx.net.request_per_s
      ts: 1.56111561e+09
      valid: true
      value: 0.0666657853871584

=========
Collector
=========

  Running Checks
  ==============
    
    kubernetes_apiserver
    --------------------
      Instance ID: kubernetes_apiserver [OK]
      Total Runs: 16
      Metric Samples: Last Run: 0, Total: 0
      Events: Last Run: 0, Total: 17
      Service Checks: Last Run: 3, Total: 33
      Average Execution Time : 173ms
      
=========
Forwarder
=========

  Transactions
  ============
    CheckRunsV1: 15
    Dropped: 0
    DroppedOnInput: 0
    Events: 0
    HostMetadata: 0
    IntakeV1: 4
    Metadata: 0
    Requeued: 0
    Retried: 0
    RetryQueueSize: 0
    Series: 0
    ServiceChecks: 0
    SketchSeries: 0
    Success: 34
    TimeseriesV1: 15

  API Keys status
  ===============
    API key ending with 28ff4: API Key valid

==========
Endpoints
==========
  https://app.datadoghq.com - API Key ending with:
      - 28ff4

Describe what happened: When creating a flare with the command kubectl exec $POD_ID -it -- datadog-cluster-agent flare $CASE_ID the agent exited with an error message:

Asking the Cluster Agent to build the flare archive.
/tmp/datadog-agent-2019-06-21-11-12-55.zip is going to be uploaded to Datadog
An unknown error has occurred - Please contact support by email.
Error: unexpected end of JSON input
Usage:
  datadog-cluster-agent flare [caseID] [flags]

Flags:
  -e, --email string   Your email
  -h, --help           help for flare
  -s, --send           Automatically send flare (don't prompt for confirmation)

Global Flags:
  -c, --cfgpath string   path to directory containing datadog.yaml
  -n, --no-color         disable color output

Error: unexpected end of JSON input
command terminated with exit code 255

Describe what you expected: The cluster agent should send a flare.

Steps to reproduce the issue:

  1. Deploy a cluster agent pod on a EKS cluster.
  2. Send a flare.

Additional environment details (Operating System, Cloud provider, etc):

  • AWS EKS

hden avatar Jun 21 '19 11:06 hden

Hi @hden, thanks for opening up an issue! This PR fixes the issue on the agent: https://github.com/DataDog/datadog-agent/pull/3595 As the cluster agent shares code with the agent, it should be fixed in the version 1.3.2 https://github.com/DataDog/datadog-agent/blob/master/CHANGELOG-DCA.rst#release-notes

This version is now out, you can test it out!

Thanks,

Simon

Simwar avatar Jul 10 '19 15:07 Simwar

Hi,

The version 1.3.2 of the cluster agent has been released with fix mentioned above. I will close this issue.

Thanks for your patience!

Simon

Simwar avatar Jul 25 '19 12:07 Simwar