mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

(Docker apple M1) Invalid mapping of address 0x40080f9000 in reserved address space below 0x400000000000

Open kamilcglr opened this issue 5 years ago • 157 comments

Hello,

After I pulled the mcr.microsoft.com/mssql/server:latest image, I have a weird error when I want to launch it. How can I resolve that ? Thank you in advance.

docker run --platform linux/amd64 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Passw0rd'  -v sql_server:/var/opt/mssql -p 1433:1433 -it mcr.microsoft.com/mssql/server:latest
SQL Server 2019 will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
/opt/mssql/bin/sqlservr: Invalid mapping of address 0x400976b000 in reserved address space below 0x400000000000. Possible causes:
1) the process (itself, or via a wrapper) starts-up its own running environment sets the stack size limit to unlimited via syscall setrlimit(2);
2) the process (itself, or via a wrapper) adjusts its own execution domain and flag the system its legacy personality via syscall personality(2);
3) sysadmin deliberately sets the system to run on legacy VA layout mode by adjusting a sysctl knob vm.legacy_va_layout.

It seems to be the same problem in this SO question : https://stackoverflow.com/questions/65398641/docker-connect-sql-server-container-non-zero-code-1

kamilcglr avatar Jan 04 '21 20:01 kamilcglr

Any luck?

RS-Roshi avatar Jan 12 '21 20:01 RS-Roshi

Any luck?

Unfortunately, no. But has suggested by u/slickvik4 in this_reddit_comment you can use azure sql edge image. This solution is not working at 100% I still have some issues with heavy request. I get the following error : "There is insufficient system memory in resource pool 'internal' to run this query".

kamilcglr avatar Jan 12 '21 21:01 kamilcglr

I am also unable to connect to docker registry from my M1 Mac Air. I saw nobody is responding any solution to all these issue out there for new m1's

RS-Roshi avatar Jan 17 '21 11:01 RS-Roshi

Also having this issue and it's basically the main thing blocking my org from being able to use M1s for development. I'm setting up a remote Ubuntu Docker host at home for this but it'd be really wonderful if this was fixable, even if just in QEMU x86 emulated mode in Docker (although an ARM64 native container would be incredible)

daviduzumeri avatar Jan 26 '21 15:01 daviduzumeri

It has been more than a month and no one has a solution. Maybe it will get better with the next tech preview.

kamilcglr avatar Jan 26 '21 17:01 kamilcglr

Watching this space as well.

bradwallen avatar Jan 27 '21 15:01 bradwallen

Any news?

rgioia avatar Feb 08 '21 15:02 rgioia

An engineer from Docker said : "The best fix for this would be for Microsoft to provide an arm64 image. My guess is that this is a qemu emulation issue that won't be easy to debug or fix."

The best alternatives today are to use Azure SQL Edge or other database technologies such as mariadb or mysql which are multi arch. Discussion from reddit

Any news?

kamilcglr avatar Feb 08 '21 15:02 kamilcglr

If Microsoft devotes resources to an ARM64 image, I will eat my hat :(

daviduzumeri avatar Feb 08 '21 15:02 daviduzumeri

Yes i went the Azure SQL Edge route and no issues for my purpose. https://hub.docker.com/_/microsoft-azure-sql-edge

richardksizemore avatar Feb 08 '21 15:02 richardksizemore

Yes i went the Azure SQL Edge route and no issues for my purpose. https://hub.docker.com/_/microsoft-azure-sql-edge

could you please help me installing it? Because after this step: "sudo docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge" nothing happens

sshashka avatar Feb 08 '21 17:02 sshashka

I can install azure without any problems. My current problem is to be able to install sql-server to run a Ruby on Rails application with sql-server as adapter

rgioia avatar Feb 08 '21 17:02 rgioia

Yes i went the Azure SQL Edge route and no issues for my purpose. https://hub.docker.com/_/microsoft-azure-sql-edge

could you please help me installing it? Because after this step: "sudo docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge" nothing happens

running this command docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=yourStrong(!)Password' -p 1433:1433 --name azuresqledge -d mcr.microsoft.com/azure-sql-edge

generates this result and it started on port 1433 344f7269f806c5db985c61ec78b1bf7e6398f8f398acc8ea694a741f0c3aace3

RS-Roshi avatar Feb 08 '21 18:02 RS-Roshi

Gave up on the Azure Edge image. Ran into the CLR error (I'd imagine quite a few DB's might depend on the CLR runtime). Saw Microsoft pulled CLR support for Azure Edge 4 years back due to a security risk and it never came back.

nihirisuto avatar Feb 21 '21 05:02 nihirisuto

Any progress on this? Azure SQL Edge works fine, but can't really use it due to lack of CLR support

SvyatovetsD avatar Feb 25 '21 08:02 SvyatovetsD

Gave up on the Azure Edge image. Ran into the CLR error (I'd imagine quite a few DB's might depend on the CLR runtime). Saw Microsoft pulled CLR support for Azure Edge 4 years back due to a security risk and it never came back.

Same. I need CLR support.

bradwallen avatar Feb 25 '21 13:02 bradwallen

Same issue here, is there any work around for this? I have an older MacBook where I can run the container, how can I connect to the db server from my M1? Both computers are connected to the same network. Any help would be much appreciated!

Gilbert1391 avatar Mar 01 '21 21:03 Gilbert1391

Same issue here, is there any work around for this? I have an older MacBook where I can run the container, how can I connect to the db server from my M1? Both computers are connected to the same network. Any help would be much appreciated!

There’s no fix ATM until Microsoft fixes the image on their end. Won’t work with dockers preview that includes emulation for m1.

Best you can do is the azure edge image which is ARM compatible but you lose things like CLR runtime.

If you’re just doing simple stuff with small ish databases (I was learning with adventure works) you can pretty easily spin up a mssql server on the free google cloud tier and upload your database to a bucket there, whitelist the IP you’ll be connecting from and connect to it there. That’s what I ended up doing so I could continue my learning

nihirisuto avatar Mar 01 '21 22:03 nihirisuto

Any news?

rgioia avatar Mar 04 '21 14:03 rgioia

Yes i went the Azure SQL Edge route and no issues for my purpose. https://hub.docker.com/_/microsoft-azure-sql-edge

Azure SQL Edge works fine on my M1 Mac. But unfortunately, sqlcmd tool is not available the ARM64 version of SQL Edge containers.

nljsystemJF avatar Mar 05 '21 13:03 nljsystemJF