-
-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: MSSQL Container crashes on Ubuntu 24.04 (Colima) #1248
Comments
I think it's actually related to So this seems to be a problem when MSSQL is running on Ubuntu 24.04 which colima apparently is:
|
How much memory does your Colima VM have? Increase it to at least 2GB maybe even 4GB.
The regression from MS is already addressed in: #1221. |
@HofmeisterAn I start it with |
👍 I noticed the |
Can't you enable the Virtualization Framework and (install) Rosetta 2 using Docker Desktop?
As mentioned, this issue has been resolved. There are two workarounds available: #1220 (comment) and one of them you are already kind of using.
Since the container already crashes when using the CLI, I don't think this is specifically a Testcontainers issue. Microsoft or Colima will likely need to address the issue to fix it for older versions. I don't think there's much more I can help with, so I would prefer to close the issue. |
oh, I actually tried to find that information, but I couldn’t find a list with hashed to compare.
hmm, that is actually an interesting idea. I will try that. I think docker desktop even has a config flag for this. My colleague started this and I think he also found references to Colima in the testcontainers docs.
Yes and know. From what I read, the problem is on mssql side. Colima just uses latest Ubuntu LTS. Mssql does some crazy stuff with memory management always has issues when the kernel changes. coming back to testcontainers, as I found a way to get it working and I don’t know how long it will take for MS to fix it, I though my hacky changes could find its way into the next release. as you mentioned, the mstools thing is fixed, so it would only be picking the right CU version. |
I don't think there are any tasks left. Everything should be addressed in the next release. I'll go ahead and close the issue. If I misunderstood anything, feel free to reopen it.
As long as you're not depending on an old version, let's hope it gets fixed overall 🤞. |
Just for reference, this does not work. There are a lot of post explaining that as of now you need to use colima to run the oracle on mac. I also just tried it with Docker Desktop and rosetta enabled but the container crashes.
Which version of the MSSQL image will be used for the next release? |
We do not bump module versions to avoid breaking tests for existing Testcontainers users. We recommend that users pin the version according to their needs. Just set and override the image/version using |
The advise to pin a version has been around for like forever. I suggest to change the pinned version in the library to a version that it known to work, and everybody that did not pin it, might get an error. Like |
Testcontainers version
3.9.0
Using the latest Testcontainers version?
Yes
Host OS
MacOS
Host arch
ARM
.NET version
8.0.302
Docker version
Client: Cloud integration: v1.0.35+desktop.10 Version: 25.0.2 API version: 1.44 Go version: go1.21.6 Git commit: 29cf629 Built: Thu Feb 1 00:18:45 2024 OS/Arch: darwin/arm64 Context: colima Server: Docker Engine - Community Engine: Version: 27.1.1 API version: 1.46 (minimum version 1.24) Go version: go1.21.12 Git commit: cc13f95 Built: Tue Jul 23 19:57:14 2024 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.7.19 GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41 runc: Version: 1.7.19 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
Due to the fact that the Oracle XE test container is only available for x64 architectures ATM, we needed to use Colima. The oracle container works fine but the MSSQL does not start, when I just run the used image, I can see the following errors:
Now, when I use
mcr.microsoft.com/mssql/server:latest
, it works (starting the container). I don't know which version "latest" actually is as the most recent version2019-CU27-ubuntu-20.04
does NOT work some reason.,However, this version is not compatible with the test container code.
To eventually get it running, I needed to change the wait strategy (notice the "-C" and the "mssql-tools18"):
Same when executing commands:
So, with this rather ugly hack and hardcoding the credentials, the test container starts and my tests work.
So, would it be possible to update to the latest mssql container version and adjust the exec commands? I could provide a PR for the changes, if it helps.
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: