AdvaniaGIT icon indicating copy to clipboard operation
AdvaniaGIT copied to clipboard

After restarting docker container Start-FinSQL.ps1 cannot start Object Desinger

Open jaan-tasane opened this issue 6 years ago • 13 comments

When I create a new nav 2018 environment with Advania: Build NAV Environment command and run the docker container, I can start finsql.exe with AdvaniaGitAction "Start-FinSql.ps1". After I restart the container I cannot start finsql.exe anymore although container ID is updated in BranchSettings.json.

Running AdvaniaGitAction "Start-FinSql.ps1" end with error: System.Net.WebException The operation has timed out.

jaan-tasane avatar Dec 18 '18 10:12 jaan-tasane

I keep getting the same error, if I use Start-FINSQL and Start-WebClient, whereas it (sometimes) works fine when using Start-Client. But is seems a bit inconsistent when it work and when not. Can it be a memory issue?

OS: Windows Server 2019, Docker: 18.09.3 NCH: 0.5.0.8

epernst avatar Mar 20 '19 09:03 epernst

I think this is a timeout issue for the web query I use to check if the environment is running.

gunnargestsson avatar Apr 15 '19 12:04 gunnargestsson

How can we adjust this time-out?

epernst avatar Apr 16 '19 06:04 epernst

Function Check-NAVServiceRunning

$result = Invoke-WebRequest -Uri "$($BranchSettings.dockerContainerName)/NAV/WebClient/Health/System" -UseBasicParsing -TimeoutSec 10

gunnargestsson avatar Apr 16 '19 06:04 gunnargestsson

@epernst Did you find solution to this issue?

Increasing TimeoutSec parameter, only forward me to another error: System.Net.WebException Unable to connect to the remote server

tomasevicstefan avatar May 14 '19 07:05 tomasevicstefan

Does the container have the Web Client installed?

gunnargestsson avatar May 14 '19 22:05 gunnargestsson

Yes, this error occurs after some time, and than you can't start finsql, web client... Remove environment and build again is one option for this issue. Maybe container running out of memory?

tomasevicstefan avatar May 15 '19 11:05 tomasevicstefan

On my new machine, with the latest AdvaniaGIT, I built environment on docker, but when I try to run finsql or web client, I'm getting error:

System.Net.WebException The operation has timed out.

Building environment again didn't solve issue.

I saw that you removed CSide environment while creating container on latest commit. Do you have any other changes that can produce issue that I have?

I'm still on Windows version 1809.

tomasevicstefan avatar Jun 27 '19 13:06 tomasevicstefan

Hi This error is from the Check-NAVEnvironment function.

I moved the includeCSide to

if ([int]($SetupParameters.navVersion).split(".")[0] -lt 15) {
    $params += @{ includeCSide = $true }
}

no CSide in version 15

gunnargestsson avatar Jun 27 '19 15:06 gunnargestsson

Hi,

Error occurs in Check-NAVServiceRunning script

Invoke command throw an error when I try to run finsql, client or web client

Invoke-WebRequest -Uri "$($BranchSettings.dockerContainerName)/$($BranchSettings.instanceName)/WebClient/Health/System" -UseBasicParsing -TimeoutSec 10

Incrising timeout property only show another error

Unable to connect to remote server

Didn't have any problem while building environment

navcontainerhelper 0.6.2.2

this is what docket inspect show

[
    {
        "Id": "794f3aef3abc2efcd3ec2a98fcd94852b327d2359f4b2265bb0404b4ab8aa223",
        "Created": "2019-06-28T06:57:30.6648239Z",
        "Path": "powershell",
        "Args": [
            "-Command",
            "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';",
            ".\\Run\\start.ps1"
        ],
        "State": {
            "Status": "running",
            "Running": true,
            "Paused": false,
            "Restarting": false,
            "OOMKilled": false,
            "Dead": false,
            "Pid": 11160,
            "ExitCode": 0,
            "Error": "",
            "StartedAt": "2019-06-28T06:57:31.7909605Z",
            "FinishedAt": "0001-01-01T00:00:00Z",
            "Health": {
                "Status": "healthy",
                "FailingStreak": 0,
                "Log": [
                    {
                        "Start": "2019-06-28T09:15:17.1421942+02:00",
                        "End": "2019-06-28T09:15:18.225924+02:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2019-06-28T09:15:48.2386727+02:00",
                        "End": "2019-06-28T09:15:49.3495115+02:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2019-06-28T09:16:19.3681315+02:00",
                        "End": "2019-06-28T09:16:20.4322781+02:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2019-06-28T09:16:50.4398247+02:00",
                        "End": "2019-06-28T09:16:51.5420138+02:00",
                        "ExitCode": 0,
                        "Output": ""
                    },
                    {
                        "Start": "2019-06-28T09:17:21.5501225+02:00",
                        "End": "2019-06-28T09:17:22.676457+02:00",
                        "ExitCode": 0,
                        "Output": ""
                    }
                ]
            }
        },
        "Image": "sha256:0175341935aec420b059a4aaae14915256c2ad6ace466b5b60c0b78b2bb90e1c",
        "ResolvConfPath": "",
        "HostnamePath": "",
        "HostsPath": "",
        "LogPath": "C:\\ProgramData\\docker\\containers\\794f3aef3abc2efcd3ec2a98fcd94852b327d2359f4b2265bb0404b4ab8aa223\\794f3aef3abc2efcd3ec2a98fcd94852b327d2359f4b2265bb0404b4ab8aa223-jso
n.log",
        "Name": "/Iceland",
        "RestartCount": 0,
        "Driver": "windowsfilter",
        "Platform": "windows",
        "MountLabel": "",
        "ProcessLabel": "",
        "AppArmorProfile": "",
        "ExecIDs": null,
        "HostConfig": {
            "Binds": [
                "C:\\ProgramData\\NavContainerHelper:C:\\ProgramData\\NavContainerHelper",
                "C:\\ProgramData\\NavContainerHelper\\Extensions\\Iceland\\my:C:\\Run\\my",
                "C:\\ProgramData\\NavContainerHelper\\Extensions\\Iceland\\Program Files:C:\\navpfiles",
                "c:\\windows\\system32\\drivers\\etc:C:\\driversetc",
                "c:\\AdvaniaGIT\\Workspace\\GIT\\al_iceland:C:\\GIT",
                "C:\\AdvaniaGIT:C:\\Host"
            ],
            "ContainerIDFile": "",
            "LogConfig": {
                "Type": "json-file",
                "Config": {}
            },
            "NetworkMode": "default",
            "PortBindings": {},
            "RestartPolicy": {
                "Name": "no",
                "MaximumRetryCount": 0
            },
            "AutoRemove": false,
            "VolumeDriver": "",
            "VolumesFrom": null,
            "CapAdd": null,
            "CapDrop": null,
            "Dns": [
                "8.8.8.8"
            ],
            "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": "process",
            "CpuShares": 0,
            "Memory": 0,
            "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,
            "DiskQuota": 0,
            "KernelMemory": 0,
            "MemoryReservation": 0,
            "MemorySwap": 0,
            "MemorySwappiness": null,
            "OomKillDisable": false,
            "PidsLimit": 0,
            "Ulimits": null,
            "CpuCount": 0,
            "CpuPercent": 0,
            "IOMaximumIOps": 0,
            "IOMaximumBandwidth": 0,
            "MaskedPaths": null,
            "ReadonlyPaths": null
        },
        "GraphDriver": {
            "Data": {
                "dir": "C:\\ProgramData\\docker\\windowsfilter\\794f3aef3abc2efcd3ec2a98fcd94852b327d2359f4b2265bb0404b4ab8aa223"
            },
            "Name": "windowsfilter"
        },
        "Mounts": [
            {
                "Type": "bind",
                "Source": "c:\\programdata\\navcontainerhelper\\extensions\\iceland\\my",
                "Destination": "c:\\run\\my",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\programdata\\navcontainerhelper\\extensions\\iceland\\program files",
                "Destination": "c:\\navpfiles",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\windows\\system32\\drivers\\etc",
                "Destination": "c:\\driversetc",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\advaniagit\\workspace\\git\\al_iceland",
                "Destination": "c:\\git",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\advaniagit",
                "Destination": "c:\\host",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Type": "bind",
                "Source": "c:\\programdata\\navcontainerhelper",
                "Destination": "c:\\programdata\\navcontainerhelper",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],
        "Config": {
            "Hostname": "Iceland",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "1433/tcp": {},
                "443/tcp": {},
                "7045/tcp": {},
                "7046/tcp": {},
                "7047/tcp": {},
                "7048/tcp": {},
                "7049/tcp": {},
                "80/tcp": {},
                "8080/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "ExitOnError=N",
                "passwordKeyFile=c:\\run\\my\\aes.key",
                "accept_eula=Y",
                "locale=is-IS",
                "databaseServer=",
                "useSSL=N",
                "accept_outdated=Y",
                "auth=Windows",
                "databaseInstance=",
                "securePassword=76492d1116743f0423413b16050a5345MgB8AHYAUgBHADIAUwBHAG8ASQA3ADkASgBiAFEASABKAHcAaAA0AEIAbAB0AEEAPQA9AHwAMwA5AGQAMABmAGEAZgAyADkAZABiAGEAZABiADkAYQBiADcAYgBkADk
AMwBmADcANAA1ADgAMQA1ADIANQBhAGUAZQA2AGIAMAAyAGEAZgA1ADgANwBmAGIAMQA0ADIAMgA1ADQANwA5AGUAZgBiAGMAZgBlAGEAZAA1ADcAMgA=",
                "username=miroslavd",
                "licenseFile=c:\\run\\my\\license.flf",
                "enableApiServices=Y",
                "removePasswordKeyFile=Y",
                "SqlTimeout=1200",
                "DatabaseName=Cronusis",
                "NAVDVDURL=https://nav2016wswe0.blob.core.windows.net/dvd/2c72c7c4-8f25-4534-8dd2-e0d86f26c606",
                "VSIXURL=https://nav2016wswe0.blob.core.windows.net/dvd/al-2.1.106654.vsix",
                "IsBcSandbox=N",
                "CountryCode=is",
                "COUNTRYURL=https://nav2016wswe0.blob.core.windows.net/dvd/fc3fe28a-89d7-4d05-b2ca-ec3085f11ac4"
            ],
            "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/onprem:13.6.29777.0-is-ltsc2019",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "country": "is",
                "created": "201904241427",
                "cu": "",
                "eula": "https://go.microsoft.com/fwlink/?linkid=861843",
                "legal": "http://go.microsoft.com/fwlink/?LinkId=837447",
                "maintainer": "Dynamics SMB",
                "nav": "",
                "osversion": "10.0.17763.437",
                "platform": "13.0.29718.0",
                "tag": "0.0.9.5",
                "version": "13.6.29777.0"
            }
        },
        "NetworkSettings": {
            "Bridge": "",
            "SandboxID": "794f3aef3abc2efcd3ec2a98fcd94852b327d2359f4b2265bb0404b4ab8aa223",
            "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,
                "80/tcp": null,
                "8080/tcp": null
            },
            "SandboxKey": "794f3aef3abc2efcd3ec2a98fcd94852b327d2359f4b2265bb0404b4ab8aa223",
            "SecondaryIPAddresses": null,
            "SecondaryIPv6Addresses": null,
            "EndpointID": "",
            "Gateway": "",
            "GlobalIPv6Address": "",
            "GlobalIPv6PrefixLen": 0,
            "IPAddress": "",
            "IPPrefixLen": 0,
            "IPv6Gateway": "",
            "MacAddress": "",
            "Networks": {
                "nat": {
                    "IPAMConfig": null,
                    "Links": null,
                    "Aliases": null,
                    "NetworkID": "7615d6bbb7d4b46ff2767dc3fc69750b4228bbcefab073268192a530eca5be56",
                    "EndpointID": "e2a942168e9906833327db4d8c5c1b2b87ac864b184c0794176067391bfc9323",
                    "Gateway": "172.30.160.1",
                    "IPAddress": "172.30.162.175",
                    "IPPrefixLen": 16,
                    "IPv6Gateway": "",
                    "GlobalIPv6Address": "",
                    "GlobalIPv6PrefixLen": 0,
                    "MacAddress": "00:15:5d:7f:6d:12",
                    "DriverOpts": null
                }
            }
        }
    }
]

tomasevicstefan avatar Jun 28 '19 07:06 tomasevicstefan

Is the web client installed inside Docker? This function is talking to the web client.

gunnargestsson avatar Jun 28 '19 11:06 gunnargestsson

Yes, everything is installed throw Build NAV Environment AdvaniaGit action. But I can't start also finsql and desktop client.

Docker container works properly.

I'm wondering is it possible that I'm missing some component on my local machine?

tomasevicstefan avatar Jun 28 '19 11:06 tomasevicstefan

Problem was in vpn client. Allow local access when using VPN should be checked.

tomasevicstefan avatar Jul 01 '19 07:07 tomasevicstefan