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 244 forks source link

Cannot convert value " " to type "System.Int32". Error: "Input string was not in a correct format." #2804

Closed boych83 closed 8 months ago

boych83 commented 1 year ago

The issue happened on all containers at the same day on PC which our new college using for local development. Script and output is for v21 container only. The initial run worked normally. Once our DB was restored, initialization was fine as well, and so were the following until the same initialization error occurred: Cannot convert value " " to type "System.Int32". Error: "Input string was not in a correct format." on all containers.

NavContainerHelper is version 4.0.6 Host is Microsoft Windows 10 Enterprise - 10.0.19044 Build 19044 Docker Client Version is 20.10.21 Docker Server Version is 20.10.21

Scripts used to create container and cause the issue

Install-Module -Name bccontainerhelper -Force
$artifactUrl = Get-BCArtifactUrl -country "w1" -version 21.0.46256.46853 -storageAccount bcartifacts -type OnPrem
$licenseFile = 'C:\BC\Licenses\v21.flf'
$credential = New-Object pscredential 'admin', (ConvertTo-SecureString -String 'P@ssw0rd!.' -AsPlainText -Force)
$containerName = 'bc210-46853'

New-BcContainer `
    -accept_eula `
    -isolation 'hyperv' `
    -accept_outdated `
    -containerName $containerName `
    -artifactUrl $artifactUrl `
    -licenseFile $licenseFile `
    -auth NavUserPassword `
    -Credential $credential `
    -shortCuts DesktopFolder `
    -memoryLimit 8G `
    -updateHosts `
    -multitenant:$false

Full output of scripts

2022-11-07T12:58:12.519036000Z  Using artifactUrl https://bcartifacts.azureedge.net/onprem/21.0.46256.46853/w1
2022-11-07T12:58:12.684194900Z  Using installer from C:\Run\210-new
2022-11-07T12:58:12.877848400Z  Installing Business Central
2022-11-07T12:58:12.885851200Z  Installing from artifacts
2022-11-07T12:58:12.896850800Z  Starting Local SQL Server
2022-11-07T12:58:14.909229200Z  Starting Internet Information Server
2022-11-07T12:58:15.253435700Z  Copying Service Tier Files
2022-11-07T12:58:15.260988400Z  c:\dl\onprem\21.0.46256.46853\platform\ServiceTier\Program Files
2022-11-07T12:58:16.099883000Z  c:\dl\onprem\21.0.46256.46853\platform\ServiceTier\System64Folder
2022-11-07T12:58:16.123605400Z  Copying PowerShell Scripts
2022-11-07T12:58:16.124285600Z  c:\dl\onprem\21.0.46256.46853\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
2022-11-07T12:58:16.163159700Z  c:\dl\onprem\21.0.46256.46853\platform\WindowsPowerShellScripts\WebSearch
2022-11-07T12:58:16.181429000Z  Copying Web Client Files
2022-11-07T12:58:16.182255300Z  c:\dl\onprem\21.0.46256.46853\platform\WebClient\Microsoft Dynamics NAV
2022-11-07T12:58:17.991911300Z  Copying ModernDev Files
2022-11-07T12:58:17.997050000Z  c:\dl\onprem\21.0.46256.46853\platform
2022-11-07T12:58:18.016148700Z  c:\dl\onprem\21.0.46256.46853\platform\ModernDev\program files\Microsoft Dynamics NAV
2022-11-07T12:58:18.197266600Z  Copying additional files
2022-11-07T12:58:18.205022100Z  Copying ConfigurationPackages
2022-11-07T12:58:18.205022100Z  C:\dl\onprem\21.0.46256.46853\platform\ConfigurationPackages
2022-11-07T12:58:18.231429200Z  Copying Test Assemblies
2022-11-07T12:58:18.233936800Z  C:\dl\onprem\21.0.46256.46853\platform\Test Assemblies
2022-11-07T12:58:18.259321500Z  Copying Applications
2022-11-07T12:58:18.259321500Z  C:\dl\onprem\21.0.46256.46853\platform\Applications
2022-11-07T12:58:18.930405700Z  Copying dependencies
2022-11-07T12:58:18.945832500Z  Copying ReportBuilder
2022-11-07T12:58:30.803254600Z  Importing PowerShell Modules
2022-11-07T12:58:31.854818500Z  Restoring CRONUS Demo Database
2022-11-07T12:58:33.072678600Z  Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
2022-11-07T12:58:33.669918300Z  Modifying Business Central Service Tier Config File for Docker
2022-11-07T12:58:33.686002100Z  Creating Business Central Service Tier
2022-11-07T12:58:33.720913600Z  Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
2022-11-07T12:58:33.828538400Z  Starting Business Central Service Tier
2022-11-07T12:59:24.662798700Z  Importing license file
2022-11-07T12:59:25.015856500Z  Stopping Business Central Service Tier
2022-11-07T12:59:25.280857900Z  Installation took 72 seconds
2022-11-07T12:59:25.281377700Z  Installation complete
2022-11-07T12:59:25.308567300Z  Initializing...
2022-11-07T12:59:26.753456900Z  Setting host.docker.internal to 192.168.1.4 in container hosts file (copy from host hosts file)
2022-11-07T12:59:26.781672000Z  Setting gateway.docker.internal to 192.168.1.4 in container hosts file (copy from host hosts file)
2022-11-07T12:59:26.784225100Z  Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
2022-11-07T12:59:26.808829400Z  Setting host.containerhelper.internal to 172.27.128.1 in container hosts file
2022-11-07T12:59:26.811876500Z  Starting Container
2022-11-07T12:59:26.818479300Z  Hostname is bc210-46853
2022-11-07T12:59:26.819517400Z  PublicDnsName is bc210-46853
2022-11-07T12:59:27.257947200Z  Using NavUserPassword Authentication
2022-11-07T12:59:27.296675900Z  Creating Self Signed Certificate
2022-11-07T12:59:27.659877800Z  Self Signed Certificate Thumbprint 607A8B3D6E822A68F84BD32933D55081E10CB4BB
2022-11-07T12:59:27.679649500Z  DNS identity bc210-46853
2022-11-07T12:59:27.696527100Z  Modifying Service Tier Config File with Instance Specific Settings
2022-11-07T12:59:27.963450300Z  Starting Service Tier
2022-11-07T12:59:38.049985500Z  Registering event sources
2022-11-07T12:59:38.098272300Z  Creating DotNetCore Web Server Instance
2022-11-07T12:59:38.142432600Z  Using application pool name: BC
2022-11-07T12:59:38.147407700Z  Using default container name: NavWebApplicationContainer
2022-11-07T12:59:38.159662300Z  Copy files to WWW root C:\inetpub\wwwroot\BC
2022-11-07T12:59:39.323376900Z  Create the application pool BC
2022-11-07T12:59:39.643762000Z  Create website: NavWebApplicationContainer without SSL
2022-11-07T12:59:41.321740900Z  Update configuration: navsettings.json
2022-11-07T12:59:41.334600300Z  Done Configuring Web Client
2022-11-07T12:59:41.395457600Z  Using license file 'c:\run\my\license.flf'
2022-11-07T12:59:41.397114100Z  Import License
2022-11-07T12:59:42.114298000Z  Creating http download site
2022-11-07T12:59:42.313601600Z  Setting SA Password and enabling SA
2022-11-07T12:59:42.327807400Z  Creating admin as SQL User and add to sysadmin
2022-11-07T12:59:45.166544700Z  Creating SUPER user
2022-11-07T12:59:47.336251200Z  Container IP Address: 172.27.133.56
2022-11-07T12:59:47.336251200Z  Container Hostname  : bc210-46853
2022-11-07T12:59:47.341797000Z  Container Dns Name  : bc210-46853
2022-11-07T12:59:47.342747000Z  Web Client          : http://bc210-46853/BC/
2022-11-07T12:59:47.344248500Z  Dev. Server         : http://bc210-46853
2022-11-07T12:59:47.344769900Z  Dev. ServerInstance : BC
2022-11-07T12:59:47.366526400Z  Setting bc210-46853 to 172.27.133.56 in host hosts file
2022-11-07T12:59:47.802886600Z  
2022-11-07T12:59:47.802886600Z  Files:
2022-11-07T12:59:47.813423500Z  http://bc210-46853:8080/ALLanguage.vsix
2022-11-07T12:59:47.813943300Z  
2022-11-07T12:59:47.814921800Z  WARNING: You are running a container which is 242 days old.
2022-11-07T12:59:47.815241800Z  Microsoft recommends that you always run the latest version of our containers.
2022-11-07T12:59:47.815421500Z  
2022-11-07T12:59:47.866953700Z  Container Total Physical Memory is 8.5Gb
2022-11-07T12:59:47.869151100Z  Container Free Physical Memory is 6.4Gb
2022-11-07T12:59:47.869151100Z  
2022-11-07T12:59:47.869785600Z  Initialization took 23 seconds
2022-11-07T12:59:47.870360700Z  Ready for connections!
2022-11-08T07:39:41.371069400Z  Initializing...
2022-11-08T07:39:41.586898500Z  Setting host.docker.internal to 192.168.1.4 in container hosts file (copy from host hosts file)
2022-11-08T07:39:41.661282900Z  Setting gateway.docker.internal to 192.168.1.4 in container hosts file (copy from host hosts file)
2022-11-08T07:39:41.664760300Z  Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
2022-11-08T07:39:41.687731100Z  Setting host.containerhelper.internal to 172.27.128.1 in container hosts file
2022-11-08T07:39:41.691180300Z  Restarting Container
2022-11-08T07:39:41.694180200Z  PublicDnsName unchanged
2022-11-08T07:39:41.715310900Z  Hostname is bc210-46853
2022-11-08T07:39:41.716007300Z  PublicDnsName is bc210-46853
2022-11-08T07:39:41.716673100Z  Using NavUserPassword Authentication
2022-11-08T07:39:41.998363300Z  Starting Local SQL Server
2022-11-08T07:39:43.503230800Z  Starting Internet Information Server
2022-11-08T07:39:43.986296200Z  Starting Service Tier
2022-11-08T07:39:57.957757600Z  Container IP Address: 172.27.131.171
2022-11-08T07:39:57.958805600Z  Container Hostname  : bc210-46853
2022-11-08T07:39:57.959780000Z  Container Dns Name  : bc210-46853
2022-11-08T07:39:57.960298500Z  Web Client          : http://bc210-46853/BC/
2022-11-08T07:39:57.963470400Z  Dev. Server         : http://bc210-46853
2022-11-08T07:39:57.964479900Z  Dev. ServerInstance : BC
2022-11-08T07:39:57.992169800Z  Setting bc210-46853 to 172.27.131.171 in host hosts file
2022-11-08T07:39:57.997827400Z  
2022-11-08T07:39:58.000909600Z  Files:
2022-11-08T07:39:58.008478600Z  http://bc210-46853:8080/ALLanguage.vsix
2022-11-08T07:39:58.009586200Z  
2022-11-08T07:39:58.031955000Z  Container Total Physical Memory is 8.5Gb
2022-11-08T07:39:58.032504600Z  Container Free Physical Memory is 7.1Gb
2022-11-08T07:39:58.033566200Z  
2022-11-08T07:39:58.040007800Z  Initialization took 17 seconds
2022-11-08T07:39:58.040302400Z  Ready for connections!

.....

2022-11-22T06:22:35.505200500Z  Initializing...
2022-11-22T06:22:35.875410500Z  Setting host.docker.internal to 192.168.1.100 in container hosts file (copy from host hosts file)
2022-11-22T06:22:35.915120700Z  Setting gateway.docker.internal to 192.168.1.100 in container hosts file (copy from host hosts file)
2022-11-22T06:22:35.925699000Z  Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
2022-11-22T06:22:35.945831100Z  Setting host.containerhelper.internal to 172.31.224.1 in container hosts file
2022-11-22T06:22:35.947980600Z  Restarting Container
2022-11-22T06:22:35.950626400Z  PublicDnsName unchanged
2022-11-22T06:22:35.961078700Z  Hostname is bc210-46853
2022-11-22T06:22:35.961582500Z  PublicDnsName is bc210-46853
2022-11-22T06:22:35.962082100Z  Using NavUserPassword Authentication
2022-11-22T06:22:36.154682500Z  Starting Local SQL Server
2022-11-22T06:22:37.433873200Z  Starting Internet Information Server
2022-11-22T06:22:37.941423100Z  Starting Service Tier
2022-11-22T06:22:59.843110000Z  Container IP Address: 172.31.225.236
2022-11-22T06:22:59.843110000Z  Container Hostname  : bc210-46853
2022-11-22T06:22:59.844095200Z  Container Dns Name  : bc210-46853
2022-11-22T06:22:59.844591600Z  Web Client          : http://bc210-46853/BC/
2022-11-22T06:22:59.846589200Z  Dev. Server         : http://bc210-46853
2022-11-22T06:22:59.847091700Z  Dev. ServerInstance : BC
2022-11-22T06:22:59.875042600Z  Setting bc210-46853 to 172.31.225.236 in host hosts file
2022-11-22T06:22:59.881537000Z  
2022-11-22T06:22:59.882515600Z  Files:
2022-11-22T06:22:59.888048400Z  http://bc210-46853:8080/ALLanguage.vsix
2022-11-22T06:22:59.888560000Z  
2022-11-22T06:22:59.906684100Z  Container Total Physical Memory is 8.5Gb
2022-11-22T06:22:59.911733200Z  Container Free Physical Memory is 6.6Gb
2022-11-22T06:22:59.911733200Z  
2022-11-22T06:22:59.921524200Z  Initialization took 24 seconds
2022-11-22T06:22:59.921971500Z  Ready for connections!
2022-11-22T06:36:08.583097600Z  Initializing...
2022-11-22T06:36:08.936268700Z  Setting host.docker.internal to 192.168.1.100 in container hosts file (copy from host hosts file)
2022-11-22T06:36:08.991570100Z  Setting gateway.docker.internal to 192.168.1.100 in container hosts file (copy from host hosts file)
2022-11-22T06:36:09.000746700Z  Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
2022-11-22T06:36:09.039940800Z  Setting host.containerhelper.internal to 192.168.128.1 in container hosts file
2022-11-22T06:36:09.043013200Z  Restarting Container
2022-11-22T06:36:09.047093000Z  PublicDnsName unchanged
2022-11-22T06:36:09.098443500Z  Cannot convert value "   " to type "System.Int32". Error: "Input string was not in a correct format."
2022-11-22T06:36:09.101000900Z  at <ScriptBlock>, C:\Run\navstart.ps1: line 44
2022-11-22T06:36:09.101000900Z  at <ScriptBlock>, C:\Run\start.ps1: line 384
2022-11-22T06:36:09.101000900Z  at <ScriptBlock>, <No file>: line 1
...

Full output of docker inspect

[
    {
        "Id": "04f9dc3773cc8b4b84dbe3c8accd99d3dc03e5dca1d61720ab679aa636ad3ae8",
        "Created": "2022-11-07T12:58:08.006305Z",
        "Path": "powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; .\\Run\\start.ps1",
        "Args": [],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 1364,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2022-11-24T07:55:11.3269524Z",
            "FinishedAt": "2022-11-23T15:40:38.7697609+01:00",
            "Health": {
                "Status": "healthy",
                "FailingStreak": 0,
                "Log": [
                    {
                        "Start": "2022-11-24T11:47:33.4410191+01:00",
                        "End": "2022-11-24T11:47:33.8111448+01:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2022-11-24T11:48:03.8206874+01:00",
                        "End": "2022-11-24T11:48:04.206132+01:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2022-11-24T11:48:34.2194472+01:00",
                        "End": "2022-11-24T11:48:34.602338+01:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2022-11-24T11:49:04.6094409+01:00",
                        "End": "2022-11-24T11:49:05.0551709+01:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2022-11-24T11:49:35.0898006+01:00",
                        "End": "2022-11-24T11:49:35.4686882+01:00",
                        "ExitCode": 0,
                        "Output": ""
                    }
                ]
            }
        },
        "Image": "sha256:fb67a71dbb1c6f16d8cab7f6d18f772330815c9203f72d93662730b1cfc848a3",
        "ResolvConfPath": "",
        "HostnamePath": "",
        "HostsPath": "",
        "LogPath": "C:\\ProgramData\\Docker\\containers\\04f9dc3773cc8b4b84dbe3c8accd99d3dc03e5dca1d61720ab679aa636ad3ae8\\04f9dc3773cc8b4b84dbe3c8accd99d3dc03e5dca1d61720ab679aa636ad3ae8-json.log",
        "Name": "/bc210-46853",
        "RestartCount": 0,
        "Driver": "windowsfilter",
        "Platform": "windows",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": [
            "6af33264b62510953495d377e629dad1417e3b70ecc3398ba49ab668447fbd04"
        ],
        "HostConfig": {
            "Binds": [
                "c:\\bcartifacts.cache:c:\\dl",
                "C:\\ProgramData\\BcContainerHelper:C:\\ProgramData\\BcContainerHelper",
                "C:\\ProgramData\\BcContainerHelper\\Extensions\\bc210-46853\\my:C:\\Run\\my",
                "c:\\windows\\system32\\drivers\\etc:C:\\driversetc"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "unless-stopped",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "CgroupnsMode": "",
            "Dns": [],
            "DnsOptions": [],
            "DnsSearch": [],
            "ExtraHosts": null,
            "GroupAdd": null,
            "IpcMode": "",
            "Cgroup": "",
            "Links": null,
            "OomScoreAdj": 0,
            "PidMode": "",
            "Privileged": false,
            "PublishAllPorts": false,
            "ReadonlyRootfs": false,
            "SecurityOpt": null,
            "UTSMode": "",
            "UsernsMode": "",
            "ShmSize": 0,
            "ConsoleSize": [
                0,
                0
            ],
            "Isolation": "hyperv",
            "CpuShares": 0,
            "Memory": 8589934592,
            "NanoCpus": 0,
            "CgroupParent": "",
            "BlkioWeight": 0,
            "BlkioWeightDevice": [],
            "BlkioDeviceReadBps": null,
            "BlkioDeviceWriteBps": null,
            "BlkioDeviceReadIOps": null,
            "BlkioDeviceWriteIOps": null,
            "CpuPeriod": 0,
            "CpuQuota": 0,
            "CpuRealtimePeriod": 0,
            "CpuRealtimeRuntime": 0,
            "CpusetCpus": "",
            "CpusetMems": "",
            "Devices": [],
            "DeviceCgroupRules": null,
            "DeviceRequests": null,
            "KernelMemory": 0,
            "KernelMemoryTCP": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": null,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "dir": "C:\\ProgramData\\Docker\\windowsfilter\\04f9dc3773cc8b4b84dbe3c8accd99d3dc03e5dca1d61720ab679aa636ad3ae8"
            },
            "Name": "windowsfilter"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "c:\\bcartifacts.cache",
                "Destination": "c:\\dl",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\windows\\system32\\drivers\\etc",
                "Destination": "c:\\driversetc",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\programdata\\bccontainerhelper",
                "Destination": "c:\\programdata\\bccontainerhelper",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\programdata\\bccontainerhelper\\extensions\\bc210-46853\\my",
                "Destination": "c:\\run\\my",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "bc210-46853",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "1433/tcp": {},
                "443/tcp": {},
                "7045/tcp": {},
                "7046/tcp": {},
                "7047/tcp": {},
                "7048/tcp": {},
                "7049/tcp": {},
                "7083/tcp": {},
                "80/tcp": {},
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "databaseServer=",
                "filesOnly=False",
                "securePassword=76492d1116743f0423413b16050a5345MgB8AGoAUgBYADgAYQBLAEgAUgA4AGQAMgBsAFMANgBzAEkARABqAEcAOQBhAHcAPQA9AHwAZABiADUANQAwAGMANwBiAGYAOABlADgANAAwAGIANgA2ADcANAA1ADAANQA2ADYAZQAzADUANQA1ADQAZgA0ADIAYwBjAGYAZQA0ADEANQAxAGQAZAA3ADAANgA5ADAANQA2AGIANgBkAGMAMwAzADEAMAA1ADkAOQBmAGIAZAA=",
                "accept_outdated=Y",
                "databaseInstance=",
                "isBcSandbox=N",
                "artifactUrl=https://bcartifacts.azureedge.net/onprem/21.0.46256.46853/w1",
                "licenseFile=c:\\run\\my\\license.flf",
                "auth=NavUserPassword",
                "username=admin",
                "locale=en-US",
                "passwordKeyFile=c:\\run\\my\\aes.key",
                "ExitOnError=N",
                "enableApiServices=Y",
                "useSSL=N",
                "removePasswordKeyFile=Y",
                "accept_eula=Y",
                "DOTNET_RUNNING_IN_CONTAINER=true",
                "COMPLUS_NGenProtectedProcess_FeatureEnabled=0"
            ],
            "Cmd": [
                "powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; .\\Run\\start.ps1"
            ],
            "Healthcheck": {
                "Test": [
                    "CMD",
                    "powershell",
                    ".\\Run\\HealthCheck.ps1"
                ],
                "Interval": 30000000000,
                "Timeout": 10000000000
            },
            "ArgsEscaped": true,
            "Image": "mcr.microsoft.com/businesscentral:10.0.19041.1415",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "country": "w1",
                "created": "202208181254",
                "eula": "https://go.microsoft.com/fwlink/?linkid=861843",
                "maintainer": "Dynamics SMB",
                "nav": "",
                "osversion": "10.0.19041.1415",
                "platform": "21.0.46384.46844",
                "tag": "1.0.2.13",
                "version": "21.0.46256.46853"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "04f9dc3773cc8b4b84dbe3c8accd99d3dc03e5dca1d61720ab679aa636ad3ae8",
            "HairpinMode": false,
            "LinkLocalIPv6Address": "",
            "LinkLocalIPv6PrefixLen": 0,
            "Ports": {
                "1433/tcp": null,
                "443/tcp": null,
                "7045/tcp": null,
                "7046/tcp": null,
                "7047/tcp": null,
                "7048/tcp": null,
                "7049/tcp": null,
                "7083/tcp": null,
                "80/tcp": null,
                "8080/tcp": null
            },
            "SandboxKey": "04f9dc3773cc8b4b84dbe3c8accd99d3dc03e5dca1d61720ab679aa636ad3ae8",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "nat": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "a618480efd2374d1a6ddfb908d5852dce07d1f58867c8df750e32880fe3cf665",
                    "EndpointID": "015a6af27be43131b633f47b838de5c56f9522f19f0ee53df6c6fc38f6dd9b6a",
                    "Gateway": "172.31.240.1",
                    "IPAddress": "172.31.253.198",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "00:15:5d:34:15:63",
                    "DriverOpts": null
                }
            }
        }
    }
]
kine commented 1 year ago

I will just add link to the twitter with one answer: https://twitter.com/Sc00Fi/status/1595348091909070848 (if it worked)

boych83 commented 1 year ago

Hi @kine, I'm the same person :) If you look, I linked this issue in a Twitter thread. @freddydk insisted that I report it here along with the rest of the information required by the template.

freddydk commented 1 year ago

Did you find a solution to this issue? or is the issue still happening?

Looking in the output, it looks like there is a delay between the "Ready for connections!" and the following Initializing

2022-11-07T12:59:47.869151100Z  Container Free Physical Memory is 6.4Gb
2022-11-07T12:59:47.869151100Z  
2022-11-07T12:59:47.869785600Z  Initialization took 23 seconds
2022-11-07T12:59:47.870360700Z  Ready for connections!
2022-11-08T07:39:41.371069400Z  Initializing...
2022-11-08T07:39:41.586898500Z  Setting host.docker.internal to 192.168.1.4 in container hosts file (copy from host hosts file)
2022-11-08T07:39:41.661282900Z  Setting gateway.docker.internal to 192.168.1.4 in container hosts file (copy from host hosts file)
2022-11-08T07:39:41.664760300Z  Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)

and also here:

2022-11-22T06:22:59.911733200Z  
2022-11-22T06:22:59.921524200Z  Initialization took 24 seconds
2022-11-22T06:22:59.921971500Z  Ready for connections!
2022-11-22T06:36:08.583097600Z  Initializing...
2022-11-22T06:36:08.936268700Z  Setting host.docker.internal to 192.168.1.100 in container hosts file (copy from host hosts file)
2022-11-22T06:36:08.991570100Z  Setting gateway.docker.internal to 192.168.1.100 in container hosts file (copy from host hosts file)
2022-11-22T06:36:09.000746700Z  Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)

Do you know what happens here? Did this happen after he restarted his computer? or updated docker?

boych83 commented 1 year ago

Hi @freddydk

At that time, we solved by manually changing the value. Since then everything has been working without a problem. At that time it was set up as a new laptop. Everything worked as expected for some days. One day in the morning (immediately after the fresh start ) this error showed up in the logs. It might be related to some win/docker upgrades, but I can't confirm.

BR, Bojan

freddydk commented 1 year ago

Ok, will close this issue - and see if this ever re-appears. Thanks

KristofKlein commented 1 year ago

Hi,

I have seen this now lately also several times... I can not really tell when this happens, but I know the cause fir this. the restartcounter.txt file and its content....in some strange cases it is empty or even includes some "strange" characters ... this leads to the can not convert to integer...we fix this most likely by just editing the file to include a 1 or 0 and containers are starting normal again. So, to mitigate this in the future a change to script could help to treat an non int value different ?!

freddydk commented 1 year ago

I will try to add some resilience to this

KristofKlein commented 1 year ago

perfect. And sorry for reopening! That was not my intention - I was just too stupid to check the status before hitting the send button :D

freddydk commented 1 year ago

:-) - the reopen was me - I pressed the button manually:-)