question

KeithMitchellkamitch-4838 avatar image
0 Votes"
KeithMitchellkamitch-4838 asked TravisCragg-MSFT answered

Failed to create service principal while trying to register azure stack hub with azure


I have a newly installed Azure stack hub (full-one, not ASDK) and the external network is connected to the internet via NAT. It is version 2102 and I downloaded the 2102 tools from GitHub to do the registration.

But trying to run the registration, I get the following:

2021-06-09.22-27-51: Initializing session with privileged endpoint: 192.168.144.224. Attempt 0 of 3
2021-06-09.22-28-03: Connection to 192.168.144.224 successful
2021-06-09.22-28-03: Verifying stamp version.
2021-06-09.22-28-12: Running registration actions on build 1.2102.0.10. Cloud Id: 5938857f-3da7-4c7d-8bd1-9b426881e1e7, Deployment Id: b25765a9-32f1-47f5-b7cd-b938e96a2bf0
2021-06-09.22-28-13: Creating Azure Active Directory service principal in tenant 'c4426c0b-036f-4bfb-b2d3-5c910c5389d6' Attempt 0 of 3
2021-06-09.22-30-11: WARNING
2021-06-09.22-30-11: Creation of service principal failed:
Action plan execution failed. Error: Execution timeout
2021-06-09.22-30-11: End WARNING
2021-06-09.22-30-11: Waiting 10 seconds and trying again...
2021-06-09.22-30-21: Creating Azure Active Directory service principal in tenant 'c4426c0b-036f-4bfb-b2d3-5c910c5389d6' Attempt 1 of 3
2021-06-09.22-32-37: WARNING
2021-06-09.22-32-37: Creation of service principal failed:
Action plan execution failed. Error: Execution timeout
2021-06-09.22-32-37: End WARNING
2021-06-09.22-32-37: Waiting 10 seconds and trying again...
2021-06-09.22-32-47: Creating Azure Active Directory service principal in tenant 'c4426c0b-036f-4bfb-b2d3-5c910c5389d6' Attempt 2 of 3
2021-06-09.22-34-43: WARNING
2021-06-09.22-34-43: Creation of service principal failed:
Action plan execution failed. Error: Execution timeout
2021-06-09.22-34-43: End WARNING
2021-06-09.22-34-43: Waiting 10 seconds and trying again...
2021-06-09.22-34-53: Error
2021-06-09.22-34-53: Action plan execution failed. Error: Execution timeout
2021-06-09.22-34-53: at Start-ActionPlanInstance, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Azurestack.Activation\Microsoft.Azurestack.Activation.psm1: line 639
at New-AzureBridgeServicePrincipal, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Azurestack.Activation\Microsoft.Azurestack.Activation.psm1: line 179
2021-06-09.22-34-53: Ending registration action during New-ServicePrincipal



Searching showed a similar error around two years ago which was resolved using a longer timeout. I checked my scripts and I had the recommended change and it does not take 30 mins for each retry to fail (more like 2 minutes) so it doesn't seem like it is really hitting that timeout. I don't think there is any firewall in the way and there is no log indicating a connection failure so I'm not sure what could be happening.

azure-stack-hub
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

TravisCragg-MSFT avatar image
0 Votes"
TravisCragg-MSFT answered

To start, make sure you are using the AZ modules, not the AzureRM Modules. You can select the module based upon the tab at the top.

next, if it still is unable to register, try using the register in the disconnected environments instructions. Sometimes connectivity issues with the machine can cause this issue. You register with a separate computer and bring the registration to your ASDK machine.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.