Closed vntampasi closed 7 years ago
Interesting. I have seen this behavior but I don't remember exactly what the issue was. Can you try running the site locally in debug and put break points to verify that the website backend successfully establishes the connection to the ehalert event hub and check the data read from the EH? Note that you will need to edit the web.config file with the connection strings for EH, IoT Hub and other.
Unfortunately my local machine running windows 7 and websockets introduced on IIS 8 so i can't test it. Is there any other option ?
Well, without debug mode, it's harder. Can you try restarting the Website in the portal?
I made the restart and once again i can not see anything, the alerts does not appear
How did you validate that the alerts are indeed pushed to ehalerts? If you can see data in there, can you share, to see the format?
I connect with eventhub by a console application and i receive the messages as you can see in this link https://drive.google.com/open?id=0B9af0-7oqATQakZwblktbldSdnM
I share in the previous post in what way i receive the data. Can you please give me a piece of help on how can i see the alerts?
the format definitively seems ok. Let's try the following: Create a new consumer group for the alerts event hub in the event hub blade in the Azure portal Go to the website blade in the portal, and open "Application Settings", and change the Azure.ServiceBus.EventHub.ConsumerGroup setting to the new consumer group name Restart the website from the portal
I made the changes you mentioned above and did a test again but it does not work. Anything else that i can do?
I will try to reproduce on my side if I can today or on Monday. One more thing: can you try redeploying a new instance of the whole project from scratch. Try not connecting any tool to the EH before testing the actual website displays the alerts.
But without being able to debug the site locally it's really hard to determine what is going wrong
After debugging the application locally i notice that if you give a "wrong" guid, the site try to send the message back to the device and fail and as a result the synchronization with the event hub close. Thank you
Ok, I need to make it a bit more robust, but are you unblocked? Can we close this issue?
Yes we can close it! Thank you much for your help
I am also noticing the same behavior described by @vntampasi when deploying from the ARM template:
Able to workaround by adding try / catch around:
IoTHubHelper.SendMessage(messagePayload["guid"].ToString(), alertMessage);
in WebSocketEventProcessor.cs
Attempting to message a device that has not implemented a mechanism for message receipt from the IoT Hub appears to be the reason for failure.
Thanks @toolboc and good catch! I just merged the fix and republished binaires for the website so that ARM deployment uses latest bits. If you don't mind testing the deployment on your side, that'd be helpful thanks
By using the default deploy button with the default settings the alerts are created inside the ehalerts but they does not appear in the website. Can you please give me a piece of help on that? Thanks!