Alerts does not appear on the site #257

Closed
vntampasi opened this Issue Jan 8, 2017 · 16 comments

Comments

Projects
None yet
3 participants
@vntampasi

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!

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 9, 2017

Contributor

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.

Contributor

olivierbloch commented Jan 9, 2017

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.

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 9, 2017

Unfortunately my local machine running windows 7 and websockets introduced on IIS 8 so i can't test it. Is there any other option ?

Unfortunately my local machine running windows 7 and websockets introduced on IIS 8 so i can't test it. Is there any other option ?

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 9, 2017

Contributor

Well, without debug mode, it's harder.
Can you try restarting the Website in the portal?

Contributor

olivierbloch commented Jan 9, 2017

Well, without debug mode, it's harder.
Can you try restarting the Website in the portal?

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 9, 2017

I made the restart and once again i can not see anything, the alerts does not appear

I made the restart and once again i can not see anything, the alerts does not appear

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 9, 2017

Contributor

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?

Contributor

olivierbloch commented Jan 9, 2017

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?

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 9, 2017

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 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

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 12, 2017

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?

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?

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 12, 2017

Contributor

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

Contributor

olivierbloch commented Jan 12, 2017

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

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 13, 2017

I made the changes you mentioned above and did a test again but it does not work. Anything else that i can do?

I made the changes you mentioned above and did a test again but it does not work. Anything else that i can do?

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 13, 2017

Contributor

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.

Contributor

olivierbloch commented Jan 13, 2017

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.

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 13, 2017

Contributor

But without being able to debug the site locally it's really hard to determine what is going wrong

Contributor

olivierbloch commented Jan 13, 2017

But without being able to debug the site locally it's really hard to determine what is going wrong

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 15, 2017

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

vntampasi commented Jan 15, 2017

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

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jan 15, 2017

Contributor

Ok, I need to make it a bit more robust, but are you unblocked? Can we close this issue?

Contributor

olivierbloch commented Jan 15, 2017

Ok, I need to make it a bit more robust, but are you unblocked? Can we close this issue?

@vntampasi

This comment has been minimized.

Show comment
Hide comment
@vntampasi

vntampasi Jan 19, 2017

Yes we can close it! Thank you much for your help

Yes we can close it! Thank you much for your help

@toolboc

This comment has been minimized.

Show comment
Hide comment
@toolboc

toolboc Jun 14, 2017

Contributor

I am also noticing the same behavior described by @vntampasi when deploying from the ARM template:

image

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.

Contributor

toolboc commented Jun 14, 2017

I am also noticing the same behavior described by @vntampasi when deploying from the ARM template:

image

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.

@toolboc toolboc referenced this issue Jun 14, 2017

Merged

Address #257 #268

olivierbloch added a commit that referenced this issue Jun 14, 2017

olivierbloch added a commit that referenced this issue Jun 14, 2017

@olivierbloch

This comment has been minimized.

Show comment
Hide comment
@olivierbloch

olivierbloch Jun 14, 2017

Contributor

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

Contributor

olivierbloch commented Jun 14, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment