Open Alexis-MS opened 5 months ago
I'm seeing similar problem that all my existing containers that have been running since months cannot connect to my local SQLServer anymore.
When I try to setup the container new, I get the same error as mentioned above also I always use $databaseinstance=""
Hi @freddydk , this becomes a severe issue in our company because it's showing up on several of our development machines starting this Tuesday. In addition to not being able to create a new container, all my existing containers are unhealthy since Tuesday. Do you have any idea, what could be the reason?
If your existing containers started failing out of the blue, I would look at Windows Updates or updates to SQL Server. @Alexis-MS states that one instance is working - another is not - that also sounds like a configuration problem somehow and not something I can troubleshoot from here.
These updates were installed on Tuesday but I guess the problems startet already in the morning when the updates were only downloaded but not installed As I see there was a security update for the SQL-Server included - could that cause the problems?
(almost) all-clear signal... We have to blame our IT department: ... To secure company notebooks, a policy was rolled out this week that restricts incoming connections within public networks via the Windows Firewall. Public networks are usually networks of hotels, cafés and other public facilities that provide a guest WLAN. The local Docker containers on the notebooks also configured their virtual network as a "public" network. The result was, that the incoming rules of the Windows firewall regarding the Docker containers were allowed for traffic, but still blocked due to the fact that it was a public network. These settings were rolled back. ... I'm now able to create a new docker again. @Alexis-MS: I hope, this information will help you, too
But still my existing dockers are unhealthy ==> I'll try to restart the docker / docker engine / notebook again and see if that helps.
In my case it has nothing to do with what you are talking about. As soon as we manage to solve it, I will let you know here. Thanks to both of you.
Hello everyone
I am having a problem trying to create a container with the New-bccontainer helper on my local server with a secondary database instance called MSSQLSERVER2019.
In my script when I leave the $databaseinstance="" parameter empty it creates the container without problems in the main instance called MSSQLSERVER.
But when I leave the parameter $databaseinstance="MSSQLSERVER2019" with the databaseinstance where I want to create the database I get this error:
"Cannot establish a connection to the SQL Server/Database.
This could be due to one of the following reasons:
The container is created and creates a SQLEXPRES inside, also the database is created but it does not connect to the databaseinstance.
From the container if I have access to the ip of the local sql and access the port.
I have checked that the password is correct
Scripts used:
$containerName = 'TestSQL19' $hostname = $containerName $name = $containerName $licensefile = 'C:\license\container.bclicense' $auth = "UserPassword" $username = 'alexisadmon' $password = ConvertTo-SecureString 'mysecurePass' -AsPlainText -Force $credential = New-Object System.Management.Automation.PSCredential ($username, $password) $databaseusername = 'sa' $databasepassword = ConvertTo-SecureString 'mysecurePass' -AsPlainText -Force $databasecredential = New-Object System.Management.Automation.PSCredential ($databaseusername, $databasepassword)
$artifactUrl = Get-BCArtifactUrl -country es -type OnPrem -version 22 -select Latest get-variable -name artifactUrl -valueonly
$databaseParams = @{ "databaseServer" = 'host.containerhelper.internal' "databaseInstance" = 'MSSQLSERVER19' "databasePrefix" = "$containerName" "databaseName" = '_' "databaseCredential" = $databasecredential "multitenant" = $false }
VARIABLES TRAEFIK****
$externaldns = 'myexternal.dns.example' $restPart = "/${name}rest/" $soapPart = "/${name}soap/" $devPart = "/${name}dev/" $dlPart = "/${name}dl/" $webclientPart = "/$name/" $baseUrl = "https://$externaldns" $restUrl = $baseUrl + $restPart $soapUrl = $baseUrl + $soapPart $webclientUrl = $baseUrl + $webclientPart
$customNavSettings = "customnavsettings=PublicODataBaseUrl=$restUrl,PublicSOAPBaseUrl=$soapUrl,PublicWebBaseUrl=$webclientUrl" $webclientRule="PathPrefix:$webclientPart" $soapRule="PathPrefix:${soapPart};ReplacePathRegex: ^${soapPart}(.) /BC/WS/`$1" $restRule="PathPrefix:${restPart};ReplacePathRegex: ^${restPart}(.) /BC/OData/
$1" $devRule="PathPrefix:${devPart};ReplacePathRegex: ^${devPart}(.*) /BC/
$1" $dlRule="PathPrefixStrip:${dlPart}"$additionalParameters = @("--hostname $hostname", "-e webserverinstance=$name", "-e publicdnsname=$externaldns", "-e $customNavSettings", "-l
"traefik.web.frontend.rule=$webclientRule
"", "-l"traefik.web.port=80
"", "-l"traefik.soap.frontend.rule=$soapRule
"", "-l"traefik.soap.port=7047
"", "-l"traefik.rest.frontend.rule=$restRule
"", "-l"traefik.rest.port=7048
"", "-l"traefik.dev.frontend.rule=$devRule
"", "-l"traefik.dev.port=7049
"", "-l"traefik.dl.frontend.rule=$dlRule
"", "-l"traefik.dl.port=8080
"", "-l"traefik.enable=true
"", "-l"traefik.frontend.entryPoints=https
"" )VARIABLES TRAEFIK****
New-BcContainer @databaseParams -replaceExternalDatabases
-accept_eula
-accept_outdated-containerName $containerName
-artifactUrl $artifactUrl-auth $auth
-Credential $credential-licenseFile $licenseFile
-updateHosts-includeAL
-imageName 'myimage'-assignPremiumPlan
-EnableTaskScheduler:$false-memoryLimit 6G
-additionalParameters $additionalParameters ` -myScripts @("c:\traefikforbc\my\CheckHealth.ps1")BcContainerHelper is version 6.0.15 NavContainerHelper is running as administrator Host is Microsoft Windows Server 2019 Version 1809 (OS Build 17763.5458)
Can someone help me?