Answered by:
Azure Stack ASDK Registration Failure

Question
-
I'm failing while trying to register with Azure, based on the output, I think it's in the bridging functionality
WARNING: Task: Interface 'ActivateAzureBridge' is not a supported standard Interface. - 8/12/2017 10:28:00 PM
Last lines in the output:
WARNING: Task: Invocation of interface 'ActivateAzureBridge' of role 'Cloud\Fabric\AzureBridge' failed:
Type 'ActivateAzureBridge' of Role 'AzureBridge' raised an exception:
ERROR Azure Bridge ActivateBridgeFeatures:
Service UnavailableService Unavailable
HTTP Error 503. The service is unavailable.
System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()More info can be found on machine 'AZS-WAS01' in the log file 'C:\ProgramData\Microsoft\AzureStack\Logs\ConfigureAzureBridgeActivateFeatu
res_20170812-222811.txt'.
at <ScriptBlock><trap>, <No file>: line 12
at <ScriptBlock>, <No file>: line 40 - 8/12/2017 10:28:24 PM
C:\temp\RegisterWithAzure.ps1 : Activate-Bridge: Error : System.Exception: Task: Invocation of interface 'ActivateAzureBridge' of role
'Cloud\Fabric\AzureBridge' failed:
Type 'ActivateAzureBridge' of Role 'AzureBridge' raised an exception:
ERROR Azure Bridge ActivateBridgeFeatures:
Service Unavailable
Service Unavailable
HTTP Error 503. The service is unavailable.
System.Net.WebException: The remote server returned an error: (503) Server Unavailable.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
More info can be found on machine 'AZS-WAS01' in the log file
'C:\ProgramData\Microsoft\AzureStack\Logs\ConfigureAzureBridgeActivateFeatures_20170812-222811.txt'.
at <ScriptBlock><trap>, <No file>: line 12
at <ScriptBlock>, <No file>: line 40 - 8/12/2017 10:28:24 PM
At line:1 char:1
+ C:\temp\RegisterWithAzure.ps1 -azureSubscriptionId "04917658-3f2b-4cc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,RegisterWithAzure.ps1Sunday, August 13, 2017 6:41 AM
Answers
-
Hello Matt,
Please try running the following script to register you ADFS ASDK instance and let us know how it goes.
### Set-AzSRegistration.ps1 ###############################################
### Check/Uninstall incompatable AzureStack Modules & Install/Import correct version 1.2.10
Get-Module -ListAvailable | where-Object ($_.Name -like "Azure*") | Uninstall-Module
Remove-Item $PSHome\modules\Azure* -Force
dir $PSHome\modules\Azure*
Remove-Item 'C:\Program Files (x86)\WindowsPowerShell\Modules\Azure*' -Force
dir 'C:\Program Files (x86)\WindowsPowerShell\Modules\Azure*'
# Set Repository polcies
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
### Install and Import AzureStack Modules 1.2.10 & Tools
Install-Module -Name AzureRm.BootStrapper
Use-AzureRmProfile -Profile 2017-03-09-profile -Force
Install-Module -Name AzureStack -RequiredVersion 1.2.10
Import-Module -Name AzureStack -RequiredVersion 1.2.10
cd c:\
invoke-webrequest https://github.com/Azure/AzureStack-Tools/archive/master.zip -OutFile master.zip
expand-archive master.zip -DestinationPath . -Force
cd AzureStack-Tools-master
copy .\Registration\R* c:\temp
Import-Module .\Connect\AzureStack.Connect.psm1
Import-Module .\ComputeAdmin\AzureStack.ComputeAdmin.psm1
### Capture Subscription Credentials
$AADUserName = read-host "Enter your Subscription credentials/Azure Service Admin Username"
$ADPwd = read-host "Enter your Azure Service Admin Password"
$AADPassword = $ADPwd | ConvertTo-SecureString -Force -AsPlainText
$AADCredential = New-Object PSCredential($AADUserName,$AADPassword)
$AADTenantID = ($AADUserName -split '@')[1]
$Credential = $AADCredential
### Get Azure SubscriptionID & Register AzureStack RP in Azure Subscription
Login-AzureRmAccount -Credential $Credential
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack -Force
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack
$AzureSub = Get-AzureRmSubscription | Select-Object -Property SubscriptionID | fl | Out-String
$AzureSubID = ($AzureSub -split ' : ')[1]
$SubID = $AzureSubID.Substring(0,36)
### Setup AzureStackAdmin ARM Endpoint
Add-AzureRMEnvironment -Name "AzureStackAdmin" -ArmEndpoint "https://adminmanagement.local.azurestack.external"
Set-AzureRmEnvironment -Name "AzureStackAdmin" -GraphAudience "https://graph.local.azurestack.external/" -EnableAdfsAuthentication:$true
$TenantID = Get-AzsDirectoryTenantId -ADFS -EnvironmentName "AzureStackAdmin"
Login-AzureRmAccount -EnvironmentName "AzureStackAdmin" -TenantId $TenantID
### Register Resource Providers
foreach($s in (Get-AzureRmSubscription)) {
Select-AzureRmSubscription -SubscriptionId $s.SubscriptionId | Out-Null
Write-Progress $($s.SubscriptionId + " : " + $s.SubscriptionName)
Get-AzureRmResourceProvider -ListAvailable | Register-AzureRmResourceProvider -Force
}
### Register Azure Stack with Azure - Market Place Syndication
c:\temp\RegisterWithAzure.ps1 -azureSubscriptionId $SubID -azureDirectoryTenantName $AADTenantID -azureAccountId $AADUserName
Let us know how it goes,
We apologize for any inconvenience and appreciate your time and interest in Azure Stack.
If you continue experience any issues with ASDK release, feel free to contact us.
PowerShell giving you the Blues? Try my Azure Stack PowerShell Helper scripts
ASDK: Install/Import Azure Stack Modules 1.2.10 & AzureStack-Tools
ASDK: Config PowerShell & set AdminStackAdmin/User ARM Endpoints
ASDK: AzureStack Automation: Register ADFS ASDK for Azure Marketplace Syndication
ASDK: AzureStack Automation: Register ASDK for Azure Marketplace Syndication
Thanks,
Gary Gallanes
- Proposed as answer by Gary Gallanes [HCL Technologies] Monday, August 28, 2017 5:18 PM
- Marked as answer by Gary Gallanes [HCL Technologies] Monday, August 28, 2017 5:18 PM
Monday, August 28, 2017 5:18 PM
All replies
-
Hello,
It looks like there's may be an issue with the connection to or service running on AzS-WAS01.
Before retrying RegisterWithAzure.ps1 please make sure you have completed all the steps in
Install PowerShell in a connected scenario and Configure PowerShell for use with Azure Stack.
And have Registered the Azure Stack resource provider in Azure.
To register the Azure Stack RP in Azure run the following PowerShell:
Login-AzureRmAccount -EnvironmentName "AzureCloud"
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack -Force
Can you validate you endpoints are setup correctly by running the following PowerShell:
Get-AzureRmEnvironment-name 'AzureStackAdmin'
Can you successfully login to https://adminportal.local.azurestack.external/
If you are still unable to successfully register try resetting IIS on AzS-WAS01
Enter-PSSession AzS-WAS01
IISRest
If you are still unable to register try restarting the AzS-WAS01 VM from Hyper-V Manager, waiting 5 minutes and then try registering. If it still fails, please post the error and we will continue our investigation.
Let us know how it goes,
We apologize for any inconvenience and appreciate your time and interest in Azure Stack.
If you continue experience any issues with ASDK release, feel free to contact us.
PowerShell giving you the Blues? Try my Azure Stack PowerShell Helper scripts
ASDK: Install/Import Azure Stack Modules 1.2.10 & AzureStack-Tools
ASDK: Config PowerShell & set AdminStackAdmin/User ARM Endpoints
Thanks,
Gary Gallanes
- Proposed as answer by Gary Gallanes [HCL Technologies] Wednesday, August 16, 2017 10:52 PM
Monday, August 14, 2017 10:27 PM -
Hi Gary,
Thank you for the response.
We followed your advise and still run into the same errors.
We did go ahead and try to install your AzureStack PowerShell Helper scripts with the following results:
.\Install-AzSPSModules.ps1
-- runs successful
ComplexityEnabled : True
DistinguishedName : DC=azurestack,DC=local
LockoutDuration : 00:15:00
LockoutObservationWindow : 00:15:00
LockoutThreshold : 10
MaxPasswordAge : 180.00:00:00
MinPasswordAge : 00:00:00
MinPasswordLength : 7
objectClass : {domainDNS}
objectGuid : b25825ad-e1b1-4118-932f-96ef9de73849
PasswordHistoryCount : 24
ReversibleEncryptionEnabled : False.\Set-AzSARM.ps1
Name : AzureStackAdmin
-- results:
EnableAdfsAuthentication : True
ActiveDirectoryServiceEndpointResourceId : https://adminmanagement.adfs.azurestack.local/{ID}
AdTenant :
GalleryUrl : https://adminportal.local.azurestack.external:30015/
ManagementPortalUrl :
ServiceManagementUrl :
PublishSettingsFileUrl :
ResourceManagerUrl : https://adminmanagement.local.azurestack.external
SqlDatabaseDnsSuffix :
StorageEndpointSuffix : local.azurestack.external
ActiveDirectoryAuthority : https://adfs.local.azurestack.external/adfs/
GraphUrl : https://graph.local.azurestack.external/
GraphEndpointResourceId :
TrafficManagerDnsSuffix :
AzureKeyVaultDnsSuffix : vault.local.azurestack.external
AzureDataLakeStoreFileSystemEndpointSuffix :
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix :
AzureKeyVaultServiceEndpointResourceId : https://vault.local.azurestack.external
Invoke-WebRequest :
Service Unavailable
Service Unavailable
HTTP Error 503. The service is unavailable.
At C:\AzureStack-Tools-master\Connect\AzureStack.Connect.psm1:143 char:27
+ ... $OauthMetadata = (Invoke-WebRequest -UseBasicParsing $endpt).Conten ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommandDo certain ports have to be opened on the firewall aside from 443, 80, etc?
Best Regards,
Matt
Toronto, Canada
MVV
Monday, August 21, 2017 10:32 PM -
After trying all of the above, we still receive the following error:
C:\AzureStack-Tools-Master\Registration\RegisterWithAzure.ps1 : Activate-Bridge: Error : System.Exception: Task: Invocation of interface 'ActivateAzureBridge' of role 'Cloud\Fabric\AzureBridge' failed:
Type 'ActivateAzureBridge' of Role 'AzureBridge' raised an exception:
ERROR Azure Bridge ActivateBridgeFeatures: Unable to connect to the remote server
System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 157.56.31.170:443
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
More info can be found on machine 'AZS-WAS01' in the log file 'C:\ProgramData\Microsoft\AzureStack\Logs\ConfigureAzureBridgeActivateFeatures_20170821-185907.txt'.
at <ScriptBlock><trap>, <No file>: line 12
at <ScriptBlock>, <No file>: line 25 - 8/21/2017 6:59:16 PM
At line:1 char:1
+ C:\AzureStack-Tools-Master\Registration\RegisterWithAzure.ps1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,RegisterWithAzure.ps1MVV
Monday, August 21, 2017 11:00 PM -
Hello Matt,
Please try running the following script to register you ADFS ASDK instance and let us know how it goes.
### Set-AzSRegistration.ps1 ###############################################
### Check/Uninstall incompatable AzureStack Modules & Install/Import correct version 1.2.10
Get-Module -ListAvailable | where-Object ($_.Name -like "Azure*") | Uninstall-Module
Remove-Item $PSHome\modules\Azure* -Force
dir $PSHome\modules\Azure*
Remove-Item 'C:\Program Files (x86)\WindowsPowerShell\Modules\Azure*' -Force
dir 'C:\Program Files (x86)\WindowsPowerShell\Modules\Azure*'
# Set Repository polcies
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
### Install and Import AzureStack Modules 1.2.10 & Tools
Install-Module -Name AzureRm.BootStrapper
Use-AzureRmProfile -Profile 2017-03-09-profile -Force
Install-Module -Name AzureStack -RequiredVersion 1.2.10
Import-Module -Name AzureStack -RequiredVersion 1.2.10
cd c:\
invoke-webrequest https://github.com/Azure/AzureStack-Tools/archive/master.zip -OutFile master.zip
expand-archive master.zip -DestinationPath . -Force
cd AzureStack-Tools-master
copy .\Registration\R* c:\temp
Import-Module .\Connect\AzureStack.Connect.psm1
Import-Module .\ComputeAdmin\AzureStack.ComputeAdmin.psm1
### Capture Subscription Credentials
$AADUserName = read-host "Enter your Subscription credentials/Azure Service Admin Username"
$ADPwd = read-host "Enter your Azure Service Admin Password"
$AADPassword = $ADPwd | ConvertTo-SecureString -Force -AsPlainText
$AADCredential = New-Object PSCredential($AADUserName,$AADPassword)
$AADTenantID = ($AADUserName -split '@')[1]
$Credential = $AADCredential
### Get Azure SubscriptionID & Register AzureStack RP in Azure Subscription
Login-AzureRmAccount -Credential $Credential
Register-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack -Force
Get-AzureRmResourceProvider -ProviderNamespace Microsoft.AzureStack
$AzureSub = Get-AzureRmSubscription | Select-Object -Property SubscriptionID | fl | Out-String
$AzureSubID = ($AzureSub -split ' : ')[1]
$SubID = $AzureSubID.Substring(0,36)
### Setup AzureStackAdmin ARM Endpoint
Add-AzureRMEnvironment -Name "AzureStackAdmin" -ArmEndpoint "https://adminmanagement.local.azurestack.external"
Set-AzureRmEnvironment -Name "AzureStackAdmin" -GraphAudience "https://graph.local.azurestack.external/" -EnableAdfsAuthentication:$true
$TenantID = Get-AzsDirectoryTenantId -ADFS -EnvironmentName "AzureStackAdmin"
Login-AzureRmAccount -EnvironmentName "AzureStackAdmin" -TenantId $TenantID
### Register Resource Providers
foreach($s in (Get-AzureRmSubscription)) {
Select-AzureRmSubscription -SubscriptionId $s.SubscriptionId | Out-Null
Write-Progress $($s.SubscriptionId + " : " + $s.SubscriptionName)
Get-AzureRmResourceProvider -ListAvailable | Register-AzureRmResourceProvider -Force
}
### Register Azure Stack with Azure - Market Place Syndication
c:\temp\RegisterWithAzure.ps1 -azureSubscriptionId $SubID -azureDirectoryTenantName $AADTenantID -azureAccountId $AADUserName
Let us know how it goes,
We apologize for any inconvenience and appreciate your time and interest in Azure Stack.
If you continue experience any issues with ASDK release, feel free to contact us.
PowerShell giving you the Blues? Try my Azure Stack PowerShell Helper scripts
ASDK: Install/Import Azure Stack Modules 1.2.10 & AzureStack-Tools
ASDK: Config PowerShell & set AdminStackAdmin/User ARM Endpoints
ASDK: AzureStack Automation: Register ADFS ASDK for Azure Marketplace Syndication
ASDK: AzureStack Automation: Register ASDK for Azure Marketplace Syndication
Thanks,
Gary Gallanes
- Proposed as answer by Gary Gallanes [HCL Technologies] Monday, August 28, 2017 5:18 PM
- Marked as answer by Gary Gallanes [HCL Technologies] Monday, August 28, 2017 5:18 PM
Monday, August 28, 2017 5:18 PM -
Thanks Gary for providing us with the script above.
We ran the script which resulted in the following error:
Loading Profile 2017-03-09-profile
Enter your Subscription credentials/Azure Service Admin Username: ******@outlook.com
Enter your Azure Service Admin Password:********
Login-AzureRmAccount : Sequence contains no elements
At C:\Users\AzureStackAdmin\Desktop\RegisterAzure.ps1:31 char:1
+ Login-AzureRmAccount -Credential $Credential
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Add-AzureRmAccount], AadAuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.AddAzureRMAccountCommand
PS C:\AzureStack-Tools-master>Please advise,
Matt
MVV
Monday, August 28, 2017 10:19 PM -
Hello Matt,
I'm currently trying to repro your error on my ASDK.
It looks like the script is failing when trying to get the subscription ID.
Can you try running the following PowerShell to validate?
Login-AzureRmAccount
Your output should look something like this:
Environment : AzureCloud
Account : SrvAdmin@PMDogfood.onmicrosoft.com
TenantId : a852d100-0059-48fe-9f0e-b285fad09f32
SubscriptionId : 8a2ca751-4f32-4ke4-a132-b3a1d4f4h78c
CurrentStorageAccount :
Let us know how it goes,
Thanks,
Gary
Gary Gallanes
Monday, August 28, 2017 11:57 PM -
Environment : AzureCloud
Account : climaxstack1@outlook.com
TenantId : fb708bfa-312c-4e4e-91eb-0b1a3c8dc86f
SubscriptionId : 61eafc00-0746-41a8-8f4c-dc0d20901a41
CurrentStorageAccount :Maybe because the SubscriptionId is a Free Trial account, it may have failed...
What are your thoughts?
MVV
Tuesday, August 29, 2017 2:22 PM -
Hello Matt,
I’d like to setup a call with you to troubleshoot this a little further.
If you could, please email ascustfeedback@microsoft.com with a range of times you can be available and I’ll respond with a Skype meeting invite.
Make sure to include the thread URL in the subject when contacting ascustfeedback@microsoft.com
We apologize for any inconvenience and appreciate your time and interest in Azure Stack.
If you continue experience any issues with ASDK release, feel free to contact us.
PowerShell giving you the Blues? Try my Azure Stack PowerShell Helper scripts
ASDK: Install/Import Azure Stack Modules 1.2.10 & AzureStack-Tools
ASDK: Config PowerShell & set AdminStackAdmin/User ARM Endpoints
ASDK: AzureStack Automation: Register ADFS ASDK for Azure Marketplace Syndication
ASDK: AzureStack Automation: Register ASDK for Azure Marketplace Syndication
Gary Gallanes
Tuesday, August 29, 2017 4:38 PM -
Hi Gary,
We decided to reinstall AzureStack on a new network with DHCP enabled and no blockers.
But when trying our climaxstack1@outlook.com test account, it was suspended again. I do not know why Microsoft keeps doing that, it is extremely annoying with no possible option to unsuspend.
Now we have to setup another brand new email again.
Please advise,
Matt
MVV
Thursday, September 7, 2017 3:47 PM -
Hi Gary,
Name : [varun@fasihtec.online, cb6746a8-8d3e-45bf-91d1-76b47b1f3797]
Account : varun@fasihtec.online
SubscriptionName : Free Trial
TenantId : e97c257f-6278-46c5-94c3-d8b6e6df6009
Environment : AzureCloudMaybe because the SubscriptionId is a Free Trial account, it may have failed...
Please help
Wednesday, August 29, 2018 9:02 AM