Closed melzoghbi closed 3 years ago
@melzoghbi , this issue is similar to issue 421 reported before. we have a PR 428 to address this issue. Basically we suspect the command to get a globally unique DNS name failed since
[Net.Dns]::GetHostEntry("localrmXXXXX.blob.core.windows.net")
always returns an entry no matter how many times to retry different random number XXXXX. If this happened, it won't work to use current script on master branch. You can try this PR on branch fix_issue_421 and let us know your feedback.
I pulled this branch but i am facing the a different issue on next line no. 294 instead of 293.
Looking forward to your insights.
Any update on this issue?
@melzoghbi , can you try to run the command in Powershell and let me know the output:
$name = "{0}{1:x5}" -f "LocalRM", (get-random -max 1048575)
$hubname = $name + ".azure-devices.net"
Write-Host $hubname
[Net.Dns]::GetHostEntry($hubname)
Looks like the random number is not correctly appended to the resource name. Need this snippet to know if it will generate random name.
Sure, here is the output of this command:
@melzoghbi , thanks for your feedback. It seems that the DNS resolution is not quite right because that address doesn't exists in my test from here. I suspect your local DNS resolution always return you an incorrect response which should be handled by this PR. would you please help to run this commands so that I can fix it for you?
[Net.Dns]::GetHostEntry("ramdomsites97f51.nonexistentdomainname.com")
Invoke-WebRequest -Uri "https://LocalRM4a9a6.azure-devices.net/devices"
Invoke-WebRequest -Uri "https://LocalRM.azure-devices.net/devices"
Thanks @zhang-hua for taking care of this and helping me to fix it. Here is an error i am getting when trying to execute above commands in PS:
@melzoghbi , thanks for your feedback. I have pushed another new branch fix_issue_430 for you. please apply this code and see if it works.
Basically I found the DNS problem has little difference from what I can see here. The localRM4a9a6.azure-devices.net
is an unknown host for me but known at your side. That's why my patch doesn't work. I add some code to distinguish the errors so that we can get a correct name for resource. Hope this can work for you this time.
@melzoghbi , how is it going for this issue and patch?
@zhang-hua I tried to get latest from the master branch today and while trying to run the solution locally, i am getting the following error:
Any thoughts on how to resolve this issue since it has been awhile and i see other issues reported the same problem such as: #432.
Thanks.
Note: As of December 10th 2020, Remote Monitoring solution accelerator is no longer supported. All supporting repositories have been archived.
While i am trying to run the solution locally by execuing build.cmd local i am getting the following error:
Unable to create unique name for resource localrm forurl blob.core.windows.net
Below is a screen shot of the error message:![image](https://user-images.githubusercontent.com/11993393/26942710-137439c2-4c51-11e7-9dea-d4aa2f3e74e7.png)
How would i fix this issue?
Thanks.