1

I set an ASA Job Module in IoT Edge Device to process data before sending them to Event hub.
I linked this job Module to OPC Publisher module already in place.
my initial route:
opcpublisher > Event Hub works fine :
FROM /messages/modules/OPCPublisher/* INTO $upstream

but this new route does not work:
IoTEdge opcpublisher > IoTEdge ASA Job > Event Hub
Here below route set from OPCPublisher to MyASAModule:
FROM /messages/modules/OPCPublisher/* INTO BrokeredEndPoint("/modules/MyASAModule/inputs/MyASAJobInput")

Then to send data to Event Hub:
FROM /modules/MyASAModule/MyASAJobOutput INTO $upstream

I checked logs from this new ASA module,i'am well connected to both Event Hub and OPC Publisher but it seems data are not coming up to IoT Hub. I tried to change routes priority between initial route and new one without success... After some time i get this error below in asa module logs

 "Send Events: EventHub Output Send Data failure", "{\"Message Time\":\"2022-02-10 19:41:39Z\",\"ErrorCategory\":\"ExternalError\",\"ErrorCode\":\"EventHubFailedToWriteEvents\",\"Message\":\"An error occurred while sending data to Event Hub.  


 System.Net.Sockets.SocketException (110): Operation timed out .\",\"Type\":\"EventHubOutputAdapterEventHubTransientError\",\"Correlation ID\":\"9f032ce3-3afa-4616-9e52-7ccd459e3507\",\"Error\":null}"

My IoT Edge is on premise, i wonder if it's a network issue and AMQP protocol (port 5671 ....)

I would appreciate any suggestion ..

Regards,

/////////////////////////////////////////
Hello Florian,
Yes i use the same tutorial. And after deployment yes there were inputs in ASA Module logs but then it became empty like below.
2022-02-10 17:19:24.654 +00:00 [INF] - =============================Metrics report============================= ConversionErrors : 0
OutputEvents : 0
OutputWatermarkDelaySeconds : 10.12 K
DroppedOrAdjustedEvents : 0
LateInputEvents : 0
InputEvents : 0
Errors : 0
InputEventBytes : 0 B
EarlyInputEvents : 0
DeserializationError : 0
InputEventsSources : 0

And in Edge logs i see messages about periodic re-authentication my IoT Edge is on premise so i set connection string as authentication mode between ASA Job and IoT Hub But i do not really know how it's managed

Disposing MessagingServiceClient for device Id MyIoTEdgeASAJob  because of exception - Microsoft.Azure.Devices.Edge.Hub.Core.EdgeHubConnectionException: Connection closed for device MyIoTEdgeASAJob.

<6> 2022-02-10 22:24:12.699 +00:00 [INF] - Closing device proxy for device Id MyIoTEdgeASAJob
<6> 2022-02-10 22:24:12.701 +00:00 [INF] - Closing receiver in cloud proxy xxxxxxxxxxxxxxxxxxxxxx for MyIoTEdgeASAJob
<6> 2022-02-10 22:24:12.701 +00:00 [INF] - Closed cloud proxy xxxxxxxxxxxxxxxxxxxxxx for MyIoTEdgeASAJob

Yaume
  • 11
  • 2
  • Hi there, this tutorial shows how the routes should look like (#9) : https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-stream-analytics?view=iotedge-2020-11#deploy-the-job Here I'm wondering about the output route to cloud. Can you confirm you see data being processed locally in the logs (same tutorial as above, View Data)? – Florian Eiden Feb 10 '22 at 22:14
  • Hello Florian, Yes i use the same tutorial. And after deployment yes there were inputs in Outputs events but then it came to 0 – Yaume Feb 10 '22 at 23:13
  • 1
    Any possibility you can test your code on a network without a proxy? See also: [Configure an IoT Edge device to communicate through a proxy server](https://learn.microsoft.com/en-us/azure/iot-edge/how-to-configure-proxy-support?view=iotedge-2020-11) – asergaz Feb 14 '22 at 16:41
  • Hello , I do not use any proxy to connect. – Yaume Feb 21 '22 at 17:16
  • Thanks for confirming. If you are following the tutorial exactly step by step can you open a new issue on the bottom of the doc "This Page". Content team can run the entire tutorial and see if can reproduce the issue so we enhance the doc afterwards. If you changed some steps, can you first try following the tutorial with no changes? Did it work? – asergaz Feb 28 '22 at 17:16
  • Hello, Yes i changed some steps from this tutorial as my goal is to have my AsaJob as leaf of OPC Publisher. I do not use TemperatureSensor module. – Yaume Mar 11 '22 at 11:55
  • This issue looks like specific to your configuration and network. Support Team should have access to server side to inspect logs and help troubleshoot. File a new issue in Azure: https://aka.ms/iothelp – asergaz Mar 23 '22 at 12:27

0 Answers0