locked
SubscriptionClient - Issue with reading and throwing automatic exceptions RRS feed

  • Question

  • We started experiencing a strange issue with our subscription clients around 9:30AM EST on Monday, 5/7. Nothing in our client code changed, so I'm not sure what could have happened. Once every minute, our subscription client attempts to read a message, and if there are none, it throws an exception inside of the Core.MessageReceiver.ReceiveAsync method. Since we have more than a few subscriptions, we're getting a ton of exceptions, which is filling up our error logs very quickly.  

    The strangest thing is that we deleted the service bus so we could redeploy with an ARM template, but even when our service bus was down, we received the same error. The same thing happens if we point to a non-existent service bus, or change our keys to be invalid - we still get the same exception.

    However, when messages are in the topic, the client reads them successfully, processes them and removes them from the topic, so there's not an overall connectivity issue. 


    System.Exception: Error when reading received meeting message ---> System.ArgumentNullException: Value cannot be null.
    Parameter name: source
       at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
       at Microsoft.Azure.ServiceBus.ServiceBusDiagnosticSource.SetTags(Activity activity, IList`1 messageList)
       at Microsoft.Azure.ServiceBus.ServiceBusDiagnosticSource.ReceiveStop(Activity activity, Int32 messageCount, Nullable`1 status, IList`1 messageList)
       at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<ReceiveAsync>d__63.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<ReceiveAsync>d__61.MoveNext()
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       at Microsoft.Azure.ServiceBus.MessageReceivePump.<MessagePumpTaskAsync>d__11.MoveNext()
       --- End of inner exception stack trace ---
    		

    Friday, May 11, 2018 5:02 PM

All replies

  • The exception you are getting may be due to One or more arguments supplied to the method are invalid. The URI supplied to NamespaceManager or Create contains path segment(s). The URI scheme supplied to NamespaceManager or Create is invalid. The property value is larger than 32KB.

    I would suggest you Check the calling code and make sure the arguments are correct and let us know how it goes.

    Saturday, May 12, 2018 4:49 AM
  • Thanks for the response. My understanding is that would be the connection string, and I'm looking at it now. It is of the format:

    "Endpoint=sb://[servicebus]/;SharedAccessKeyName=ReadWrite;SharedAccessKey=[sharedaccesskey]"

    I don't see any way that could end up at more than 32KB.

    Also, our code works fine when messages come through. If there are no messages, that's when the exception occurs. So I am a little confused on how it could work in that situation, if a URI parameter was too large.

    Monday, May 14, 2018 1:33 PM
  • This seems to be a bug introduced with Diagnostics extension.

    Can you file the issue here? https://github.com/Azure/azure-service-bus-dotnet

    I will contact the owner of the extension about the issue.

    Wednesday, May 16, 2018 4:13 PM