Open wsmelton opened 6 years ago
if you are literally using supersecret as your password it isnt meeting complexity requirements. You can run it without -d to see the output and see if there is anything useful there.
Oh, you twisted my arm...I'll release my super secret password...but all the output I get is the same.
I'm pulling down the Ubunut:latest image to just see if I can get it to run. It may be just an issue with trying to run Linux over Windows mode...
Ah ha! You are hitting this issue where Linux Containers on Windows (LCOW) is limited to max 2GB of memory. https://github.com/Microsoft/opengcs/issues/145
I wonder why the that image is an issue because this works with no issue:
docker run -it --platform linux ubuntu:latest
The vanilla ubuntu VM can probably easily run with less than 2GB of RAM. SQL Server requires 2 GB+ of RAM. The error message you see there comes from sqlservr. It's a resource prerequisite check we do on start up of the sqlservr process.
I've read that there are options to reduce the memory usage of SQL Server. Is there a way to set those via the docker env file?
You can control the amount of memory that SQL Server uses by passing the MSSQL_MEMORY_LIMIT_MB environment variable. SQL Server on Linux does need a minimum of 2GB of memory though for now.
Looks like the option to configure the VM memory is back in the more recent versions of Docker for Windows. Can you please try changing this from the default 2 GB to 4 GB or something and try running SQL Server on Linux again? Should work now.
Those options are not available under Windows Mode. I'm using the platform option to run a Linux container under Windows Mode.
I'm running into the same extremely annoying issue.
Hello, I am facing the same issue using the latest docker version( 18.09.0-ce-beta1), i can;t start sqlsrv linux contaner: "sqlservr: This program requires a machine with at least 2000 megabytes of memory." I don't what to to fix it!.Can you help me out with this one,please? Thank you!
The 2GB minimum does not seem sensible to me.
Does really empty sqlsrv needs that much memory just to start? I understand there may be some (potentially big) performance degradation for bigger tables and bigger indices, but it does not seem sensible to beef up the machine just to create a table with 20 rows for Travis build. Production (!) and fast enough MySQL/MariaDB for small web can run on 512M DigitalOcean droplet along with httpd and standard Debian.
@tomasfejfar There's a bit more to it than just simply running SQL Server. Keep in mind that SQL Server on Linux runs inside of a platform abstraction layer (PAL). More detailed reading. The additional memory required to run the PAL itself is a big part of the overall memory demands of running SQL Server in as small of a footprint as possible. On a production system with 1 TB of RAM available the extra 512MB-1 GB to run the PAL is negligible, but when you are trying to run some CI tests on as small of a footprint as possible, it's completely understandable to want to minimize the memory consumption. We're working on reducing the memory footprint, but it will take some time. Hope that provides a bit more context.
That's much more context, thanks. And the link provided me with much deeper understanding. My understanding was pretty much limited to "it's probably just C, so not much different from other RDBMS".
Any Status update on this?
Bumping this to see if anyone has looked into it or if there is a roadmap to support this eventually again.
Bumping this to see if anyone has looked into it or if there is a roadmap to support this eventually again.
We don't have anything to share at the moment. We are actively investigating how we can support this in production. Once we have support for the same, we will make a formal announcement and also update this thread.
I have the following environment within my windows 10: Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24302 Built: Fri Mar 23 08:31:36 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm
Server: Docker Engine - Community Engine: Version: 18.09.1 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:41:57 2019 OS/Arch: linux/amd64 Experimental: false
Before running the following command: docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=password' -p 1401:1433 microsoft/mssql-server-linux
I have set the limit on virtualbox for base memory to 2048 mb and it works properly
Not using vbox, using hyper-v default docker machine and will not be able to setup or push for vbox every where On Mon, Feb 11, 2019 at 2:02 PM Fatlonder notifications@github.com wrote:
I have the following environment withing my windows 10: **Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24302 Built: Fri Mar 23 08:31:36 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm
Server: Docker Engine - Community Engine: Version: 18.09.1 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:41:57 2019 OS/Arch: linux/amd64 Experimental: false**
Before running the following command: docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=password' -e 'MSSQL_MEMORY_LIMIT_MB = 4000m' -p 1401:1433 microsoft/mssql-server-linux
I have set the limit on virtualbox for base memory to 2048 mb and it works properly
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/mssql-docker/issues/293#issuecomment-462451734, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgvXOQntV2dSj_ocMPh-XcXVOTSVWk3ks5vMb5CgaJpZM4TeDRZ .
Not using vbox, using hyper-v default docker machine and will not be able to setup or push for vbox every where … On Mon, Feb 11, 2019 at 2:02 PM Fatlonder @.*> wrote: I have the following environment withing my windows 10: Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24302 Built: Fri Mar 23 08:31:36 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm Server: Docker Engine - Community Engine: Version: 18.09.1 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:41:57 2019 OS/Arch: linux/amd64 Experimental: false* Before running the following command: docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=password' -e 'MSSQL_MEMORY_LIMIT_MB = 4000m' -p 1401:1433 microsoft/mssql-server-linux* I have set the limit on virtualbox for base memory to 2048 mb and it works properly — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#293 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgvXOQntV2dSj_ocMPh-XcXVOTSVWk3ks5vMb5CgaJpZM4TeDRZ .
Can't you change the memory limit on hyper-v as well? I guess there should be an option
You have to change them using docker flags with Linux containers but when you are using mixed mode containers I.e. windows containers along side Linux containers
Docker throws an error saying that memory resource allocation is not supported On Fri, Feb 15, 2019 at 4:27 PM Fatlonder notifications@github.com wrote:
Not using vbox, using hyper-v default docker machine and will not be able to setup or push for vbox every where … <#m-636101805999469629> On Mon, Feb 11, 2019 at 2:02 PM Fatlonder @.**> wrote: I have the following environment withing my windows 10: Client: Version: 18.03.0-ce API version: 1.37 Go version: go1.9.4 Git commit: 0520e24302 Built: Fri Mar 23 08:31:36 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm Server: Docker Engine - Community Engine: Version: 18.09.1 API version: 1.39 (minimum version 1.12) Go version: go1.10.6 Git commit: 4c52b90 Built: Wed Jan 9 19:41:57 2019 OS/Arch: linux/amd64 Experimental: false Before running the following command: docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=password' -e 'MSSQL_MEMORY_LIMIT_MB = 4000m' -p 1401:1433 microsoft/mssql-server-linux* I have set the limit on virtualbox for base memory to 2048 mb and it works properly — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#293 (comment) https://github.com/Microsoft/mssql-docker/issues/293#issuecomment-462451734>, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgvXOQntV2dSj_ocMPh-XcXVOTSVWk3ks5vMb5CgaJpZM4TeDRZ .
Can't you change the memory limit on hyper-v as well? I guess there should be an option
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/mssql-docker/issues/293#issuecomment-464206740, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgvXHB9OKTivoryK7NMrFc3obfqIhKgks5vNyZTgaJpZM4TeDRZ .
Hi,
Any updates on this issue with Windows mixed containers?
👍 on not working in mixed mode Windows containers, no (apparent) way of increasing the Docker VM memory
Got tired of waiting and refocused effort in getting kubernetes cluster in azure working :/ On Fri, Mar 22, 2019 at 12:41 AM Simon notifications@github.com wrote:
+1 on not working in mixed mode Windows containers, no (apparent) way of increasing the Docker VM memory
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Microsoft/mssql-docker/issues/293#issuecomment-475491989, or mute the thread https://github.com/notifications/unsubscribe-auth/ACgvXKsR8B8bhUR0JsXq5ZnxbbaaMDzJks5vZF7-gaJpZM4TeDRZ .
@wsmelton
I made a docker image that works around this memory (limitation) policy: https://github.com/justin2004/mssql_server_tiny
ı waste lots of time about this issue and ı couldnt find any solution. maybe @justin2004 ' image can solve this problem .. Does anyone try this ?
I had the same issue. Here is what I did to solve it:
In the Windows Docker app right click and switch to Linux container
Open Settings and select Advanced (make it 3g)
then just run in bash or powershell: docker run --name demoSQLServer \ -p 1431:1433 \ -e "ACCEPT_EULA=Y" \ -e "SA_PASSWORD=1qaz.@WSX" \ -d microsoft/mssql-server-linux:latest
@justin2004 I just came back to see if there was any status changes on this since my post last year and I see your branch as a viable Option. Again a lot of people do not realize that the issue is when they are trying to run mixed containers (linux containers running in windows mode with LCOW). Anyways, Justin I am going to pull your branch and see if I can implement your solution as one viable way to get it running in a container in linux running in mixed mode for windows
FWIW, the --memory option now works in my environment:
docker run --memory=2G -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@ssword12345' -p 1433:1433 mcr.microsoft.com/mssql/server
My environment:
PS C:\> [System.Environment]::OSVersion
Platform ServicePack Version VersionString
-------- ----------- ------- -------------
Win32NT 10.0.18362.0 Microsoft Windows NT 10.0.18362.0
PS C:\> docker version Client: Docker Engine - Enterprise
Version: 19.03.0
API version: 1.40
Go version: go1.12.5
Git commit: 7c57940
Built: Wed Jun 12 09:43:47 2019
OS/Arch: windows/amd64
Experimental: true
Server: Docker Engine - Enterprise
Engine:
Version: 19.03.0
API version: 1.40 (minimum version 1.24)
Go version: go1.12.5
Git commit: 7c57940
Built: Wed Jun 12 09:57:40 2019
OS/Arch: windows/amd64
Experimental: true
PS C:\>
@jsandquist where did you get 19.03.0? Is it Edge channel?
@ggirard07 Not Edge channel - but a recent Enterprise Edition download from https://hub.docker.com/editions/community/docker-desktop-ent
I have not yet looked at the Community Edition.
The current implementation does not allow mcr.microsoft.com/mssql/server to start on Azure machine that actually had 2 GiB RAM (sizes A1v1, B1ms, F1s, etc.) because the machine reports just 1949872k total memory.
The 2 GiB DigitalOcean VM reports 2041328k total memory, and the container starts with no issues.
It looks like by "2000 megabytes" Microsoft actually means 200,000,000 bytes, and if kernel happens to take more than 140 MB RAM (like it now does on Azure VMs) - SQL Server will not start.
@skand888
I've started sqlserver on a machine with just 512 MB of RAM using: https://github.com/justin2004/mssql_server_tiny
@skand888
I've started sqlserver on a machine with just 512 MB of RAM using: https://github.com/justin2004/mssql_server_tiny
Yes, I've seen your solution above, but I am somewhat worried for possible consequences because it will allow it to start on a machine with any amount of RAM and behaviour might be unpredictable. But if no other solution is found - we will probably use a modification of your solutions.
BTW, I noticed that you use 1024l 1024l 1024l 2l, while 1000l 1000l 1000l 2l should probably be enough.
@skand888
behaviour might be unpredictable.
we already know what would happen if physical RAM was low enough -- i'm sure you'd see lots of page faulting and kswapd would be busy, and things would take longer and maybe even timeout by wallclock time, same as any other application. but that is the price we pay with diminishing physical RAM.
BTW, I noticed that you use 1024l 1024l 1024l 2l, while 1000l 1000l 1000l 2l should probably be enough.
probably. if you test it i'll accept your pull request.
@justin2004
We decided to go with your elegant solution with a couple of small updates. I've created pull request. Thank you for the solution!
Any Status update on this?
Is this yet more evidence that Microsoft care only about the development experience of Windows users? Sadly a predictable part of working within this sphere.
@LukeCarrier I don't think that's fair. MS is doing a lot for Linux development. I can imagine that porting database engine that used many low level Windows functions to work with the Linux kernel reliably is no small feat.
When you spend every minute of your work day wrestling elements of the Microsoft ecosystem into playing nicely with the wider world your ability to empathise with the teams shipping releases with major regressions day after day wanes somewhat.
Everything is very much Windows-first. If Microsoft don't care about the experience for those of us outside of that niche, they should do one of two things:
Just look at how little regard there is for customers of this platform in this very GitHub repo. A similar disinterest and, at times, outright hostility, meets customers trying to get feedback into product groups via Azure too.
I'm sorry, but I don't buy that Microsoft is open enough to support these platforms.
So, we let this issue just fade into the nether without any solution or is it just me? 🤔
I am experiencing the same problem with latest WSL2 and Docker in mixed mode (Windows Containers with experimental
setting). I tried setting the memory into .wslconfig
file, but I still get that error.
I guess it is a dead-end 🤷♂️
@totollygeek
there is a workaround here: https://github.com/justin2004/mssql_server_tiny
it works in linux distros. maybe it will work in WSL?
@justin2004
Well, I manage to workaround it, using deprecated functionality as the deploy
tags in docker-compose.yaml
and give 3GB of memory to the container. It works then, but it is kinda ugly I guess.
I was with the same problem.
To fix it, execute:
docker-machine stop
docker-machine ls (get name)
docker-machine inspect <NAME>
take a look StorePath
Go to StorePath and open config.json
alter attribute "Memory"
save
docker-machine start
if necessary, reboot your system
then execute the pull container again =)
Here is my solution.
I was getting this logs from container named sql1.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
sqlservr: This program requires a machine with at least 2000 megabytes of memory.
/opt/mssql/bin/sqlservr: This program requires a machine with at least 2000 megabytes of memory.
After searching a lil bit. I changed my virtual machine's ram from virtual box gui. It was 1024mb. I changed it to 4096mb.
Now it works
With WSL2 modify .wslconfig file in your user folder and reboot
[wsl2] memory=4GB # Limits VM memory in WSL 2 up to 4 GB processors=2 # Makes the WSL 2 VM use two virtual processors
With WSL2 modify .wslconfig file in your user folder and reboot
[wsl2] memory=4GB # Limits VM memory in WSL 2 up to 4 GB processors=2 # Makes the WSL 2 VM use two virtual processors
@dotupNET This does not solve the problem for me, and I'm not sure how this is supposed to help? as far as I understand it, it puts an upper limit on memory usage for WSL. We would need a way to specify minimum memory allocation to WSL to solve the issue.
the strange thing for me is: if I run docker in linux container mode, the sql container runs just fine, but if I'm in windows mode and launch it with "--platform=linux" I run into the memory issue...
if you are literally using supersecret as your password it isnt meeting complexity requirements. You can run it without -d to see the output and see if there is anything useful there.
He gave you a problem why you are giving him hard time about his password that's outrages
I may be doing this wrong...
Docker: 18.04.0-ce-win62 (17151) image: microsoft/mssql-server-linux:latest
I'm just trying to run the following:
I can see the container in VS Code created and started, but then immediately stops. I check the logs:
So I saw mention in another issue about
-e "MSSQL_MEMORY_LIMIT_MB=3072"
so I tried that but still gets the same error.Am I doing something wrong?