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.

IoT Edge - AMQP messages are not received, and error in sending the messages

See original GitHub issue

I’m trying to send/receive messages to/from another iot edge module.

Following is the code:

var amqpSetting = new AmqpTransportSettings(TransportType.Amqp_Tcp_Only); ITransportSettings[] settings = { amqpSetting };

// Open a connection to the Edge runtime this.IoTHubModuleClient = await ModuleClient.CreateFromEnvironmentAsync(settings);

await this.IoTHubModuleClient.OpenAsync();

For receive:

await this.IoTHubModuleClient.SetInputMessageHandlerAsync(“mainInput”, this.ReceiveMessage, this.IoTHubModuleClient);

For send:

await moduleClient.SendEventAsync(“mainOutput”, upstreamMessage); ReceiveMessage is not being invoked even though the other module is sending the message, and I get following exception after some time for SendEventAsync

Microsoft.Azure.Devices.Client.Exceptions.IotHubCommunicationException: The operation did not complete within the allocated time 00:01:00 for object message. —> Microsoft.Azure.Devices.Client.Exceptions.IotH ubCommunicationException: The operation did not complete within the allocated time 00:01:00 for object message. —> System.TimeoutException: The operation did not complete within the allocate d time 00:01:00 for object message. at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.Azure.Amqp.SendingAmqpLink.EndSendMessage(IAsyncResult result) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) — End of stack trace from previous location where exception was thrown — at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpIoTSendingLink.SendAmqpMessageAsync(AmqpMessage amqpMessage, TimeSpan timeout) — End of inner exception stack trace — — End of inner exception stack trace — at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpIoTSendingLink.SendAmqpMessageAsync(AmqpMessage amqpMessage, TimeSpan timeout) at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpIoTSendingLink.SendMessageAsync(Message message, TimeSpan timeout) at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpUnit.SendMessageAsync(Message message, TimeSpan timeout) at Microsoft.Azure.Devices.Client.Transport.AmqpIoT.AmqpUnit.SendEventAsync(Message message, TimeSpan timeout) at Microsoft.Azure.Devices.Client.Transport.Amqp.AmqpTransportHandler.SendEventAsync(Message message, CancellationToken cancellationToken) at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.<>c__DisplayClass22_0.<<ExecuteWithErrorHandlingAsync>b__0>d.MoveNext() — End of stack trace from previous location where exception was thrown — at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.ExecuteWithErrorHandlingAsync[T](Func1 asyncOperation) at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass14_0.<<SendEventAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.SendEventAsync(Message message, CancellationToken cancellationToken) at Microsoft.Azure.Devices.Client.InternalClient.SendEventAsync(String outputName, Message message) at xxxx1.SendMessage(String messageContent, String correlationId, String messageType, String messageVersion, Object userContext )

But this message is being received in the other IoT edge module.

Can someone help me with this?

Thanks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
keshava-hmcommented, Oct 24, 2019

@asergaz hmm yes. But tried on real edge device with win10 1809 as well. Its the same result. –Keshava

1reaction
keshava-hmcommented, Oct 21, 2019

@asergaz oops. I missed that post. Sorry.

Here’s the info: Host OS: Win10 Arch : amd64 Windows containers

Will update the other informations in sometime… Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot Azure IoT Edge common errors
Solution. Try increasing the IoT Edge Hub MaxUpstreamBatchSize environment variable. This allows more messages to be sent in a single batch, ...
Read more >
IoT edge device does not send the messages to IoT hub ...
I have deployed IoT edge device on Raspberry Pi 3. I have three modules. edgeAgent; edgeHub; Node-RED. All successfully run.
Read more >
Azure IoT C SDK: iothub_client_core_common.h File ...
IOTHUB_CLIENT_CONNECTION_COMMUNICATION_ERROR MQTT: A telemetry message timed out receiving a PUBACK from the Azure IoT Hub, there was an error sending a PUBACK ...
Read more >
Big Data, Cloud Computing, Data Science & Engineering
sends it, so it can prevent the loss by the network, but it cannot prevent the ... Exchange provided by RabbitMQ can only...
Read more >
Challenges and Opportunities for the Convergence of IoT, Big ...
into Cloud or Cloud services can be brought into IOT. ... message sent in response to Confirmable message Reset- A message that could...
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