Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Expired token on relay

$
0
0

Hello,

I am having an issue on a single server using service bus relays. I have updated to the latest client library (WindowsAzure.ServiceBus v3.3.2) It appears to be related to the server time on the client side being out of sync. However,

we are using the shared access key and other servers do not experience this issue. I changed the code to use the "opt-out" of requiring security tokens. We are using netTcpRelayBinding on the client side:

var netTcpRelayBinding = new NetTcpRelayBinding(EndToEndSecurityMode.Transport, RelayClientAuthenticationType.None)
            {
                IsDynamic = true // The default value is true
            };

I have the ConnectionStatusBehavior logging out the Online, Offline and Connecting events. Here is the output from the client:

2016-09-09 06:44:44,320 [12] DEBUG  - Going Online Event
2016-09-09 07:44:13,097 [32] DEBUG  - Lost Connection. Reconnecting Event. Last error encountered System.ServiceModel.CommunicationException: Exception of type 'System.ServiceModel.CommunicationException' was thrown. ---> Microsoft.ServiceBus.Messaging.Amqp.AmqpException: An AMQP error occurred (condition='amqp:unauthorized-access').
   --- End of inner exception stack trace ---
2016-09-09 07:44:16,530 [32] DEBUG  - Going Offline Event. Last error encountered Generic: ExpiredToken:
2016-09-09 07:44:16,531 [32] DEBUG  - Relay Echo ServiceHost faulted. Generic: ExpiredToken:
2016-09-09 07:44:18,977 [33] DEBUG  - Going Online Event
2016-09-09 07:44:18,977 [32] DEBUG  - Relay Echo ServiceHost recreated
2016-09-09 08:43:49,079 [56] DEBUG  - Lost Connection. Reconnecting Event. Last error encountered System.ServiceModel.CommunicationException: Exception of type 'System.ServiceModel.CommunicationException' was thrown. ---> Microsoft.ServiceBus.Messaging.Amqp.AmqpException: An AMQP error occurred (condition='amqp:unauthorized-access').
   --- End of inner exception stack trace ---
2016-09-09 08:43:52,507 [12] DEBUG  - Going Offline Event. Last error encountered Generic: ExpiredToken:
2016-09-09 08:43:52,507 [12] DEBUG  - Relay Echo ServiceHost faulted. Generic: ExpiredToken:
2016-09-09 08:43:54,945 [57] DEBUG  - Going Online Event
2016-09-09 08:43:54,945 [12] DEBUG  - Relay Echo ServiceHost recreated

I am able to recreate the service host by modifying the behavior of excluding the "AuthorizationFailedException" check when the service host enters a faulted state. This server seems to lose the connection about ever hour and these events log out. I'm trying to determine if there is anything I should be doing in the code/configuration to resolve this issue.


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>