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

redis_sentinel fails to complete successfully due to AUTH error #2395

Open
melissa-hale opened this issue May 25, 2024 · 0 comments
Open

redis_sentinel fails to complete successfully due to AUTH error #2395

melissa-hale opened this issue May 25, 2024 · 0 comments

Comments

@melissa-hale
Copy link

Output of the info page

When running the redis_sentinel integration to monitor a group of Redis Sentinel servers, the check fails with the following error:

2024-05-24 22:57:33 UTC | CORE | WARN | (pkg/collector/python/datadog_agent.go:131 in LogMessage) | redis_sentinel:e8118be2e61e206d | (redis_sentinel.py:42) | Error collecting metrics for master myprimary: AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?

This is my conf.yaml:

init_config:

instances:
  - sentinel_host: ${{SENTINEL1_PRIVATE_DOMAIN}}
    sentinel_port: 26379
    sentinel_password: ${{REDIS_PRIMARY_PASSWORD}}
    masters:
      - ${{REDIS_PRIMARY_NAME}}
    tags:
      - instance:redis_sentinel_1
  - sentinel_host: ${{SENTINEL2_PRIVATE_DOMAIN}}
    sentinel_port: 26379
    sentinel_password: ${{REDIS_PRIMARY_PASSWORD}}
    masters:
      - ${{REDIS_PRIMARY_NAME}}
    tags:
      - instance:redis_sentinel_2
  - sentinel_host: ${{SENTINEL3_PRIVATE_DOMAIN}}
    sentinel_port: 26379
    sentinel_password: ${{REDIS_PRIMARY_PASSWORD}}
    masters:
      - ${{REDIS_PRIMARY_NAME}}
    tags:
      - instance:redis_sentinel_3

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

  • Deployed in a Docker environment
  • Redis images tried: redis:latest & redis:6.2.6
  • Agent image: datadog/agent:7
  • Reproduced issue locally on Mac Sonoma

Steps to reproduce the issue:

  1. Deploy a Redis replica set with Sentinel (followed this guide)
  2. Deploy a DataDog agent
  3. Install integtation: datadog-agent integration install -t datadog-redis_sentinel==1.1.0 (or 1.1.1) in agent container
  4. Configure the redis_sentinel check similar to above and restart agent
  5. Observe error upon check execution

Describe the results you received:
Received an AUTH error during check execution

Describe the results you expected:
For the check execution to complete successfully

Additional information you deem important (e.g. issue happens only occasionally):
I was able to fix this in the redis_sentinel.py by passing a username of "default" when initializing the redis connection with redis.StrictRedis, e.g. -

redis_conn = redis.StrictRedis(host=host, port=port, username="default", password=password, db=0)

So I believe this is related to the implementation of ACLs after Redis version 5. According to this doc, you can configure Redis to function the same as it did prior to the change, but I haven't been successful in getting any configuration changes on Redis side to work.

Happy to accept this is an issue I need to resolve in my Redis configuration, but in case others run into this, I figured it would be helpful to have a record either way.

Thanks!

@melissa-hale melissa-hale changed the title redis_sentinel redis_sentinel fails to complete successfully due to AUTH error May 25, 2024
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

1 participant