microsoft / mssql-docker

Official Microsoft repository for SQL Server in Docker resources
MIT License
1.73k stars 757 forks source link

Can't run mssql on docker on MacOS 15.0.1 and Docker Desktop 4.34.2 #902

Open silwalanish opened 1 week ago

silwalanish commented 1 week ago

Steps to recreate:

  1. Run the command
    $ docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=admin" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest

Environment Info

Device: Macbook Pro M3 Pro OS: Sequoia 15.0.1 Docker Desktop: 4.34.2 Docker version: Docker version 27.2.0, build 3ab4256

Image

Logs

SQL Server 2017 will run as non-root by default.
This container is running as user root.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
This program has encountered a fatal error and cannot continue running at Fri Oct 18 07:27:44 2024
The following diagnostic information is available:

         Reason: 0x00000001
         Signal: SIGABRT - Aborted (6)
          Stack:
                 IP               Function
                 ---------------- --------------------------------------
                 000055555569eb0c <unknown>
                 000055555569e552 <unknown>
                 000055555569db61 <unknown>
                 00007ffffcd2af10 killpg+0x40
                 00007ffffcd2ae87 gsignal+0xc7
                 00007ffffcd2c7f1 abort+0x141
                 0000555555633762 <unknown>
                 00005555556b3314 <unknown>
                 00005555556e81f8 <unknown>
                 00005555556e7fda <unknown>
                 000055555563f5da <unknown>
                 000055555563f22f <unknown>
        Process: 9 - sqlservr
         Thread: 84 (application thread 0x144)
    Instance Id: 67d6ceb2-e160-4e6f-acef-243eefb37d3d
       Crash Id: 24b00197-99d7-4290-9084-71dc6dd02f32
    Build stamp: 3ebe3286cc04b1ea22c1d74c18613ff585b82c7a72e511e2d06f6994326d96d2
   Distribution: Ubuntu 18.04.6 LTS
     Processors: 11
   Total Memory: 8219394048 bytes
      Timestamp: Fri Oct 18 07:27:44 2024
     Last errno: 2
Last errno text: No such file or directory
Capturing a dump of 9
FAILED to capture a dump. Details in paldumper log.
Executing: /opt/mssql/bin/handle-crash.sh with parameters
     handle-crash.sh
     /opt/mssql/bin/sqlservr
     9
     /opt/mssql/bin
     /var/opt/mssql/log/

     67d6ceb2-e160-4e6f-acef-243eefb37d3d
     24b00197-99d7-4290-9084-71dc6dd02f32

Ubuntu 18.04.6 LTS
Capturing core dump and information to /var/opt/mssql/log...
dmesg: read kernel buffer failed: Operation not permitted
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
/usr/bin/timeout: failed to run command '/bin/journalctl': No such file or directory
Fri Oct 18 07:29:57 UTC 2024 Capturing program information
Fri Oct 18 07:29:58 UTC 2024 Attempting to capture a dump with paldumper for pid 9
WARNING: Capture attempt failure detected
Attempting to capture a filtered dump with paldumper for pid 9
WARNING: Attempt to capture dump failed.  Reference /var/opt/mssql/log/core.sqlservr.9.temp/log/paldumper-debug.log for details
Fri Oct 18 07:29:58 UTC 2024 Attempting to capture a dump with gdb
Fri Oct 18 07:29:58 UTC 2024 Captured a dump with gdb
Fri Oct 18 07:29:58 UTC 2024 Capturing program binaries
Fri Oct 18 07:30:00 UTC 2024 Not compressing the dump files, moving instead to: /var/opt/mssql/log/core.sqlservr.10_18_2024_07_27_44.9.d
stevenobird commented 2 days ago

The problem shouldn't be macOS or Docker Desktop - your MSSQL_SA_PASSWORD needs to be more safe as stated in the docs:

Your password should follow the SQL Server default password policy, otherwise the container can't set up SQL Server, and stops working. By default, the password must be at least eight characters long and contain characters from three of the following four sets: uppercase letters, lowercase letters, base-10 digits, and symbols.

That's why they always use <YourStrong@Passw0rd> in examples.