mattmcspirit / azurestack

Azure Stack Resources
80 stars 41 forks source link

Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=15.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified..Exception.Message #112

Closed jayanthoncloud closed 4 years ago

jayanthoncloud commented 4 years ago

Describe the issue Scenario 3: .\AzSPoC.ps1 -azureDirectoryTenantName "contoso.onmicrosoft.com" -authenticationType AzureAD -downloadPath "D:\ASDKfiles" -ISOPath "D:\WS2016EVALISO.iso" -asdkHostPwd 'Passw0rd123!' -VMpwd 'Passw0rd123!' -azureAdUsername "admin@contoso.onmicrosoft.com" -azureAdPwd 'Passw0rd123!'

Error: Could not load file or assembly 'Microsoft.SqlServer.BatchParser, Version=15.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified..Exception.Message

Directory: C:\AzSPoC

Mode LastWriteTime Length Name


-a---- 10/18/2019 5:35 AM 0 AzSPoCRunFlag.txt Name: MSSQLLocalDB

Version: 14.0.1000.169

Shared name:

Owner: AZURESTACK\AzureStackAdmin

Auto-create: Yes

State: Running

Last start time: 10/18/2019 5:38:21 AM

Instance pipe name: np:\.\pipe\LOCALDB#4465EA27\tsql\query

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.

HDD CPU: Intel Xeon CPU E5-2670 v3 @2.30 GHz (2 Socket) RAM: 256GB Physical Server: Dell PowerEdge R630 ASDK: 1908

Send the logs Sent

Additional context Add any other context about the problem here.

jayanthoncloud commented 4 years ago

AzSPoCLog101819-053443.txt

mattmcspirit commented 4 years ago

Hi - I haven't seen this error before i'm afraid - well, not exactly

1) Is the log file from the first run? 2) Was there anything else installed on this system before running my script?

The reason I ask, is it looks like a conflict with the SQL Server PowerShell module, so I wonder if there's an issue there.

If you close all PS windows, and ISEs, then in a fresh PS console, run:

Get-InstalledModule

And see if SQL Server is listed?

If so, let's clean them all up:

Get-InstalledModule -Name SQLServer | Uninstall-Module -Force

Check if there's anything SQLServer related in this folder "C:\Program Files\WindowsPowerShell\Modules", and if there's anything there, delete it.

Then install SQLServer PS again:

Install-Module SqlServer -Force -Confirm:$false -AllowClobber -Verbose -ErrorAction Stop

Then, you should be ok to rerun the script.

jayanthoncloud commented 4 years ago

Thanks for your reply Matt.

  1. Not the first run. I tried a few times even by restarting the ASDK
  2. It was a fresh setup. For some strange reason, even the appservice.exe was not launching on the system. Which prompted me to redeploy ASDK. I will redeploy ASDK and run it afresh. I will go through your instructions in case I see the same problem again.

On Fri, Oct 18, 2019 at 11:35 PM Matt McSpirit notifications@github.com wrote:

Hi - I haven't seen this error before i'm afraid - well, not exactly

  1. Is the log file from the first run?
  2. Was there anything else installed on this system before running my script?

The reason I ask, is it looks like a conflict with the SQL Server PowerShell module, so I wonder if there's an issue there.

If you close all PS windows, and ISEs, then in a fresh PS console, run:

Get-InstalledModule

And see if SQL Server is listed?

If so, let's clean them all up:

Get-InstalledModule -Name SQLServer | Uninstall-Module -Force

Check if there's anything SQLServer related in this folder "C:\Program Files\WindowsPowerShell\Modules", and if there's anything there, delete it.

Then install SQLServer PS again:

Install-Module SqlServer -Force -Confirm:$false -AllowClobber -Verbose -ErrorAction Stop

Then, you should be ok to rerun the script.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mattmcspirit/azurestack/issues/112?email_source=notifications&email_token=ALW7ASBL4DHLAKXEWG4OTCDQPH3E7A5CNFSM4JCDAYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBVLRMA#issuecomment-543865008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW7ASDRA4AAM6QOOR5Y5STQPH3E7ANCNFSM4JCDAYOQ .

mattmcspirit commented 4 years ago

Thanks - keep me posted and let me know if the error occurs again. Thanks!

jayanthoncloud commented 4 years ago

Hello Matt, Thank you for your response.

I redeployed again. Things progressed better this time. I have seen 2 issues

  1. There seems to be some issue using the Windows Server 2016 iso. I tried to download the eval version https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016, it seems to be not recognizing the image. Due to this rest of the steps like App Service deployment and others which are dependent on this are failing. I am not sure whether this is the right image, appreciate if you can point me to the correct image to download from and the location. I have MSDN account as well.

Error Message:

You're missing the Windows Server 2016 Datacenter Server Core image in your Platform Image Repository. You're missing the Windows Server 2016 Datacenter Full image in your Platform Image Repository.

I have attached the logs for your reference

  1. I have an MSDN license which is attached to my Dell id, and I usually use it for registering. Since my ASDK is deployed in a non corporate image, windows account sign-in will recognize as corporate id and try to do an SSO, since this is on a non-corporate image, it asks me for domain name followed by RSA for multi-factor auth. How can make your scripts work for this scenario? Even if it allows me to launch the windows login UI (just like the ASDK registration script would do) it would help. Btw, my Sub ID login is different compared to tenant id used for ASDK deployment (Scenario-2)

On Mon, Oct 21, 2019 at 9:32 PM Matt McSpirit notifications@github.com wrote:

Thanks - keep me posted and let me know if the error occurs again. Thanks!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mattmcspirit/azurestack/issues/112?email_source=notifications&email_token=ALW7ASHS23PLPKEQBDN7CK3QPXG7VA5CNFSM4JCDAYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB23BBQ#issuecomment-544583814, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW7ASDEVTYECXVVKF3GAI3QPXG7VANCNFSM4JCDAYOQ .

mattmcspirit commented 4 years ago

Hey, no logs came through - please email them to asdkconfigurator @ outlook .com

I can't make the script work with MFA i'm afraid - my script makes many non-interactive PowerShell requests for authentication, which doesn't work with MFA. The ASDK install i think, creates a Service Principal, which then handles all of the login-related stuff, and I haven't invested the time to understand how I'd do that I'm afraid, and isn't something I'll likely have time for going forward.

Seeing as the ASDK doesn't incur any billing charges, my advice would be to set up a separate AAD/sub for use with the ASDK, and that should solve your issue.

jayanthoncloud commented 4 years ago

No worries Matt. You are doing a great job. Really appreciate it. I think you have a point, probably I will use my personal AAD for ASDK going forward. I have forwarded the logs to your outlook email, let me know if you got them.

Thanks Jayanth

On Mon, Oct 21, 2019 at 10:32 PM Matt McSpirit notifications@github.com wrote:

Hey, no logs came through - please email them to asdkconfigurator @ outlook .com

I can't make the script work with MFA i'm afraid - my script makes many non-interactive PowerShell requests for authentication, which doesn't work with MFA. The ASDK install i think, creates a Service Principal, which then handles all of the login-related stuff, and I haven't invested the time to understand how I'd do that I'm afraid, and isn't something I'll likely have time for going forward.

Seeing as the ASDK doesn't incur any billing charges, my advice would be to set up a separate AAD/sub for use with the ASDK, and that should solve your issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mattmcspirit/azurestack/issues/112?email_source=notifications&email_token=ALW7ASAQFRZSQA36HISYHDTQPXOCDA5CNFSM4JCDAYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB3BRKQ#issuecomment-544610474, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALW7ASAKC47UFMOWBYOUEGDQPXOCDANCNFSM4JCDAYOQ .

mattmcspirit commented 4 years ago

I think it was a transient issue trying to grab some Windows Updates, which is actually the stage that failed. This caused the Windows Images stage to fail. The point that failed, i think, was here:

$rss = "https://support.microsoft.com/app/content/api/content/feeds/sap/en-us/6ae59d69-36fc-8e4d-23dd-631d98bf74a9/rss"
$rssFeed = [xml](New-Object System.Net.WebClient).DownloadString($rss)
$feed = $rssFeed.rss.channel.item | Where-Object { $_.title -like "*Servicing Stack Update*Windows 10*" }
$feed = ($feed | Where-Object { $_.title -like "*1607*" } | Select-Object -Property Link | Sort-Object link)

If you run that on your ASDK host manually, and then run $feed on it's own, you should get something like:

link


https://support.microsoft.com/help/4132216 https://support.microsoft.com/help/4485447 https://support.microsoft.com/help/4498947 https://support.microsoft.com/help/4503537 https://support.microsoft.com/help/4509091 https://support.microsoft.com/help/4512574 https://support.microsoft.com/help/4521858

I guess it just couldn't reach that link initially, and that caused the error.

Hope that helps, Matt