microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
382 stars 246 forks source link

Cannot run BC Images Today #2642

Closed mattkeyeswc closed 2 years ago

mattkeyeswc commented 2 years ago

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue After downloading the latest image, I cannot run BC within the container. I have a container named "latest" that I removed and re-created via bccontainerhelper's wizard. The image creates as expected, however, I cannot connect via a browser. Additionally, most of the Event Log messages start with "The operating system cannot run Server instance: BC". There is also a message about a particular file being considered a virus and so it was removed.

I am able to download symbols from the instance; I just can't seem to connect a web browser via DNS name or IP address:

image

Scripts used to create container and cause the issue

$containerName = 'latest'
$password = 'P@ssw0rd'
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
$credential = New-Object pscredential 'admin', $securePassword
$auth = 'UserPassword'
$artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -country 'us' -select 'Latest'
$licenseFile = 'E:\BC Licenses\BCv20.bclicense'
New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -multitenant:$false `
    -licenseFile $licenseFile `
    -includeAL `
    -updateHosts

Full output of scripts

PS C:\WINDOWS\system32> $containerName = 'latest'
$password = 'P@ssw0rd'
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
$credential = New-Object pscredential 'admin', $securePassword
$auth = 'UserPassword'
$artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -country 'us' -select 'Latest'
$licenseFile = 'E:\BC Licenses\BCv20.bclicense'
New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -multitenant:$false `
    -licenseFile $licenseFile `
    -includeAL `
    -updateHosts
BcContainerHelper is version 3.0.5
BcContainerHelper is running as administrator
Host is Microsoft Windows 11 Pro - 21H2
Docker Client Version is 20.10.13
Docker Server Version is 20.10.13
Removing container latest
Removing latest from container hosts file
Removing latest-* from container hosts file
Removing C:\ProgramData\BcContainerHelper\Extensions\latest
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.887
Creating Container latest
Style: sandbox
Multitenant: No
Version: 20.4.44313.45222
Platform: 20.0.44266.45176
Generic Tag: 1.0.2.13
Container OS Version: 10.0.20348.887 (ltsc2022)
Host OS Version: 10.0.22000.856 (21H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file E:\BC Licenses\BCv20.bclicense
Files in C:\ProgramData\BcContainerHelper\Extensions\latest\my:
- AdditionalOutput.ps1
- license.bclicense
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container latest from image mcr.microsoft.com/businesscentral:10.0.20348.887
3f6c90a4a2d1c41089f0a4e999e9eeb1542385084e620c2551ce5613bde9a63c
Waiting for container latest to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.4.44313.45222/us
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.4.44313.45222\platform\ServiceTier\Program Files
c:\dl\sandbox\20.4.44313.45222\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.4.44313.45222\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.4.44313.45222\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.4.44313.45222\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.4.44313.45222\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.4.44313.45222\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.4.44313.45222\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.4.44313.45222\platform
c:\dl\sandbox\20.4.44313.45222\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.4.44313.45222\us\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.4.44313.45222\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.4.44313.45222\us\Extensions
Copying Applications
C:\dl\sandbox\20.4.44313.45222\platform\Applications
Copying Applications.US
C:\dl\sandbox\20.4.44313.45222\us\Applications.US
Copying dependencies
Copying ReportBuilder
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/20.4.44313.45222/us
Using installer from 
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\20.4.44313.45222\platform\ServiceTier\Program Files
c:\dl\sandbox\20.4.44313.45222\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\20.4.44313.45222\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\20.4.44313.45222\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\20.4.44313.45222\platform\WebClient\Microsoft Dynamics NAV
Copying Client Files
c:\dl\sandbox\20.4.44313.45222\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.4.44313.45222\platform\LegacyDlls\program files\Microsoft Dynamics NAV
c:\dl\sandbox\20.4.44313.45222\platform\LegacyDlls\systemFolder
Copying ModernDev Files
c:\dl\sandbox\20.4.44313.45222\platform
c:\dl\sandbox\20.4.44313.45222\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\20.4.44313.45222\us\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\20.4.44313.45222\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\20.4.44313.45222\us\Extensions
Copying Applications
C:\dl\sandbox\20.4.44313.45222\platform\Applications
Copying Applications.US
C:\dl\sandbox\20.4.44313.45222\us\Applications.US
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Stopping Business Central Service Tier
Installation took 95 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.86.32 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.86.32 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.29.96.1 in container hosts file
Starting Container
Hostname is latest
PublicDnsName is latest
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 53924B53553B166D8BA9871CCB9B681189D17EDA
DNS identity latest
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Using license file 'c:\run\my\license.bclicense'
Import License
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
Container IP Address: 172.29.110.247
Container Hostname  : latest
Container Dns Name  : latest
Web Client          : http://latest/BC/
Dev. Server         : http://latest
Dev. ServerInstance : BC
Setting latest to 172.29.110.247 in host hosts file

Files:
http://latest:8080/ALLanguage.vsix

Container Total Physical Memory is 31.8Gb
Container Free Physical Memory is 5.3Gb

Initialization took 77 seconds
Ready for connections!
Reading CustomSettings.config from latest
Creating Desktop Shortcuts for latest
Creating .net Assembly Reference Folder for VS Code
Copying DLLs from C:\Windows\assembly to assemblyProbingPath
Copying DLLs from C:\Windows\Microsoft.NET\assembly to assemblyProbingPath
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\200\Service to assemblyProbingPath
Copying DLLs from C:\Program Files (x86)\Microsoft Dynamics NAV\200\RoleTailored Client to assemblyProbingPath
Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
Copying DLLs from C:\Program Files (x86)\Open XML SDK to assemblyProbingPath
Container latest successfully created

Use:
Get-BcContainerEventLog -containerName latest to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName latest to get debug information about the container
Enter-BcContainer -containerName latest to open a PowerShell prompt inside the container
Remove-BcContainer -containerName latest to remove the container again
docker logs latest to retrieve information about URL's again
...

Screenshots If applicable, add screenshots to help explain your problem.

Additional context

freddydk commented 2 years ago

did you clear cookies etc.? or try in-private?

mattkeyeswc commented 2 years ago

Hi freddy, yes, I tried it in a private browser as well to the same effect. Could it have anything to do with the Windows Firewall settings within the container perhaps?

mattkeyeswc commented 2 years ago

Hi Freddy, my apologies - I'm not sure what happened, but I restarted my machine and everything is now working. Strange, but obviously not an issue here