Azure Stack – App Service install problems
Jeżeli podczas instalacji App Service w Azure Stack napotkamy na problemy w szczególności w fazie Deploy App Service, jak poniżej:
Proponuje:
-
Przejść do Resource Grupy zawierającej App Service w ASDK będzie to AppService.local i w Activity Log sprawdzić, jaki mieliśmy problem.
-
Zazwyczaj będzie to problem z maszynami wirtualnymi CN0-VM lub CN1-VM, przechodzimy do nich, i w Activity Log sprawdzamy błędy:
-
Bardziej znaczące logi można uzyskać logując się do tej maszyny za pomocą RDP – wcześniej odpowiednio konfigurując Network Security Group, tak aby przepuścić połączenia RDP i znajdują się one w:
C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.9.1\Status\0.status
- Proponuje sprawdzić z tej maszyny czy działa połączenie do bazy danych, która dedykowaliśmy dla App Service za pomocą (oczywiście adres bazy i port podaje jaki przykład):
Test-NetConnection -ComputerName appservicesql.local.cloudapp.azurestack.external -port 1433
- Uruchamiamy Web Cloud Management Console (jest na pulpicie odpowiedni skrót) i potwierdzamy , iż Controller i Management działa prawidłowo:
- Otwieramy plik 0.status do edycji i podmieniamy jego zawartość na sukces (w przypadku, kiedy były to błędy typu time-out):[{“status”:{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Finished executing command”},”name”:”powershell.exe -ExecutionPolicy Unrestricted -Command .\\OnStartAzureVirtualMachineController.ps1″,”operation”:”Command Execution Finished”,”status”:”success”,”substatus”:[{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Waiting for servers to be ready…\\n2017.05.26 04:59:26 —- Servers are ready!\\n2017.05.26 04:59:27 —- All servers are ready!\\n2017.05.26 04:59:27 —- App Service controller installation and configuration has completed successfully.”},”name”:”StdOut”,”status”:”success”},{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:””},”name”:”StdErr”,”status”:”success”}]},”timestampUTC”:”\/Date(1495774767271)\/”,”version”:”1″}]
- Wciskamy Retry przy Deploy App Service.
If during the installation of the App Service in Azure Stack we encounter problems in the Deploy App Service phase, as below:
My suggestion is:
-
Go to the Resource Group containing the App Service (ASDK: AppService.local) and in Activity Log check what problem we had.
-
Usually this will be a problem with CN0-VM or CN1-VM virtual machines, go to them, and we check errors in Activity Log:
-
More significant logs can be obtained by logging in to this machine using RDP – previously configuring the Network Security Group to pass the RDP connections. Logs are in:
C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.9.1\Status\0.status
- I suggest to the connection to the database – example:
Test-NetConnection -ComputerName appservicesql.local.cloudapp.azurestack.external -port 1433 - We can start the Web Cloud Management Console (there is a shortcut on the desktop) and confirm that the Controller and Management are working properly:
- Open 0.status and edit the content to success one (if there was time-out error):[{“status”:{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Finished executing command”},”name”:”powershell.exe -ExecutionPolicy Unrestricted -Command .\\OnStartAzureVirtualMachineController.ps1″,”operation”:”Command Execution Finished”,”status”:”success”,”substatus”:[{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Waiting for servers to be ready…\\n2017.05.26 04:59:26 —- Servers are ready!\\n2017.05.26 04:59:27 —- All servers are ready!\\n2017.05.26 04:59:27 —- App Service controller installation and configuration has completed successfully.”},”name”:”StdOut”,”status”:”success”},{“code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:””},”name”:”StdErr”,”status”:”success”}]},”timestampUTC”:”\/Date(1495774767271)\/”,”version”:”1″}]
- Press Retry in Deploy App Service.
Identyfikacja błędów w logu instalacyjnym appservice_* / Errors Identyfication in appservice_*:
“code”: “ComponentStatus/StdErr/Succeeded”,
“level”: “Info”,
“displayStatus”: “Provisioning Succeeded”,
“message”: “Wait for servers has timed out\\nAt C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\\\n0\\Common\\common.ps1:457 char:13\\n+ throw New-Object System.TimeoutException \”Wait for server …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : OperationStopped: (:) [], TimeoutException\\n + FullyQualifiedErrorId : Wait for servers has timed out\\n \\nC:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\0\\O\\nnStartAzureVirtualMachineController.ps1 : Error while waiting for server to \\nbecome ready. Exit code: 1.\\nAt line:1 char:1\\n+ .\\OnStartAzureVirtualMachineController.ps1 -controllerIndex 0 -feed h …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep \\n tion\\n + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio \\n n,OnStartAzureVirtualMachineController.ps1\\n ”
}
],
“statuses”: [
{
“code”: “ProvisioningState/failed/1”,
“level”: “Error”,
“displayStatus”: “Provisioning failed”,
“message”: “Finished executing command”
}
]
}
],
“value”: [
{
“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Resources/deployments/AppService.DeployCloud/operations/D8BBEDE893A93B51”,
“operationId”: “D8BBEDE893A93B51”,
“properties”: {
“provisioningOperation”: “Create”,
“provisioningState”: “Failed”,
“timestamp”: “2018-12-29T13:05:33.2421039Z”,
“duration”: “PT1M23.5284416S”,
“trackingId”: “e3607fe5-a29d-474a-a1c0-91c02719ee72”,
“serviceRequestId”: “3b1547a6-4eba-4ab5-8202-670f250698ab”,
“statusCode”: “Conflict”,
“statusMessage”: {
“status”: “Failed”,
“error”: {
“code”: “ResourceDeploymentFailure”,
“message”: “The resource operation completed with terminal provisioning state ‘Failed’.”,
“details”: [
{
“code”: “VMExtensionProvisioningError”,
“message”: “VM has reported a failure when processing extension ‘OnStart’. Error message: Finished executing command”
}
]
}
},
“targetResource”: {
“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Compute/virtualMachines/CN0-VM/extensions/OnStart”,
“resourceType”: “Microsoft.Compute/virtualMachines/extensions”,
“resourceName”: “CN0-VM/OnStart”
}
}
},
{
“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Resources/deployments/AppService.DeployCloud/operations/6A1B090ABDF12ECD”,
“operationId”: “6A1B090ABDF12ECD”,
“properties”: {
“provisioningOperation”: “Create”,
“provisioningState”: “Succeeded”,
“timestamp”: “2018-12-29T11:40:15.9086899Z”,
“duration”: “PT1M3.229514S”,
“trackingId”: “d094b163-33bf-45d6-99a9-5bc4e3d3889a”,
“serviceRequestId”: “f3b8fecc-740c-4224-9615-36d8036af988”,
“statusCode”: “OK”,
“targetResource”: {
“id”: “/subscriptions/ff03660a-cdb3-4a7d-aac9-d119df98aebe/resourceGroups/AppService.local/providers/Microsoft.Compute/virtualMachines/CN1-VM/extensions/OnStart”,
“resourceType”: “Microsoft.Compute/virtualMachines/extensions”,
“resourceName”: “CN1-VM/OnStart”
}
}
[{“version”:”1″,”timestampUTC”:”2018-12-29T13:03:34.4429755Z”,”status”:{“name”:”SecureCommand_0″,”operation”:”Command Execution Finished”,”status”:”error”,”code”:1,”formattedMessage”:{“lang”:”en-US”,”message”:”Finished executing command”},”substatus”:[{“name”:”StdOut”,”status”:”success”,”code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”—- Waiting for servers to be ready…\\n2018.12.29 11:58:31 —- Waiting for servers to be ready…\\n2018.12.29 11:59:31 —- Waiting for servers to be ready…\\n2018.12.29 12:00:31 —- Waiting for servers to be ready…\\n2018.12.29 12:01:31 —- Waiting for servers to be ready…\\n2018.12.29 12:02:31 —- Waiting for servers to be ready…\\n2018.12.29 12:03:31 —- Waiting for servers to be ready…\\n2018.12.29 12:04:31 —- Waiting for servers to be ready…\\n2018.12.29 12:05:31 —- Waiting for servers to be ready…\\n2018.12.29 12:06:31 —- Waiting for servers to be ready…\\n2018.12.29 12:07:31 —- Waiting for servers to be ready…\\n2018.12.29 12:08:31 —- Waiting for servers to be ready…\\n2018.12.29 12:09:31 —- Waiting for servers to be ready…\\n2018.12.29 12:10:31 —- Waiting for servers to be ready…\\n2018.12.29 12:11:31 —- Waiting for servers to be ready…\\n2018.12.29 12:12:31 —- Waiting for servers to be ready…\\n2018.12.29 12:13:31 —- Waiting for servers to be ready…\\n2018.12.29 12:14:31 —- Waiting for servers to be ready…\\n2018.12.29 12:15:31 —- Waiting for servers to be ready…\\n2018.12.29 12:16:31 —- Waiting for servers to be ready…\\n2018.12.29 12:17:31 —- Waiting for servers to be ready…\\n2018.12.29 12:18:31 —- Waiting for servers to be ready…\\n2018.12.29 12:19:31 —- Waiting for servers to be ready…\\n2018.12.29 12:20:31 —- Waiting for servers to be ready…\\n2018.12.29 12:21:31 —- Waiting for servers to be ready…\\n2018.12.29 12:22:31 —- Waiting for servers to be ready…\\n2018.12.29 12:23:31 —- Waiting for servers to be ready…\\n2018.12.29 12:24:31 —- Waiting for servers to be ready…\\n2018.12.29 12:25:31 —- Waiting for servers to be ready…\\n2018.12.29 12:26:31 —- Waiting for servers to be ready…\\n2018.12.29 12:27:31 —- Waiting for servers to be ready…\\n2018.12.29 12:28:31 —- Waiting for servers to be ready…\\n2018.12.29 12:29:31 —- Waiting for servers to be ready…\\n2018.12.29 12:30:31 —- Waiting for servers to be ready…\\n2018.12.29 12:31:31 —- Waiting for servers to be ready…\\n2018.12.29 12:32:31 —- Waiting for servers to be ready…\\n2018.12.29 12:33:31 —- Waiting for servers to be ready…\\n2018.12.29 12:34:31 —- Waiting for servers to be ready…\\n2018.12.29 12:35:31 —- Waiting for servers to be ready…\\n2018.12.29 12:36:31 —- Waiting for servers to be ready…\\n2018.12.29 12:37:32 —- Waiting for servers to be ready…\\n2018.12.29 12:38:32 —- Waiting for servers to be ready…\\n2018.12.29 12:39:32 —- Waiting for servers to be ready…\\n2018.12.29 12:40:32 —- Waiting for servers to be ready…\\n2018.12.29 12:41:32 —- Waiting for servers to be ready…\\n2018.12.29 12:42:32 —- Waiting for servers to be ready…\\n2018.12.29 12:43:32 —- Waiting for servers to be ready…\\n2018.12.29 12:44:32 —- Waiting for servers to be ready…\\n2018.12.29 12:45:32 —- Waiting for servers to be ready…\\n2018.12.29 12:46:32 —- Waiting for servers to be ready…\\n2018.12.29 12:47:32 —- Waiting for servers to be ready…\\n2018.12.29 12:48:32 —- Waiting for servers to be ready…\\n2018.12.29 12:49:32 —- Waiting for servers to be ready…\\n2018.12.29 12:50:32 —- Waiting for servers to be ready…\\n2018.12.29 12:51:32 —- Waiting for servers to be ready…\\n2018.12.29 12:52:32 —- Waiting for servers to be ready…\\n2018.12.29 12:53:32 —- Waiting for servers to be ready…\\n2018.12.29 12:54:32 —- Waiting for servers to be ready…\\n2018.12.29 12:55:32 —- Waiting for servers to be ready…\\n2018.12.29 12:56:32 —- Waiting for servers to be ready…\\n2018.12.29 12:57:32 —- Waiting for servers to be ready…\\n2018.12.29 12:58:32 —- Waiting for servers to be ready…\\n2018.12.29 12:59:32 —- Waiting for servers to be ready…\\n2018.12.29 01:00:32 —- Waiting for servers to be ready…\\n2018.12.29 01:01:32 —- Waiting for servers to be ready…\\n2018.12.29 01:02:32 —- Waiting for servers to be ready…\\n2018.12.29 01:03:33 —- Error while waiting for server to become ready. Exit code: 1.\\n\\n”}},{“name”:”StdErr”,”status”:”success”,”code”:0,”formattedMessage”:{“lang”:”en-US”,”message”:”Wait for servers has timed out\\nAt C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\\\n0\\Common\\common.ps1:457 char:13\\n+ throw New-Object System.TimeoutException \”Wait for server …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : OperationStopped: (:) [], TimeoutException\\n + FullyQualifiedErrorId : Wait for servers has timed out\\n \\nC:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.9.1\\Downloads\\0\\O\\nnStartAzureVirtualMachineController.ps1 : Error while waiting for server to \\nbecome ready. Exit code: 1.\\nAt line:1 char:1\\n+ .\\OnStartAzureVirtualMachineController.ps1 -controllerIndex 0 -feed h …\\n+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\n + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorExcep \\n tion\\n + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExceptio \\n n,OnStartAzureVirtualMachineController.ps1\\n “}}]}}]