Search code examples
c#.netwcfazureservicebusazure-servicebusrelay

What would cause AmqpException in azure wcf relay?


I am logging the connection status events with the wcf relay, and I'm seeing something like this in the logs.

1/26 06:47:12 ERROR Service Bus ConnectionStatus: 'Reconnecting' Event. [(null)][42] LastError: 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 ---

This exception doesn't show up in the list on this microsoft page, and the only other post I can find anywhere related to this error message is here. However, that post does not have any recent comments or a resolution or workaround for the issue. Also, the exception doesn't have any stacktrace, so how am I supposed to troubleshoot this error?

I guess as a follow-up, I would ask whether this is anything to actually worry about if the wcf connection is never faulting.


Solution

  • Apparently, the token that the relay keeps refreshing to stay active requires the time on the server to match the azure service that it is connecting with, and if not, this type of error will show up. We were able to fix it by correcting the server time.