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.

System.NotSupportedException: Pipelining of requests forbidden

See original GitHub issue

Hi,

I have the following issue.

In my local machine RabbitMQ works fine with no issue. Local Version is 3.7.0, Erlang 20.1.

But when I try to use other (using network) version of RabbitMQ it sends me the following exception Version 3.6.14 Erlang 18.3

System.NotSupportedException: Pipelining of requests forbidden at RabbitMQ.Client.Impl.RpcContinuationQueue.Enqueue(IRpcContinuation k) at RabbitMQ.Client.Impl.ModelBase.Enqueue(IRpcContinuation k) at RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body) at RabbitMQ.Client.Framing.Impl.Model._Private_ExchangeDeclare(String exchange, String type, Boolean passive, Boolean durable, Boolean autoDelete, Boolean internal, Boolean nowait, IDictionary2 arguments) at RabbitMQ.Client.Impl.ModelBase.ExchangeDeclare(String exchange, String type, Boolean durable, Boolean autoDelete, IDictionary2 arguments) at EasyNetQ.RabbitAdvancedBus.<>c__DisplayClass33_0.<ExchangeDeclareAsync>b__1(IModel x) at EasyNetQ.Producer.ClientCommandDispatcherSingleton.<>c__DisplayClass8_0.<InvokeAsync>b__0(IModel x) at EasyNetQ.Producer.ClientCommandDispatcherSingleton.<>c__DisplayClass7_01.b__1(IModel channel) at EasyNetQ.Producer.PersistentChannel.InvokeChannelAction(Action1 channelAction) at EasyNetQ.Producer.ClientCommandDispatcherSingleton.<>c__DisplayClass7_01.b__0() — 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 EasyNetQ.RabbitAdvancedBus.d__33.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 EasyNetQ.Producer.PublishExchangeDeclareStrategy.d__4.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 EasyNetQ.RabbitBus.d__131.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 WOF.Bus.Infrastructure.EasyNetQBusAdapter.<PublishAsync>d__61.MoveNext()'`

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:47 (27 by maintainers)

github_iconTop GitHub Comments

3reactions
n3gwavecommented, Oct 23, 2018

Hi guys, recently I’ve been facing exactly the same exception and after some investigating I found out this is related to passive declaration (either IModel.QueueDeclarePassive and IModel.ExchangeDeclarePassive). As stated in rabbitmq client docu (https://www.rabbitmq.com/dotnet-api-guide.html#passive-declaration) if queue/exchange doesn’t exists you’ll get OperationInterruptedException and this channel cannot be used anymore. However, AdvancedBus when passing parameter passive = true will enqueue this operation and in case of error will still reuse persistent channel which will leads to massive NotSupportedExceptions. In our case we get rid of passive flag when executing QueueDeclare, proper soultion would involve recreating persistent channel in StartDispatcherThread when handling OperationInterruptedException in ClientCommandDispatcherSingleton as OperationInterrupted is a channel-level exception. I might test it in near future. Hope it helps

2reactions
Vladimirezhcommented, Jun 4, 2018

Hey. I had the same problems. I have proxies for some interfaces and got a stack:

System.NotSupportedException: Pipelining of requests forbidden in EasyNetQ.Producer.ClientCommandDispatcherSingleton.Invoke[T](Func2 channelAction) in EasyNetQ.Producer.ClientCommandDispatcher.Invoke[T](Func2 channelAction) in EasyNetQ.RabbitAdvancedBus.QueueDeclare(String name, Boolean passive, Boolean durable, Boolean exclusive, Boolean autoDelete, Nullable1 perQueueMessageTtl, Nullable1 expires, Nullable1 maxPriority, String deadLetterExchange, String deadLetterRoutingKey, Nullable1 maxLength, Nullable1 maxLengthBytes) in Castle.Proxies.Invocations.IAdvancedBus_QueueDeclare.InvokeMethodOnTarget() in Castle.DynamicProxy.AbstractInvocation.Proceed() in Castle.DynamicProxy.StandardInterceptor.PerformProceed(IInvocation invocation) in Castle.DynamicProxy.StandardInterceptor.Intercept(IInvocation invocation) in Castle.DynamicProxy.AbstractInvocation.Proceed() in Castle.Proxies.IAdvancedBusProxy.QueueDeclare(String name, Boolean passive, Boolean durable, Boolean exclusive, Boolean autoDelete, Nullable1 perQueueMessageTtl, Nullable1 expires, Nullable1 maxPriority, String deadLetterExchange, String deadLetterRoutingKey, Nullable1 maxLength, Nullable1 maxLengthBytes) in EasyNetQ.RabbitBus.SubscribeAsync[T](String subscriptionId, Func2 onMessage, Action1 configure) in EasyNetQ.RabbitBus.Subscribe[T](String subscriptionId, Action1 onMessage, Action1 configure) in MyNamespace.Rabbit..(IBus ) in MyNamespace.Rabbit.ActionBusWrapper.(IBus ) in MyNamespace.Rabbit.(ActionBusWrapper , IBus )

I logged thread ids. It turned out that the error occurs when the InternalConsumer object is dispose: public void Dispose() { if (this.disposed) return; this.disposed = true; if (this.Model == null) return; this.consumerDispatcher.QueueAction((Action) (() => //this code { this.Model.Dispose(); foreach (BasicConsumer basicConsumer in (IEnumerable<BasicConsumer>) this.basicConsumers) basicConsumer.Dispose(); })); ` }
consumerDispatcher thread id == thread id of method caller.

I copy InternalConsumerFactory implementation and InternalConsumer implementation. In InternalConsumerFactory i create my InternalConsumer. In InternalConsumer i remove dispatcher call and NotSupportedException error disappeared. I use this code: public void Dispose() { if (this.disposed) return; this.disposed = true; if (this.Model == null) return; this.Model.Dispose(); foreach (BasicConsumer basicConsumer in (IEnumerable<BasicConsumer>) this.basicConsumers) basicConsumer.Dispose(); }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Got "Pipelining of requests forbidden" in c# rabbitmq client
I have a RabbitMQ C# Client running in a WCF service. It catches System.NotSupportedException: Pipelining of requests forbidden exception now ...
Read more >
[rabbitmq-users] Pipelining of requests forbidden exception
this error is caused by a race condition occurring on channel resources. ... using the channel...and that's true (i'll explain why later on)....
Read more >
Is related between C# RMQ client exception "Pipelining of ...
After got "System.TimeoutException", then, client got several exceptions of "[System.NotSupportedException] Pipelining of requests forbidden".
Read more >
Got “Pipelining of requests forbidden” in c# rabbitmq client
I have a RabbitMQ C# Client running in a WCF service. It catches System.NotSupportedException: Pipelining of requests forbidden exception now and then.
Read more >
"Pipelining of requests forbidden" on C# client
[rabbitmq-discuss] error: "Pipelining of requests forbidden" on C# client ... NotSupportedException s being thrown from a method in class ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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