Closed tushartyagi closed 5 years ago
In case the stack trace is required. Using TopicSubscriptionWithRuleOperationsSample
Microsoft.Azure.ServiceBus.ServiceBusCommunicationException
HResult=0x80131500
Message=A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond ErrorCode: TimedOut
Source=Microsoft.Azure.ServiceBus
StackTrace:
at Microsoft.Azure.ServiceBus.Amqp.AmqpSubscriptionClient.<OnRemoveRuleAsync>d__27.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.ServiceBus.SubscriptionClient.<RemoveRuleAsync>d__51.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TopicSubscriptionWithRuleOperationsSample.Program.<MainAsync>d__12.MoveNext() in D:\home\coding\dotnet\azure-service-bus\samples\DotNet\GettingStarted\Microsoft.Azure.ServiceBus\TopicSubscriptionWithRuleOperationsSample\Program.cs:line 44
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at TopicSubscriptionWithRuleOperationsSample.Program.Main(String[] args) in D:\home\coding\dotnet\azure-service-bus\samples\DotNet\GettingStarted\Microsoft.Azure.ServiceBus\TopicSubscriptionWithRuleOperationsSample\Program.cs:line 31
Inner Exception 1:
SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
ServiceBusExplorer works (because it also uses the WindowsAzure.ServiceBus package??)
Correct.
Is TCP port 5671 blocked by any chance? If yes, you'll have to switch using WebSockets. To validate, you could spin up a VM on Azure and run a sample. I suspect your environment is blocking the TCP port used for AMQP by default.
Yes! That was the issue. My org had opened port 5672 for AMQP connections. Opening 5671 as well resolved the issue.
Thank you so much.
Closing this issue.
Actual Behavior
Expected Behavior
Versions