Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to get Telemetry for device using default event hub #551

Closed
wiggydave10 opened this issue Sep 16, 2022 · 16 comments
Closed

[BUG] Unable to get Telemetry for device using default event hub #551

wiggydave10 opened this issue Sep 16, 2022 · 16 comments

Comments

@wiggydave10
Copy link

I'm new into looking at the Azure IoT and was attempting to follow the guide here. I have created my IoT Hub and downloaded the latest version of IoT Explorer, however I was having trouble viewing the telemetry in IoT Explorer. I kept getting an issue indicating it can't connect to the event hub which I'm just using the default built it. I've downgraded to each version until I got to v0.14.12 before it started working for me.

Steps to reproduce:

  1. Create a free tier of IoT Hub in Azure Portal
  2. Download any version of IoT Explorer from v0.14.13 - v0.15.0
  3. Connect IoT Explorer using the connection string for iothubowner
  4. Add a device with Test001 as the deviceId
  5. Go to Telemetry
  6. Click Start
    See: Error
    Expect: Connect and see telemetry like in v0.14.12

It is possible I am doing something wrong but I just followed the guide and it didn't work.

Failed to start monitoring device telemetry: Error: "The messaging entity 'sb://....servicebus.windows.net/.../$management' could not be found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:3ef1fdc8-301b-4b12-bb34-4d269c692581_G6, SystemTracker:....servicebus.windows.net:.../$management, Timestamp:2022-09-16T14:10:51"

@wiggydave10 wiggydave10 changed the title [BUG] [BUG] Unable to get Telemetry for device using default event hub Sep 16, 2022
@wiggydave10
Copy link
Author

wiggydave10 commented Sep 16, 2022

I have just done some digging in issues and realise that #541 is exactly what happened to me, but in v0.14.14 instead of saying [object,object] it gives the rest of the error above.

@YingXue
Copy link
Member

YingXue commented Sep 20, 2022

Hi Wiggy, yes starting in v0.14.14, we fixed the error message, and I am at least happy to see that you are able to get the error message for us to triage, thank you!
As the error message is indicating with a trackingId, it is directly surfaced from the IoT Hub Service (or possibly Event Hub Service). I would recommend file a bug to the service team. Azure Portal is one of the ways to contact the support.
When you file the bug, please share the trackingId, the error message, and also share that you are not able to connect using the built in event hub. But if you have verified that you can get the telemetry when
implictly providing the event hub name and event hub connection string (which is also the workaround we provided in #541), please mention that when you filed the bug.

@wiggydave10
Copy link
Author

@YingXue thanks for the reply.
Do you need to have a support package for Azure? I can seem to report the bug unless I have a support package.

@YingXue
Copy link
Member

YingXue commented Sep 20, 2022

@wiggydave10 I am not quite sure what support package indicates.
I was trying to create a support ticket and the following screenshot can be a sample, where in additional details you can fill in the repro steps and the tracking id
image

@wiggydave10
Copy link
Author

@YingXue so I filled that through and get some "Recommended solutions" which don't assist in anything, however if I continue to the next step I only get "Get expert help from $29/month" or "Ask our community". I've tried asking the community since and will see if thats the way to report it but I'm not fully sure where to report bugs for Azure things 😂 Thanks for your guidance so far.
image

@YingXue
Copy link
Member

YingXue commented Sep 21, 2022

Hi @wiggydave10
I have been contacted by a service team member, I am glad that you found the way to contact the service team.
I will close the issue since this is an exclusive issue to your hub as I have been told. And I have also learned that Microsoft Q&A forum would be the place if you have further questions.
I will be happy to reopen the issue if there is anything else we can help : )

@YingXue YingXue closed this as completed Sep 21, 2022
@wiggydave10
Copy link
Author

Thanks for the help @YingXue. Yes it seems like its the Azure IoT Hub thats the problem as the latest version worked with their hub. Hopefully we can get to the bottom of it

@robertyung001
Copy link

robertyung001 commented Oct 6, 2022

@wiggydave10 So did MS support resolve your issue?

Now I'm questioning if IoT Explorer is using the correct Event Hub path.
The error message says it can't find:
sb://iothub-ns-[part of my hub name]-[some numbers].servicebus.windows.net/[full iot hub name]/$management

But when I look at my iot hub > Built-in endpoints > event hub-compatible name, the name is there is not the full name but truncated after 25 characters.
So should the Event hub path be:
sb://iothub-ns-[part of my hub name]-[some numbers].servicebus.windows.net/[event hub-compatible name]/$management
?

If I go to the first url with my browser, I get a generic response that mentions "Publicly Listed Services" and "Service Bus 1.1". Changing any portion of the url path gets the same response.

But if I go to the second url, which substitutes the full iot hub name with the event hub compatible one, the response is an error on "MissingToken", meaning the path hit something and it wants to authenticate.

So perhaps there is a bug with IoT Explorer where it assumes the event hub path uses the full name of the iot hub when instead it should get the event hub compatible name from the hub first.

@YingXue
Copy link
Member

YingXue commented Oct 6, 2022

Hi @robertyung001
With users login through Explorer using connection string, the tool does not have permission to get event hub connection string. Connection string only gets data plane access, while this information is stored in control plane in iot hub.
Instead, what we use is EventHub's node sdk, which give us a method to connect to them using iot hub connection string in which case the tool itself does not do any conversion. And if it fails, we fall back to use another SDK method which does the conversion (and looking into the details, it is also event hub's endpoint that it is calling into). In both cases, we are going to transfer the ticket to event hub's sdk team.

FYI, we've got another icm that got reported has the opposite issue as what you see, “For some reason, IoT Explorer is looking for "iotCPCscus-DT-Data-HERM-Dev" instead of "iotcpcscus-dt-data-herm-d" which is the built-in endpoint of the IoT Hub they are trying to connect IoT Explorer to.”

@robertyung001
Copy link

robertyung001 commented Oct 11, 2022 via email

@wiggydave10
Copy link
Author

Hi,
I've had replies back from the support team saying they are fixing the underlying issue and will provide further information. I will await further updates and see if it fixes the issue.

@YingXue
Copy link
Member

YingXue commented Oct 11, 2022

@robertyung001 No worries and it's good that we have the opposite data point, which confirms that the issue is the Event hub sdk itself, and now the ticket has been transferred and being taken care of by our dependency team. We will up the thread once we hear anything back.

@YingXue YingXue reopened this Oct 11, 2022
@TechWatching
Copy link

I have the same error, yet I thought it was not related to the SDK and now that I read the comments, I don't know what to think. Indeed, if I download a previous version (0.14.5.0 for instance) of the Azure IoT explorer it works fine. Is it because the IoT Hub explorer now uses a newer version of the Event Hub SDK?

Another thing I was wondering was: is it fine that the event hub path contains "$management" at the end? Shouldn't this be $Default as there is not consumer group $management in the built-in event-hub.

@wiggydave10
Copy link
Author

I've been told that an update to the IoTHub sample has been released, however I think the problem has been misunderstood.
I for one didn't use JS and two didn't even write any code regarding connecting to the IoTHub.

Is this something that needs to be changed in IoT Explorer?

Heres the links:
PR: Azure/azure-sdk-for-js#23527
Commit: Azure/azure-sdk-for-js@46f60fb

Since the update I've been told to try again, however I'm not fully sure how a sample being updated would fix my problem especially when all I do is open IoT Explorer and it doesn't load. I am yet to retry this as I haven't had time, but thought I'd give feedback here too.

@YingXue
Copy link
Member

YingXue commented Nov 4, 2022

Hi, we use their sample in this app to convert iot hub connection strings (that users use to login to) to event hub connection string, and pull telemetry from event hub.
I've tried their latest sample, but the same error repros. Our team is following up with them, but it does not look this issue has been addressed. I will follow up again.

@YingXue YingXue mentioned this issue Nov 8, 2022
4 tasks
@YingXue
Copy link
Member

YingXue commented Nov 8, 2022

https://github.com/Azure/azure-iot-explorer/releases/tag/v0.15.1 has addressed the issue. Event hub's sdk fixes has been incorporated.

@YingXue YingXue closed this as completed Nov 8, 2022
@YingXue YingXue removed question Further information is requested In progress labels Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants