question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using unicode username/password for RabbitMQ agent will result in 401 unauthorised access

See original GitHub issue

Note: If you have a feature request, you should contact support so the request can be properly tracked.

Output of the info page

===============
Agent (v7.21.0)
===============

  Status date: 2020-07-21 19:48:59.566785 UTC
  Agent start: 2020-07-21 19:35:07.318096 UTC
  Pid: 382
  Go Version: go1.13.11
  Python Version: 3.8.1
  Build arch: amd64
  Agent flavor: agent
  Check Runners: 4
  Log Level: error

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

  Clocks
  ======
    NTP offset: 135µs
    System UTC time: 2020-07-21 19:48:59.566785 UTC

  Host Info
  =========
    bootTime: 2020-04-05 09:54:42.000000 UTC
    kernelArch: x86_64
    kernelVersion: 4.15.0-1063-aws
    os: linux
    platform: debian
    platformFamily: debian
    platformVersion: bullseye/sid
    procs: 129
    uptime: 2577h40m29s
    virtualizationRole: guest
    virtualizationSystem: docker

  Hostnames
  =========
    hostname: localhost
    instance-id: i-09a102e5481303d4d
    socket-fqdn: df17fe1509a6
    socket-hostname: df17fe1509a6
    hostname provider: container

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

  Running Checks
  ==============

    cpu
    ---
      Instance ID: cpu [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/cpu.d/conf.yaml.default
      Total Runs: 55
      Metric Samples: Last Run: 6, Total: 324
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 0s
      Last Execution Date : 2020-07-21 19:48:47.000000 UTC
      Last Successful Execution Date : 2020-07-21 19:48:47.000000 UTC


    disk (2.10.1)
    -------------
      Instance ID: disk:2539eb9332db6987 [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/disk.yaml
      Total Runs: 56
      Metric Samples: Last Run: 188, Total: 10,528
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 0, Total: 0
      Average Execution Time : 26ms
      Last Execution Date : 2020-07-21 19:48:56.000000 UTC
      Last Successful Execution Date : 2020-07-21 19:48:56.000000 UTC


    docker
    ------
      Instance ID: docker [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/docker.d/conf.yaml.default
      Total Runs: 55
      Metric Samples: Last Run: 59, Total: 3,245
      Events: Last Run: 0, Total: 2
      Service Checks: Last Run: 1, Total: 55
      Average Execution Time : 17ms
      Last Execution Date : 2020-07-21 19:48:54.000000 UTC
      Last Successful Execution Date : 2020-07-21 19:48:54.000000 UTC


    rabbitmq (1.15.0)
    -----------------
      Instance ID: rabbitmq:2caf95082cc855fe [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/rabbitmq.yaml
      Total Runs: 55
      Metric Samples: Last Run: 514, Total: 28,301
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 2, Total: 110
      Average Execution Time : 280ms
      Last Execution Date : 2020-07-21 19:48:55.000000 UTC
      Last Successful Execution Date : 2020-07-21 19:48:55.000000 UTC
      metadata:
        version.major: 3
        version.minor: 7
        version.patch: 12
        version.raw: 3.7.12
        version.scheme: semver

========
JMXFetch
========

  Initialized checks
  ==================
    no checks

  Failed checks
  =============
    no checks

=========
Forwarder
=========

  Transactions
  ============
    CheckRunsV1: 55
    Connections: 0
    Containers: 0
    Dropped: 0
    DroppedOnInput: 0
    Events: 0
    HostMetadata: 0
    IntakeV1: 8
    Metadata: 0
    Pods: 0
    Processes: 0
    RTContainers: 0
    RTProcesses: 0
    Requeued: 0
    Retried: 0
    RetryQueueSize: 0
    Series: 0
    ServiceChecks: 0
    SketchSeries: 0
    Success: 118
    TimeseriesV1: 55

==========
Logs Agent
==========


  Logs Agent is not running

=========
APM Agent
=========
  Status: Running
  Pid: 381
  Uptime: 832 seconds
  Mem alloc: 7,336,976 bytes
  Hostname: queue02
  Receiver: 0.0.0.0:8126
  Endpoints:
    https://trace.agent.datadoghq.eu

  Receiver (previous minute)
  ==========================
    No traces received in the previous minute.
    Default priority sampling rate: 100.0%

  Writer (previous minute)
  ========================
    Traces: 0 payloads, 0 traces, 0 events, 0 bytes
    Stats: 0 payloads, 0 stats buckets, 0 bytes

=========
Aggregator
=========
  Checks Metric Sample: 63,153
  Dogstatsd Metric Sample: 5,643
  Event: 3
  Events Flushed: 3
  Number Of Flushes: 55
  Series Flushed: 56,042
  Service Check: 884
  Service Checks Flushed: 932

=========
DogStatsD
=========
  Event Packets: 0
  Event Parse Errors: 0
  Metric Packets: 5,642
  Metric Parse Errors: 0
  Service Check Packets: 0
  Service Check Parse Errors: 0
  Udp Bytes: 413,940
  Udp Packet Reading Errors: 0
  Udp Packets: 544
  Uds Bytes: 0
  Uds Origin Detection Errors: 0
  Uds Packet Reading Errors: 0
  Uds Packets: 0

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

Steps to reproduce the issue:

  1. Provide a unicode username/passowrd for RabbitMQ instance (basic auth):
instances:
    -  rabbitmq_api_url: http://localhost:15672/api/
       username: myusername
       password: unicode_pass_l£fsS
  1. Restart datadog-agent

Describe the results you received: Although the entered username/password are correct I see following error message in logs:

HTTP access denied: user 'myusername' - invalid credentials
Error executing check: Cannot open RabbitMQ API url: http://localhost:15672/api/overview 401 Client Error: Unauthorized for url: http://localhost:15672/api/overview

Describe the results you expected: Since the username/password are correct, I should see no error message and auth should be successful. I checked the username/password on RabbitMQ admin page and it works.

Additional information you deem important (e.g. issue happens only occasionally): It seems that in newer versions, datadog-agent does some kind of decodings on instance values which will cause such problems.

To be exact, I think this is the PR that decode all values and convert them to native strings: https://github.com/DataDog/integrations-core/pull/4730

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
moodhcommented, Aug 5, 2020

Hi, with a unicode password all endpoints works from curl/web browser to rabbitmq, just not through the datadog integration. We tested adding encoding correctly in the integration code which made the integration work so its definitely a problem in the integration with that version combination.

My colleague will be gone for a month now and he has a reproducible environment so I’m not able to test more scenarios without him.

0reactions
moodhcommented, Aug 5, 2020

Hi, great that you found the cause. Don’t worry about fixing it soon for our sake, we simply changed the password when we realized that was the issue. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Authentication, Authorisation, Access Control - RabbitMQ
Username/password pairs can be used with a variety of authentication backends that verify the credentials. Connections that fail to authenticate will be ...
Read more >
RabbitMQ HTTP API request 401 Unauthorized - Stack Overflow
I want to access to queue information and to get messages number. I found this as a solution DefaultHttpClient httpClient = new ...
Read more >
Event codes - IBM
Event codes indicate the results for a DataPower transaction. ... The SNMP agent will only come up if all SNMPv3 user credentials use...
Read more >
CVE - Search Results - MITRE
The vulnerability will cause NodeJS services that has this agent installed ... This enables unauthorized access to buckets and keys thereby exposing data...
Read more >
Applications Manager Issues Fixed - ManageEngine
(Broken since 15500); If the user cancels the operation while adding attributes in the SNMP/Network monitor, unauthorized access error was returned.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found