mattmcspirit / azurestack

Azure Stack Resources
80 stars 41 forks source link

DeployAppService : Failed #82

Closed ghost closed 5 years ago

ghost commented 5 years ago

[5624:563C][2019-03-01T16:24:10]i000: [Websites]: Token Expires On: 2019-03-01 17:24:03Z [5624:563C][2019-03-01T16:24:10]i000: [Websites]: GET: https://adminmanagement.local.azurestack.external/subscriptions/******/providers/Microsoft.Web.Admin/locations/local?api-version=2016-08-01 [5624:628C][2019-03-01T16:24:10]e000: [Websites]: System.AggregateException: One or more errors occurred. ---> System.ArgumentNullException: Value cannot be null. Parameter name: v1 at System.Version.op_LessThanOrEqual(Version v1, Version v2) at System.Version.op_GreaterThanOrEqual(Version v1, Version v2) at Microsoft.Web.Hosting.SingleInstaller.Views.AzureStackInstallInfoStepViewModel.d39.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Microsoft.Web.Hosting.SingleInstaller.Logic.SilentDeployLogic.d26.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Microsoft.Web.Hosting.SingleInstaller.WixBA.ProcessCommandLine() at Microsoft.Web.Hosting.SingleInstaller.WixBA.Run() ---> (Inner Exception #0) System.ArgumentNullException: Value cannot be null. Parameter name: v1 at System.Version.op_LessThanOrEqual(Version v1, Version v2) at System.Version.op_GreaterThanOrEqual(Version v1, Version v2) at Microsoft.Web.Hosting.SingleInstaller.Views.AzureStackInstallInfoStepViewModel.d39.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() at Microsoft.Web.Hosting.SingleInstaller.Logic.SilentDeployLogic.d26.MoveNext()<---

[5624:3810][2019-03-01T16:24:10]i500: Shutting down, exit code: 0xffffffff [5624:3810][2019-03-01T16:24:10]i410: Variable: LocalAppDataFolder = C:\Users\AzureStackAdmin\AppData\Local\ [5624:3810][2019-03-01T16:24:10]i410: Variable: NETFRAMEWORK45 = 394802 [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleAction = 5 [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleElevated = 1 [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleLog = D:\ASDKfiles\ASDK\appservice\AppServiceLog0301-162359.txt [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleManufacturer = Microsoft Corporation [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleName = Microsoft Azure App Service [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleOriginalSource = D:\ASDKfiles\ASDK\appservice\appservice.exe [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleOriginalSourceFolder = D:\ASDKfiles\ASDK\appservice\ [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleProviderKey = {e7403885-1692-4660-8b47-70a8a4bbcb99} [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleSourceProcessFolder = D:\ASDKfiles\ASDK\appservice\ [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleSourceProcessPath = D:\ASDKfiles\ASDK\appservice\appservice.exe [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleTag = [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleUILevel = 2 [5624:3810][2019-03-01T16:24:10]i410: Variable: WixBundleVersion = 80.0.15.0 [5624:3810][2019-03-01T16:24:10]i007: Exit code: 0xffffffff, restarting: No

When doing the installation using the setup file:

[4BA4:41B4][2019-03-04T05:50:51]i000: [Websites]: Token Expires On: 2019-03-04 06:47:11Z [4BA4:41B4][2019-03-04T05:50:51]i000: [Websites]: GET: https://adminmanagement.local.azurestack.external/subscriptions/ebac894f-95b3-47f4-a585-84211aaac3f0/providers/Microsoft.Compute/locations/local/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus?api-version=2016-03-30

"Scenario": 2, "AzureResourceManagerDnsSuffix": "adminmanagement.local.azurestack.external", "TenantAzureResourceManagerDnsSuffix": "management.local.azurestack.external", "AzureDirectoryTenantName": "**.onmicrosoft.com", "DomainSuffix": "azurestack.external", "LoginEndpoint": "https://login.microsoftonline.com/", "GraphEndpoint": "https://graph.windows.net/", "AppResourceId": "https://adminmanagement.mas2moordrechttest.onmicrosoft.com/**", "IsMultiTenant": true, "AppServiceWebAppsDnsSuffix": "appservice.local.azurestack.external", "AppServiceApiDnsSuffix": "api.appservice.local.azurestack.external", },

BjornAnd commented 5 years ago

I get pretty much the same. I'm running the 1901.1 branch (Yes i know that it's not finished... but since I get sort of the same issue i thought to post here.) The reason for me using 1901.1 is to use the custom domain feature. (the MS SQL and MySQL worked like a charm as far as I have seen, but the AppServices in 1901.1 seems like some small issue. :))

I've attached the logfile from my installation to help troubleshooting. AppServiceLog0304-083128.txt

mattmcspirit commented 5 years ago

Firstly, thanks for raising an issue. However, please for future issues can you both follow the issue template, and provide the extra info that it's asks for?

Describe the issue A clear and concise description of what the issue is, including the final error message from the PowerShell window, and your launch command (removing any sensitive info).

Hardware Please provide details about your hardware environment, such as HDDs/SSDs, # of CPUs, RAM and whether this is physical, or a nested VM in Azure etc.

Send the logs Zip up your ConfigASDK\Logs folder and send them to asdkconfigurator @ outlook .com and I'll analyze them as quickly as possible.

Additional context Add any other context about the problem here.

That would help, thanks.

@BjornAnd - is your portal address https://adminportal.local.poc1.azurestack.se? I assume that's correct as the process would have failed very early if it was wrong.

@Laborman - if you could also provide your log file, either on here or on email, that would be helpful. There's no information in your log snippet above. Did you run the standard master branch?

Are you both using custom domain suffixes?

Can you download this AppService.14 zip, and extract to replace the appservice.exe and helper scripts that are already there. This is version 1.4, so it'll be interesting to see if this fixes your issue.

appservice1.4.zip

BjornAnd commented 5 years ago

Hi Matt! Thanks for your patience and your herculean effort to put this fantastic script together!!

Yes, I’m using “https://adminportal.local.poc1.azurestack.se” as my adminportal address (for the end users it is https://portal.local.poc1.azurestack.se, and so on).

I started with running configASDK.ps1 with “-skipMySQL -skipMSSQL -skipAppService -skipCustomizeHost” just do make sure that everything worked OK. That worked OK. Then ran the script again but this time with “-skipMSSQL -skipAppService -skipCustomizeHost”. Next time with “-skipAppService -skipCustomizeHost”

And now I’m running with just “-skipCustomizeHost”. So when installing the app-services the script failed.

The logfiles is sent as an email. :)

mattmcspirit commented 5 years ago

Thanks - i haven't received the email yet, but i'll review them when it arrives!

Thanks!

mattmcspirit commented 5 years ago

Got them! Let me know if switching back to 1.4 version of App Service works for you!

BjornAnd commented 5 years ago

sorry. no. 1,4 did no difference for me.

mattmcspirit commented 5 years ago

OK, so do you have the app service log from the app service folder? Copying the appservice.exe that i provided above, and replacing the existing appservice.exe worked for someone else - I'm surprised it didn't work for you also.

BjornAnd commented 5 years ago

the log attached to the email is from when installing with 1.4

mattmcspirit commented 5 years ago

Yes, but it doesn't include the AppService log, which is actually created here (for you):

An error has occurred during deployment. Please check the App Service logs at D:\ConfigASDK_downloadfolder\ASDK\appservice\AppServiceLog0304-175427.txt

I should probably move that log file location but it's an RP log file, rather than an ASDK Configurator log file.

mattmcspirit commented 5 years ago

Aaaand now I've seen you've included it :)

BjornAnd commented 5 years ago

I've been forced to start a manual install of AppService v1.5. We have a business opportunity right now, and i'm sorry to say that this can't wait. :( This makes troubleshooting much harder, i know that. But i'm going to see if I can reinstall another of "my" ASDK-servers later this week and see if I get the same issue there.

mattmcspirit commented 5 years ago

OK, so this is a different error for 1.4:

---> (Inner Exception #0) System.ArgumentException: Either identity application id 51e7dad5-###################0c2fc doesn't exist or has no service principal. Please check.

Did you manually delete the application ID 51e7dad5-###########-cadc1ad0c2fc?

Seeing as the step is "complete" but the App ID doesn't exist any longer, even 1.5 won't work unless you go through all the manual steps. That's the reason why 1.4 failed for you.

You should reset the AppServicePreReq step and then rerun, again using 1.4 - it should work then.

$sqlServerInstance = '(localdb)\MSSQLLocalDB'
$databaseName = "ConfigASDK"
$tableName = "Progress"
Read-SqlTableData -ServerInstance $sqlServerInstance -DatabaseName "$databaseName" -SchemaName "dbo" -TableName "$tableName" -Verbose:$false -ErrorAction Stop
$progressStage = "AddAppServicePreReqs"
Invoke-Sqlcmd -Server $sqlServerInstance -Query "USE $databaseName UPDATE Progress SET $progressStage = 'Incomplete;" -Verbose:$false -ErrorAction Stop
Read-SqlTableData -ServerInstance $sqlServerInstance -DatabaseName "$databaseName" -SchemaName "dbo" -TableName "$tableName" -Verbose:$false -ErrorAction Stop

This will reset that AppServicePreReq stage, which will recreate the App ID.

mattmcspirit commented 5 years ago

This should now be fixed in the upcoming 1902 release of the ASDK Configurator. There is a now-known bug in the silent deployment of appservice.exe 1.5 and so I will be deploying 1.4 until this is fixed. If you are running the ASDK Configurator for the first time, on a fresh ASDK, you should not encounter this issue again. If you are trying to run on an ASDK that is already partially configured, following the steps above should help.