We are wanting to use the Azure Service Bus adapter to send and receive messages via Neuron and Azure queues.
However, I am having problems establishing a connection to the Azure Service Bus using the Neuron provided adapter.
Per the General Adapter Properties, here are the pertinent values:
Azure Service Bus Namespace Name: testengtechtms.servicebus.windows.net
Azure ACS Issuer Name: the default issuer ("owner" in this case)
Azure ACS key: the default Azure ACS key
Azure Entity Type: Queue
Azure Channel Type: Default
That said, I am able to connect just fine using a C# client and the ACS connection string as indicated in the Access connection information dialog in the Azure portal.
Is anyone currently using the Azure Service Bus adapter? If so, I'd love to see a sample of how you are authenticating.
Any help would be greatly appreciated!
From the adapter log, here is the error I am getting:
2014-05-06 08:55:54.400-05:00 1 error Exception Context: Adapter SendToEndpoint call failed. Name adapter failed to send the message to the Service Bus Namespace 'testengtechtms.servicebus.windows.net'. The token provider was unable to provide a security token while accessing 'https://testengtechtms-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009: SWT token is invalid.:TraceID:581e8e5e-fcdd-47af-8c76-8726d31f76b6:TimeStamp:2014-05-06 13:55:57Z'.
Adapter Endpoint Name: Outbound Shipment Extract Request Azure Adapter Type: Azure Service Bus Adapter Party ID: Shipment.Extract.Request.Subscriber Topic: Shipment.Extract.Request Message ID: 1f3233bd-8949-4550-a998-2ef74f45650a Session ID: 5e4594ad-1046-4719-b690-7ba127ca1d3f Active Deployment Group: Localhost
Exception: Exception Type: System.UnauthorizedAccessException Exception Message: The token provider was unable to provide a security token while accessing 'https://testengtechtms-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009: SWT token is invalid.:TraceID:581e8e5e-fcdd-47af-8c76-8726d31f76b6:TimeStamp:2014-05-06 13:55:57Z'. Exception Trace: Server stack trace: at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout) at Microsoft.ServiceBus.Messaging.HttpWebRequestExtensions.AddAuthorizationHeader(HttpWebRequest request, ITokenProvider tokenProvider, Uri baseAddress, String action) at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.<GetAsyncSteps>d__38.MoveNext() at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.Start()
Exception rethrown at [0]: at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.NamespaceManager.OnEndQueueExists(IAsyncResult result) at Microsoft.ServiceBus.NamespaceManager.QueueExists(String path) at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) at Neuron.Esb.Adapters.AzureServiceBusAdapter.Managers.EntityManager.c(String A_0, ReceiveMode A_1) at Neuron.Esb.Adapters.AzureServiceBusAdapter.Managers.EntityManager.a(EntityManagerSettings A_0, ReceiveMode A_1) at Neuron.Esb.Adapters.AzureServiceBusAdapter.Managers.EntityManager..ctor(EntityManagerSettings settings) at Neuron.Esb.Adapters.BrokeredMessagingAdapter.a(ESBMessage A_0, CommittableTransaction A_1)
Inner Exception Type: System.IdentityModel.Tokens.SecurityTokenException Inner Exception Message: The token provider was unable to provide a security token while accessing 'https://testengtechtms-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009: SWT token is invalid.:TraceID:581e8e5e-fcdd-47af-8c76-8726d31f76b6:TimeStamp:2014-05-06 13:55:57Z'. Inner Exception Trace: Server stack trace:
Exception rethrown at [0]: at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.TokenProvider.EndGetWebToken(IAsyncResult result) at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
Inner Exception Type: System.Net.WebException Inner Exception Message: The remote server returned an error: (401) Unauthorized. Inner Exception Trace: at System.Net.HttpWebRequest.GetResponse() at Microsoft.ServiceBus.TokenProviderHelper.GetAccessTokenCore(Uri requestUri, String appliesTo, String requestToken, String simpleAuthAssertionFormat, TimeSpan timeout, String& expiresIn)
2014-05-06 08:55:54.400-05:00 1 error Exception Type: System.Exception 2014-05-06 08:55:54.400-05:00 1 error Exception Message: Name adapter failed to send the message to the Service Bus Namespace 'testengtechtms.servicebus.windows.net'. The token provider was unable to provide a security token while accessing 'https://testengtechtms-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009: SWT token is invalid.:TraceID:581e8e5e-fcdd-47af-8c76-8726d31f76b6:TimeStamp:2014-05-06 13:55:57Z'.
Adapter Endpoint Name: Outbound Shipment Extract Request Azure Adapter Type: Azure Service Bus Adapter Party ID: Shipment.Extract.Request.Subscriber Topic: Shipment.Extract.Request Message ID: 1f3233bd-8949-4550-a998-2ef74f45650a Session ID: 5e4594ad-1046-4719-b690-7ba127ca1d3f Active Deployment Group: Localhost
Exception: Exception Type: System.UnauthorizedAccessException Exception Message: The token provider was unable to provide a security token while accessing 'https://testengtechtms-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009: SWT token is invalid.:TraceID:581e8e5e-fcdd-47af-8c76-8726d31f76b6:TimeStamp:2014-05-06 13:55:57Z'. Exception Trace: Server stack trace: at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout) at Microsoft.ServiceBus.Messaging.HttpWebRequestExtensions.AddAuthorizationHeader(HttpWebRequest request, ITokenProvider tokenProvider, Uri baseAddress, String action) at Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.<GetAsyncSteps>d__38.MoveNext() at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.EnumerateSteps(CurrentThreadType state) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.Start()
Exception rethrown at [0]: at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.NamespaceManager.OnEndQueueExists(IAsyncResult result) at Microsoft.ServiceBus.NamespaceManager.QueueExists(String path) at Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func) at Neuron.Esb.Adapters.AzureServiceBusAdapter.Managers.EntityManager.c(String A_0, ReceiveMode A_1) at Neuron.Esb.Adapters.AzureServiceBusAdapter.Managers.EntityManager.a(EntityManagerSettings A_0, ReceiveMode A_1) at Neuron.Esb.Adapters.AzureServiceBusAdapter.Managers.EntityManager..ctor(EntityManagerSettings settings) at Neuron.Esb.Adapters.BrokeredMessagingAdapter.a(ESBMessage A_0, CommittableTransaction A_1)
Inner Exception Type: System.IdentityModel.Tokens.SecurityTokenException Inner Exception Message: The token provider was unable to provide a security token while accessing 'https://testengtechtms-sb.accesscontrol.windows.net/WRAPv0.9/'. Token provider returned message: 'Error:Code:401:SubCode:T0:Detail:ACS50009: SWT token is invalid.:TraceID:581e8e5e-fcdd-47af-8c76-8726d31f76b6:TimeStamp:2014-05-06 13:55:57Z'. Inner Exception Trace: Server stack trace:
Exception rethrown at [0]: at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.TokenProvider.EndGetWebToken(IAsyncResult result) at Microsoft.ServiceBus.TokenProviderUtility.GetMessagingWebToken(ITokenProvider tokenProvider, String appliesTo, String action, Boolean bypassCache, TimeSpan timeout)
Inner Exception Type: System.Net.WebException Inner Exception Message: The remote server returned an error: (401) Unauthorized. Inner Exception Trace: at System.Net.HttpWebRequest.GetResponse() at Microsoft.ServiceBus.TokenProviderHelper.GetAccessTokenCore(Uri requestUri, String appliesTo, String requestToken, String simpleAuthAssertionFormat, TimeSpan timeout, String& expiresIn)
2014-05-06 08:55:54.400-05:00 1 error Exception Trace: at Neuron.Esb.Adapters.BrokeredMessagingAdapter.a(ESBMessage A_0, CommittableTransaction A_1) at Neuron.Esb.EsbService.ESBEndpointConnector.d(Object A_0, MessageEventArgs A_1) 2014-05-06 08:55:54.400-05:00 3 info Applying adatper policy for message Id: 1f3233bd-8949-4550-a998-2ef74f45650a, Topic: Shipment.Extract.Request, Sending Party: Shipment.Extract.Request.Publisher 2014-05-06 08:55:54.401-05:00 3 info Saving failed message as file C:\Program Files\Neudesic\Neuron ESB v3\DEFAULT\messages\1f3233bd-8949-4550-a998-2ef74f45650a.esbmsg
Tags:
Hi Darin,
if you look at the description for the "Azure Service Bus Namespace Name" property, the value should only be your registered namespace...not the full namespace. in your case, the value of that property should be just "testengtechtms"
as long as the issuer name and key you provide are correct, the adapter should work without issue.
kind regards,
Marty
To be honest I've tried it both ways, with only the registered namespace ("testengtechtms") and the full namespace, still no luck.
Here is the config from the adapter log file (it appears that it encrypts the key in the log file?, because that is certainly not the ACS key):
2014-05-06 13:25:39.220-05:00 3 info Configuring adapter, mode=Subscribe
2014-05-06 13:25:39.223-05:00 3 info Property Configuration =
2014-05-06 13:25:39.223-05:00 3 info Property ServiceBusNamespace = testengtechtms
2014-05-06 13:25:39.223-05:00 3 info Property IssuerName = owner
2014-05-06 13:25:39.223-05:00 3 info Property Key = l3Oepc5G2/YdSkGfKskqRqJDd6/eUbprQA5D2/oqfsOF6/T5tEP/pfNX4DMRFtao
2014-05-06 13:25:39.224-05:00 3 info Property AzureEntityTypeDesignTime = Queue
2014-05-06 13:25:39.224-05:00 3 info Property AzureChannelModeDesignTime = Default
2014-05-06 13:25:39.224-05:00 3 info Property RetryCount = 3
2014-05-06 13:25:39.224-05:00 3 info Property MinBackOff = 1
2014-05-06 13:25:39.224-05:00 3 info Property MaxBackOff = 10
...
I have also attached a screen shot of the ACS info from the Azure portal:
if you are still have trouble with this, please submit a support request at Neuronsupport@neudesic.com
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by