Azure.Messaging.ServiceBus.ServiceBusException: System.Net.Sockets.SocketException (110): Operation timed out
See original GitHub issueHi, I use the below code to schedule the messages in Azure Web Job ServiceBusTrigger. However I am getting the below error immediately after starting the AKS containers Azure.Messaging.ServiceBus" Version=“7.5.0”
var client = new ServiceBusClient(ConnectionString);
var sender = client.CreateSender(TopicName);
var scheduledMessage = new ServiceBusMessage(message);
await sender.ScheduleMessageAsync(scheduledMessage, DateTimeOffset.UtcNow.AddMinutes(_serviceBusConfig.ScheduledEnqueueTimeInMinutes));
await messageActions.CompleteMessageAsync(message);
Azure.Messaging.ServiceBus.ServiceBusException: Operation timed out ErrorCode: TimedOut (ServiceCommunicationProblem)
—> System.Net.Sockets.SocketException (110): Operation timed out
at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Azure.Amqp.Transport.AmqpTransportInitiator.<>c.<ConnectAsync>b__17_1(IAsyncResult r)
at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func
2 endFunction, Action1 endAction, Task
1 promise, Boolean requiresSynchronization)
— End of stack trace from previous location —
at Azure.Messaging.ServiceBus.Amqp.AmqpConnectionScope.CreateAndOpenConnectionAsync(Version amqpVersion, Uri serviceEndpoint, ServiceBusTransportType transportType, IWebProxy proxy, String scopeIdentifier, TimeSpan timeout)
at Microsoft.Azure.Amqp.FaultTolerantAmqpObject1.OnCreateAsync(TimeSpan timeout) at Microsoft.Azure.Amqp.Singleton
1.GetOrCreateAsync(TimeSpan timeout)
at Microsoft.Azure.Amqp.Singleton1.GetOrCreateAsync(TimeSpan timeout) at Azure.Messaging.ServiceBus.Amqp.AmqpConnectionScope.OpenManagementLinkAsync(String entityPath, String identifier, TimeSpan timeout, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.OpenManagementLinkAsync(TimeSpan timeout) at Microsoft.Azure.Amqp.FaultTolerantAmqpObject
1.OnCreateAsync(TimeSpan timeout)
at Microsoft.Azure.Amqp.Singleton1.GetOrCreateAsync(TimeSpan timeout) at Microsoft.Azure.Amqp.Singleton
1.GetOrCreateAsync(TimeSpan timeout)
at Azure.Messaging.ServiceBus.Amqp.ManagementUtilities.ExecuteRequestResponseAsync(AmqpConnectionScope connectionScope, FaultTolerantAmqpObject1 managementLink, AmqpRequestMessage amqpRequestMessage, TimeSpan timeout) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.ScheduleMessageInternalAsync(IReadOnlyList
1 messages, TimeSpan timeout, CancellationToken cancellationToken)
— End of inner exception stack trace —
at Azure.Messaging.ServiceBus.Amqp.AmqpSender.ScheduleMessageInternalAsync(IReadOnlyList1 messages, TimeSpan timeout, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.<>c.<<ScheduleMessagesAsync>b__24_0>d.MoveNext() --- End of stack trace from previous location --- at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1,TResult](Func
4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.ServiceBusRetryPolicy.RunOperation[T1,TResult](Func4 operation, T1 t1, TransportConnectionScope scope, CancellationToken cancellationToken) at Azure.Messaging.ServiceBus.Amqp.AmqpSender.ScheduleMessagesAsync(IReadOnlyList
1 messages, CancellationToken cancellationToken)
at Azure.Messaging.ServiceBus.ServiceBusSender.ScheduleMessagesAsync(IEnumerable`1 messages, DateTimeOffset scheduledEnqueueTime, CancellationToken cancellationToken)
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Hi @jsquire , All sorted. I have tested and confirmed that the issue is no longer exists. Thanks.
Hey @jsquire Thanks for the swift reply. I could not bind the ServiceBusSender directly “Cannot bind parameter ‘sender’ to type ServiceBusSender”. However, I managed to use it with ServiceBus attribute as mentioned below. I will update once done with my testing.