Skip to content

Warning at startup: "No registered callback for token renewal task. Renewal cancelled" #3650

@tomdug

Description

@tomdug

We're seeing the following warning at startup when using a StreamingCredentialProvider (in particular EntraIdCredentialsProvider from redis-py-entraid):

No registered callback for token renewal task. Renewal cancelled

Token renewal seems to work normally, so it looks like a false positive that clutters the logs.

Looking into the implementation, the warning comes from the _renew_token_async method in the TokenManager, where self._listener.on_next is initially None. The EntraIdCredentialsProvider creates a CredentialsListener instance at init, and only later sets on_next via the .on_next() method.

This means the token renewal task may start before the callback is set, causing the warning. This only occurs during startup and appears to resolve itself later, presumably once the callback is registered.

Let me know if you need more information

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions