Azure-Samples / iotedge-logging-and-monitoring-solution

IoT Edge Logging and Monitoring Solution (ELMS) is an architecture and sample cloud workflow that enables automated retrieval of logs and metrics from IoT Edge devices
MIT License
42 stars 21 forks source link

Error during deployment of ELMS solution #25

Closed Takou-DevAp closed 2 years ago

Takou-DevAp commented 2 years ago

Hi everyone,

I tried to deploy the ELMS solution as described in the readme document: link: https://github.com/Azure-Samples/iotedge-logging-and-monitoring-solution steps to reproduce: 0- I opened power shell with elevated rights 1- I logged in with: az login command 2- I ran the deployment script 3- I choose a custom deployment 4- I choose an existing azure subscription, i choose existing resource group, existing IOT hub, existing storage, an existing log analytics work space, etc.. 5-etc..

but when the deployment starts, it throws this following error, i shortened the output since its the same thing all over:

Creating resource group deployment. ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"message\": \"{\r\n \\"error\\": {\r\n \\"code\\": \\"RoleAssignmentUpdateNotPermitted\\",\r\n \\"message\\": \\"Tenant ID, application ID, principal ID, and scope are not allowed to be updated.\\"\r\n }\r\n}\"\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n}"}]}} Something went wrong with the resource group deployment. Ending script. Au caractère C:\Users\Administrateur\Documents\iotedge-logging-and-monitoring-solution\Scripts\deploy.ps1:1012 : 9

Has anyone have any solution for this ? Link to the deployment script: https://github.com/Azure-Samples/iotedge-logging-and-monitoring-solution/blob/main/Scripts/deploy.ps1

rashmisingh622 commented 2 years ago

I'm also facing the same issue...

Takou-DevAp commented 2 years ago

And What have you tried so far ? On my side, I tried to check if there was any function that treats these IDs and i found the New-Guid function:

function Get-EnvironmentHash( [int]$hash_length = 8 ) { $env_hash = (New-Guid).Guid.Replace('-', '').Substring(0, $hash_length ).ToLower()

return $env_hash

}

What the function does is: it creates a Guid and takes the first part and then uses it in the process. Now the question was how to retrieve my tenant IDs so that it uses it in the process. As the first command 'az login' connects us to azure and gives the Tenant ID as part of the output, I changed the function so that it gives directly the needed part of my tenant ID but it didn't work.

Now I don't know what to do next... I don't know if there is anything to do on azure portal: changed parameters or set parameters.

Le jeu. 7 avr. 2022 à 14:29, rashmisingh622 @.***> a écrit :

I'm also facing the same issue...

— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/iotedge-logging-and-monitoring-solution/issues/25#issuecomment-1091740085, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVSBISEICWB6J53IYYKL6ZDVD3PNJANCNFSM5SY7263A . You are receiving this because you authored the thread.Message ID: <Azure-Samples/iotedge-logging-and-monitoring-solution/issues/25/1091740085 @github.com>

rashmisingh622 commented 2 years ago

I believe this error happens if try to change the role assignments... I was wondering if using the deployment script the second on the same RG was leading to this, so I cleaned up the resource group.. deleted everything that was getting deployed by this script and tried again.. I'm not getting this error anymore, but getting another one : ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"ResourceDeploymentFailure\",\r\n \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n \"details\": [\r\n {\r\n \"code\": \"DeploymentFailed\",\r\n \"message\": \"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.\",\r\n \"details\": [\r\n {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"{\r\n \\"error\\": {\r\n \\"code\\": \\"NoRegisteredProviderFound\\",\r\n \\"message\\": \\"No registered resource provider found for location 'centralindia' and API version '2022-01-01-preview' for type 'namespaces/authorizationrules'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01'. The supported locations are ''.\\"\r\n }\r\n}\"\r\n

This seems to be an issue with the template for the event hub deployment.. so I'm trying to fix that.

Takou-DevAp commented 2 years ago

Ok, I'll check what you first did and see, Anyways, I also found another issue while trying other times, as you can see in the picture below. I think that your second message error gives a hint. Please, let me know what you get as result.

Le jeu. 7 avr. 2022 à 15:18, rashmisingh622 @.***> a écrit :

I believe this error happens if try to change the role assignments... I was wondering if using the deployment script the second on the same RG was leading to this, so I cleaned up the resource group.. deleted everything that was getting deployed by this script and tried again.. I'm not getting this error anymore, but getting another one : ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.","details":[{"code":"Conflict","message":"{\r\n "status": "Failed",\r\n "error": {\r\n "code": "ResourceDeploymentFailure",\r\n "message": "The resource operation completed with terminal provisioning state 'Failed'.",\r\n "details": [\r\n {\r\n "code": "DeploymentFailed",\r\n "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",\r\n "details": [\r\n {\r\n "code": "BadRequest",\r\n "message": "{\r\n \"error\": {\r\n \"code\": \"NoRegisteredProviderFound\",\r\n \"message\": \"No registered resource provider found for location 'centralindia' and API version '2022-01-01-preview' for type 'namespaces/authorizationrules'. The supported api-versions are '2014-09-01, 2015-08-01, 2017-04-01, 2018-01-01-preview, 2021-01-01-preview, 2021-06-01-preview, 2021-11-01'. The supported locations are ''.\"\r\n }\r\n}"\r\n

This seems to be an issue with the template for the event hub deployment.. so I'm trying to fix that.

— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/iotedge-logging-and-monitoring-solution/issues/25#issuecomment-1091801466, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVSBISCKBTCWNK3NOKBTBSLVD3VEVANCNFSM5SY7263A . You are receiving this because you authored the thread.Message ID: <Azure-Samples/iotedge-logging-and-monitoring-solution/issues/25/1091801466 @github.com>

eedorenko commented 2 years ago

@rashmisingh622 try to update this line https://github.com/Azure-Samples/iotedge-logging-and-monitoring-solution/blob/5e688eddb982967ec03e352291e39ffbb5408f80/Templates/eventhubs-deploy.json#L103 like this

 "namespaceAuthRulesApiVersion": "2021-11-01"
eedorenko commented 2 years ago

Looks like they broke API version. Fixed in this PR #26 .

marvin-garcia commented 2 years ago

@Takou-DevAp and @rashmisingh622 , can you pull the latest changes from main an re-run the wizard? there were some fixes pushed this week.

Takou-DevAp commented 2 years ago

Alright Thank you very much for your help!

Takou-DevAp commented 2 years ago

Hello everyone once again, I faced this issue and tried to understand why it happens but couldn't do anything about it can you help me out ? @marvin-garcia, @eedorenko ?

new Elms deployment error

Takou-DevAp commented 2 years ago

Hello everyone once again, I faced this issue and tried to understand why it happens but couldn't do anything about it can you help me out ? @marvin-garcia, @eedorenko ?

new Elms deployment error

Hi everyone, I used explanations in this link to solve the issue: https://stackoverflow.com/questions/66862503/usebasicparsing-parameter

Takou-DevAp commented 1 year ago

Hi Marvin,

I'm facing this issue now even if the deployment succeeded , I'm not sure why. Do you have any hints ?

Le jeu. 7 avr. 2022 à 21:30, Marvin Garcia @.***> a écrit :

@Takou-DevAp https://github.com/Takou-DevAp and @rashmisingh622 https://github.com/rashmisingh622 , can you pull the latest changes from main an re-run the wizard? there were some fixes pushed this week.

— Reply to this email directly, view it on GitHub https://github.com/Azure-Samples/iotedge-logging-and-monitoring-solution/issues/25#issuecomment-1092172424, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVSBISE7RC3V2ZTAWUAYRDTVD5AUTANCNFSM5SY7263A . You are receiving this because you were mentioned.Message ID: <Azure-Samples/iotedge-logging-and-monitoring-solution/issues/25/1092172424 @github.com>