Home

Facing Issues in building the IoT Sample

%3CLINGO-SUB%20id%3D%22lingo-sub-1114640%22%20slang%3D%22en-US%22%3EFacing%20Issues%20in%20building%20the%20IoT%20Sample%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1114640%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20friends%2C%20I%20am%20just%20starting%20out%20with%20Azure%20Sphere%20IoT.%20I%20am%20trying%20to%20build%20one%20of%20the%20sample%20code%20given%20on%20GitHub%20for%20IoT%20but%20I%20am%20facing%20this%20error%20every%20time%20when%20I%20am%20trying%20to%20run%20it%20with%20my%20IoT%20Hub.%20Where%20could%20I%20be%20going%20wrong%20because%20I%20have%20followed%20all%20the%26nbsp%3B%20instructions%20mentioned%20in%20the%20sample%20Readme.md%20file%20and%20IoTHub.md%20file.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%20Error%20in%20monitor%20built-in%20event%20endpoint%20message%3A%20An%20error%20occurred%20during%20communication%20with%20'DeviceGateway_942fe792a5c6427c8779bb6bc3209405%3Aihsuprodpnres011dednamespace.servicebus.windows.net%3A5671'.%20Check%20the%20connection%20information%2C%20then%20retry.%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1115720%22%20slang%3D%22en-US%22%3ERe%3A%20Facing%20Issues%20in%20building%20the%20IoT%20Sample%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1115720%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F522378%22%20target%3D%22_blank%22%3E%40kenny1597%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20looks%20like%20it's%20the%20connection%20between%20the%20Cloud%20Explorer%20in%20Visual%20Studio%20and%20the%20IoT%20Hub%20that%20is%20having%20some%20issues.%20It's%20trying%20to%20connect%20to%20the%20IoT%20Hub%20Default%20Endpoint%20to%20monitor%20messages%20that%20arriving%20in%20IoT%20Hub.%20This%20can%20be%20caused%20by%20several%20things%2C%20and%20the%20most%20common%20ones%20are%20if%20you%20are%20behind%20a%20firewall%20that%20blocks%20port%205671%20which%20is%20the%20port%20used%20by%20AMQP%20protocol.%3CBR%20%2F%3EThe%20other%20potential%20issue%20is%20with%20consumer%20groups%20on%20this%20IoT%20Hub%20default%20Endpoint.%20Do%20you%20have%20another%20app%20like%20IoT%20Hub%20explorer%20or%20your%20own%20custom%20made%20app%20that%20is%20monitoring%20messages%20on%20the%20same%20port%3F%20In%20which%20case%20what%20can%20happen%20is%20that%20the%20%22Default%22%20consumer%20group%20for%20that%20endpoint%20has%20reached%20its%20max%20%23%20of%20readers.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1142194%22%20slang%3D%22en-US%22%3ERe%3A%20Facing%20Issues%20in%20building%20the%20IoT%20Sample%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1142194%22%20slang%3D%22en-US%22%3EHI%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F74424%22%20target%3D%22_blank%22%3E%40Olivier%20Bloch%20(IOT)%3C%2FA%3E%26nbsp%3B%2C%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20for%20the%20answer.%20I%20think%20it%20was%20because%20of%20the%20firewall.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ERegarding%20the%20consumer%20group%2C%20is%20there%20a%20way%20to%20solve%20that%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1143804%22%20slang%3D%22en-US%22%3ERe%3A%20Facing%20Issues%20in%20building%20the%20IoT%20Sample%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1143804%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F522378%22%20target%3D%22_blank%22%3E%40kenny1597%3C%2FA%3E%26nbsp%3Bunfortunately%20in%20the%20Visual%20Studio%20extension%20you%20cannot%20setup%20the%20Consumer%20group.%20However%20if%20you%20are%20using%20Visual%20Studio%20Code%2C%20you%20can%20create%20a%20new%20Consumer%20Group%20(in%20the%20IoT%20Hub%20blade%20in%20the%20Azure%20Portal)%20and%20then%20configure%20the%20Visual%20Studio%20code%20extension%20to%20use%20that%20new%20Consumer%20Group%20for%20monitoring%20events.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1171078%22%20slang%3D%22en-US%22%3ERe%3A%20Facing%20Issues%20in%20building%20the%20IoT%20Sample%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1171078%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F522378%22%20target%3D%22_blank%22%3E%40kenny1597%3C%2FA%3E%26nbsp%3BI%20have%20already%20implemented%20the%20sample%20and%20added%20the%20code%20in%20the%20git%20hub.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Frahulshukla422%2FIoT-Device-To-Cloud%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Frahulshukla422%2FIoT-Device-To-Cloud%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
kenny1597
New Contributor

Hello friends, I am just starting out with Azure Sphere IoT. I am trying to build one of the sample code given on GitHub for IoT but I am facing this error every time when I am trying to run it with my IoT Hub. Where could I be going wrong because I have followed all the  instructions mentioned in the sample Readme.md file and IoTHub.md file. 

 

 Error in monitor built-in event endpoint message: An error occurred during communication with 'DeviceGateway_942fe792a5c6427c8779bb6bc3209405:ihsuprodpnres011dednamespace.servicebus.windows.net:5671'. Check the connection information, then retry.

 

Thanks.

4 Replies
Highlighted

Hi @kenny1597 

It looks like it's the connection between the Cloud Explorer in Visual Studio and the IoT Hub that is having some issues. It's trying to connect to the IoT Hub Default Endpoint to monitor messages that arriving in IoT Hub. This can be caused by several things, and the most common ones are if you are behind a firewall that blocks port 5671 which is the port used by AMQP protocol.
The other potential issue is with consumer groups on this IoT Hub default Endpoint. Do you have another app like IoT Hub explorer or your own custom made app that is monitoring messages on the same port? In which case what can happen is that the "Default" consumer group for that endpoint has reached its max # of readers.

Highlighted
HI @Olivier Bloch (IOT) ,

Thanks for the answer. I think it was because of the firewall. 

Regarding the consumer group, is there a way to solve that?
Highlighted

@kenny1597 unfortunately in the Visual Studio extension you cannot setup the Consumer group. However if you are using Visual Studio Code, you can create a new Consumer Group (in the IoT Hub blade in the Azure Portal) and then configure the Visual Studio code extension to use that new Consumer Group for monitoring events.

Highlighted

@kenny1597 I have already implemented the sample and added the code in the git hub.

https://github.com/rahulshukla422/IoT-Device-To-Cloud 

Related Conversations
.NET Core Apps on the Raspberry Pi
David Jones in Azure IoT on
0 Replies
Streaming from IoT Hub to a database
Jim Bennett in Azure IoT on
0 Replies
The Azure Digital Twins team needs your input!
Olivier Bloch (IOT) in Azure IoT on
0 Replies