Azure / App-Service-Migration-Assistant

Azure Websites Migration Assistant for Windows is a tool that allows customers to move their existing sites hosted on IIS servers into the cloud on Azure App Service. For more information check out https://appmigration.microsoft.com .
https://appmigration.microsoft.com
MIT License
74 stars 60 forks source link

The tool hang on Running Administrator check, gathering local IIS information #49

Closed arseyam closed 1 year ago

arseyam commented 3 years ago

Investigative information

Repro steps

Just run the Azure App Service Migration Assistant Tool

Expected behavior

I should be able to see the websites within the IIS and move to the next step which is the Assessment Report

Actual behavior

The tool keeps running forever on the page shown in the attached screenshot Screenshot 2020-12-14 070851

krolson commented 3 years ago

Hello @arseyam - thank you for reporting this.

Would it be possible for you to try the Step 3 GetSiteList command noted in https://github.com/Azure/App-Service-Migration-Assistant/wiki/How-the-Assistant-Works#what-information-is-sent-for-assessments and tell me what results you get back? This is the operation that usually populates the IIS site list that is not loading in your case, and I am wondering if there is something unexpected occurring there. (We don't log anything from the client on this page before a site is selected, as this page is the place that users can choose to opt-out of that logging, so there will not be any traces outside of your machine for this kind of issue.)

arseyam commented 3 years ago

This VM is pretty old, PowerShell version 2.0.50727.8806 The command is not executing

The term '.\iisConfigAssistant.exe' is not recognized as the name of a cmdlet, function, script file, or operable progr am. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:25

  • .\iisConfigAssistant.exe <<<< GetSiteList
  • CategoryInfo : ObjectNotFound: (.\iisConfigAssistant.exe:String) [], CommandNotFoundException
  • FullyQualifiedErrorId : CommandNotFoundException
krolson commented 3 years ago

Where are you running this command from? Nothing is added to the machine Path variable during installation, so you would need to run the command from within the installation folder for it to work. The iisConfigAssistant.exe should be located at: %systemdrive%\users\[username]\AppData\Local\Programs\azure-appService-migrationAssistant\iisConfigAssistant where "[username]" is the user that installed the Migration Assistant. Could you tell me if you have that iisConfigAssistant directory and if so, whether the iisConfigAssistant.exe is present within it?

If you do not see the iisConfigAssistant directory there, or it is there but there is no iisConfigAssistant.exe, then there may have been an issue during the installation. You could try uninstalling and installing again on this machine to see if that works (or to get a fresh log in EventViewer if it has the same issue again - I would be interested in this) or install it on any other machine and simply copy the whole azure-appService-migrationAssistant directory from the new install to this machine, replacing the local version.

arseyam commented 3 years ago

It seems I was running the command from the wrong location however it's extremely slow, it took 2 and half hours to list the websites (only 5 are hosted on this server). 1 Now I'm running the command below which I don't know how long it will take .\iisConfigAssistant.exe GetSiteAssessmentData "Default Web Site" true C:\TEMP\dontShareThisStringMappingFile.json > C:\TEMP\AnonAssessmentInfo.json let's wait until tomorrow and see..

arseyam commented 3 years ago

@krolson After a day has passed still no output. 1

arseyam commented 3 years ago

@krolson 2nd day the same problem

krolson commented 3 years ago

Hello @arseyam - thank you very much for letting us know how this has been going. It looks like this is why the UI isn't showing a list of sites, as it relies on this iisConfigAssistant.exe to get the site list (and the later GetSiteAssessmentData to get information for doing the assessment as a next step) - and it is taking far too long to be usable for you!

Could you share some details about the machine where this is running, such as the RAM and CPU to give us an idea of the machine power? This could help us to reproduce the behavior if it's related to machine resources. The site listing and assessment steps do load the entire IIS configuration, including web.config information in all sites - could you let us know if any of the sites have content that may be notably large (say, order of gigabytes of data?)?

In the meantime, if you would like to try migration without doing assessment first for these 5 sites (you can see what kinds of checks the assessment is looking for here https://github.com/Azure/App-Service-Migration-Assistant/wiki/Readiness-Checks ), you might consider trying something like one of the content deployment methods noted on this/sibling pages: https://docs.microsoft.com/en-us/azure/app-service/deploy-ftp. It is obviously more manual creating the app service site in the azure portal (portal.azure.com) and the locating and moving the content using one of the options like ftp, run from package, ci/cd or git pipeline, etc. but for 5 sites you might find that this would be a quicker workaround option to test things out in app service.

arseyam commented 3 years ago

Hello @krolson,

the server specs are: RAM: 16GB CPU: 6 cores - Intel Xeon CPU E5-2670 2.6GHz

This server hosts an archiving application which contains hundreds of thousands of documents - 5TB in total size.

We cannot just migrate it directly as it depends on an on-premises Oracle database, we wanted to know if the web app migration assessment will work before we go to the database migration assessment part.

In addition, as this is an internal website, does the web app assessment tool migrates applications to isolated environments?

krolson commented 3 years ago

Hello @arseyam,

Thank you for adding these details - the machine should certainly be fine to run the Migration Assistant, it appears this issue is more likely with the content size of the 5TB application you mentioned. My guess is that even loading the IIS configuration is taking a long time, as well as cataloguing the size of all the application's directories to determine the overall size of the application content for generating assessment info. We have logged an item for looking into how to improve the experience in cases like this one.

Unfortunately this particular 5 TB application might not be a good candidate for lift-and-shift migration to App Service - even in Isolated SKU the max disk space is 1 TB (https://azure.microsoft.com/en-us/pricing/details/app-service/windows/). As such doing something like a lift-and-shift of the application without some modification to how the content is stored (from local directories to Azure storage/some other non-local data store) will likely be a problem. Specifically to your question the Migration Assistant can migrate to isolated App Service Environments as the migration target, however it will only support doing a migration for sites with content under 2 GB due to the deployment mechanism it uses (and this is the main reason why it looks at content size).

One alternative for this application to move to cloud in a lift-and-shift way might be to do a VM rather than application migration. There is the Azure Migrate service that can guide through assessing and migrating to Azure VM, such as outlined in this document for Hyper-V: https://docs.microsoft.com/en-us/azure/migrate/tutorial-migrate-hyper-v (it has you create a VM temporarily in your network to facilitate the on-premise steps like discovering and assessing local resources).

For the other (presumably smaller) applications on the server, you could either keep them there as part of a VM migration or test running in App Service by manually creating the web apps and moving the content as a workaround. I'm sorry that I don't have a better quick solution for you for these sites.

jamesba3u89 commented 3 years ago

I am getting Out of Memory errors on the same introduction screen waiting for the site list to populate. I am using version 1.0.6 of the tool. Windows server 2012 R2 (35/64GB ram used normally) hosting ~128 websites. iisConfigAssistant.exe process memory usage just increases until OOM error occurs, I never get the site list to be able to pick a website to evaluate.

krolson commented 3 years ago

If you are experiencing the above issue with the Migration Assistant would you be willing to try using the PowerShell scripts that were recently released and let us know if you see similar issues with getting assessment results (running Get-SiteReadiness script) ? The scripts are a lightweight option that involves simply dropping a directory of scripts on the machine (or at least a machine-accessible location) in order to try it out.

Main info page: https://github.com/Azure/App-Service-Migration-Assistant/wiki/PowerShell-Scripts Place to download: https://azure.microsoft.com/en-us/services/app-service/migration-assistant/

jkkirkland commented 3 years ago

I too am having a similar issue to previous users - using Azure App Service Migration Assistant v 1.0.6 on Windows 2012 R2 (VMWare) for 3 hosted IIS 8.5.96 websites. Site discovery completes for our Services website but not our main application website. It has been displaying "Assessing your site..." status message after running 15+ hours.

Would like to attempt to use the PowerShell scripts as alternative however all download links provided seem to go to Migration Assistant Executable install - not PS zip file referenced in docs.

Where are the PS scripts?

krolson commented 3 years ago

Our apologies - there was a mixup with the download links with a recent change to the page - while it's being fixed you can pick up the scripts from the direct Preview download link: https://appmigration.microsoft.com/api/download/psscriptpreview/AppServiceMigrationScripts.zip

jkkirkland commented 3 years ago

Thank you for posting link. Appreciate it.

jkkirkland commented 3 years ago

It would appear there is another bad link in the Wiki FAQ concerning the readiness checks that are completed:

https://github.com/Azure/App-Service-Migration-Assistant/wiki

Under the bullet "App Service Migration Assistant Readiness Checks"

krolson commented 3 years ago

Thank you so much @jkkirkland for letting us know! I have updated the link to point to https://github.com/Azure/App-Service-Migration-Assistant/wiki/Readiness-Checks page.

jkkirkland commented 3 years ago

Again, thanks @krolson for posting correction. Appreciate it.