question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The lock supplied is invalid. in AzureServiceBus

See original GitHub issue

I have longtime operations I use UseRenewLock(TimeSpan.FromSeconds(30)) and and MaxConcurrentCalls = 10; UseServiceBusMessageScheduler();

sometimes My messages were sent to *-error query. With next error: “The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue. Reference:3c6051a7-5bf8-41c3-a3f9-bb06c74c5705, TrackingId:d8a04e65-2741-4451-b0dd-2839bac8c4b8_B11, SystemTracker:brightinfoeventsdev:Queue:ispruncommand, Timestamp:2/15/2017 7:04:44 PM”,

at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)\r\n
at Microsoft.ServiceBus.Messaging.ReceiveContext.EndRenewLock(IAsyncResult result)\r\n
at Microsoft.ServiceBus.Messaging.BrokeredMessage.EndRenewLock(IAsyncResult result)\r\n
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)\r\n at MassTransit.AzureServiceBusTransport.Pipeline.RenewLockFilter.RenewLockScope.<LockRenewal>d__5.MoveNext()\r\n at MassTransit.AzureServiceBusTransport.Pipeline.RenewLockFilter.<Send>d__3.MoveNext()\r\n at MassTransit.Pipeline.Filters.DeserializeFilter.<Send>d__4.MoveNext()\r\n at GreenPipes.Filters.RescueFilter`2.<GreenPipes-IFilter<TContext>-Send>d__5.MoveNext()",

Message Details (from error query): “SendTime”: “2017-02-15T18:57:54.414Z”, “enqueuedTimeUtc”: “2017-02-15T19:06:33.363Z”, “MT-Fault-Timestamp”: “2017-02-15T19:06:28.6723840Z”, “expiresAtUtc”: “2017-03-05T19:47:02.291Z”,

Can you help me

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
chs2000commented, Apr 18, 2017

I found solution MassTransit uses TransportType.Amqp by default and when I switched to NetMessaging protocol the Error disappeared

0reactions
sajibcefalocommented, Mar 30, 2019

@phatboyg After the upgrade as you suggested the exception goes away. thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure.Messaging.ServiceBus.ServiceBusException: A lock ...
The details are as follows:- EXCEPTION: Azure.Messaging.ServiceBus.ServiceBusException. Copy. The lock supplied is invalid. Either the lock ...
Read more >
c# - The lock supplied is invalid. Either the lock expired, or ...
I'm using a Microsoft azure service bus queue to process calculations and my program runs fine for a few hours but then I...
Read more >
Azure.Messaging.ServiceBus: The lock supplied is invalid ...
The issue is that even after the function finishes executing, as per the attached screenshot, The lock supplied is invalid. Either the lock ......
Read more >
Why am I getting “The lock supplied is invalid.” error when ...
I am using python langauge to send & receive messages using Azure bus service queue. I am getting "The lock supplied is invalid....
Read more >
[Solved]-The lock supplied is invalid. Either the lock expired ...
It appears that the lock begins on all prefetched messages as soon as they are fetched. If your cumulative message processing time surpasses...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found