Azure / Azure/azure-service-bus-java

Error occurred while refreshing token

Open
#437 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
62
Forks
63
PR merge metrics
No merged PRs in 30d

Description

We are migration from the old servicebus sdk to the new one and after the first deployment we had several errors.
One of them is:

{"@timestamp":"2025-01-01T04:34:28.321Z","@version":"1","message":"{\"az.sdk.message\":\"Error occurred while refreshing token that is not retriable. Not scheduling refresh task. Use ActiveClientTokenManager.authorize() to schedule task again.\",\"exception\":\"Cannot send a message when request response channel is disposed. ConnectionId:MF_69a7a4_1735638516319 isCacheTerminated:false isConnectionTerminated:true\",\"scopes\":\"amqp://sbus-nonprod-sprint-main-pextnk.servicebus.windows.net/slot_to_events_subscription_queue\",\"audience\":\"amqp://sbus-nonprod-sprint-main-pextnk.servicebus.windows.net/slot_to_events_subscription_queue\"}","logger_name":"com.azure.core.amqp.implementation.ActiveClientTokenManager","thread_name":"parallel-1","level":"ERROR","level_value":40000}

We use the following code to setup the sender:
```
public ServiceBusSenderClient prepareSender(String queueName) {
return new ServiceBusClientBuilder()
.connectionString(....)
.retryOptions(RETRY_OPTIONS)
.sender()
.queueName(queueName)
.buildClient();

}
```

SDK version 7.17.7
java version: 17

Can you, please, tell us why the error occurs and how can we avoid it?

Thanks,
Cristi

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.