Open jordihayes opened 7 months ago
so the Host machines runs the SQL Server DB ? Have you added the users you provide here to the DB Server, mapped to the DB in question, and set the SQL server to allow mixed mode auth? ...oh you wrote that in the top.... check it once more :) not sure you have to map the sa user....
you can use the broken container to test a couple of things: like : can you reach the host ( ping) can you reach the SQL server invoke-sqlcmd ) you might also want to check the SQL Logs to see if the SQL server had a reason to kick the login from the user you provide.
I've the same issue, thx to @KristofKlein, first step to check some details, ping host.containerhelper.internal.
Pinging host.containerhelper.internal [172.25.240.1] with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out.
Ping statistics for 172.25.240.1: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
so I find out, hosts file in bc-container is written (name host.containerhelper.internal->172.25.240.1). Maybe the network adapter seems to be lost. Is there an idea to check the next gear?
-updateHosts causes ContainerHelper to set host.containerhelper.internal to the IP number of the gateway inside the container, which should work if you are using the default NAT network.
-updateHosts causes ContainerHelper to set host.containerhelper.internal to the IP number of the gateway inside the container, which should work if you are using the default NAT network.
Yes, I understood that too. Currently you can only install containers with Hyper-V. Is it possible that this results in an overlap in the IP address? Then that might be an explanation for why it doesn't ping for me.
If you are running Windows Server 2016, 2019 or 2022 - you can run process or hyperv isolation (with an advantage in perf to process isolation) If you are running Windows 11 - you can run process or hyperv isolation (with an advantage in perf to hyperv isolation on my machine at least) If you are running Windows 10 - you can run hyperv isolation.
The network stack is orthogonal to whether you are running process or hyperv isolation. If you run:
ipconfig /all
on the host and in the container.
then you should on the host have something like:
Which is the virtual network adapter, which your containers are using as their default gateway to connect to the outside world.
Inside the container, you should have a default gateway pointing to that IP, like:
It is important that your SQL Server listens on ALL IP addresses - not only on 127.0.0.1 or the public IP.
If host.containerhelper.internal points to the default gateway and you can ping 8.8.8.8:
Then your network stack is working. Whether you can ping the host.containerhelper.internal depends on the firewall on the host. The host firewall also needs to be open for port 1433
PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!
Describe the issue New-BCContainer with databaseparams fails at Import Encryption Key. I have installed SQL server on host, and enabled mixed mode authentication. I have created sa user in SQL Server on host. I have disabled all firewall on host.
Scripts used to create container and cause the issue
Full output of scripts
Screenshots None
Additional context Database were successfully created and restored on Host. Host is on windows 11 Pro. I have successfully ran dockers before but with SQL server express installed in docker container itself. This is 1st time attempting to create docker with connection to host sql server.