Search code examples
sql-serverdockerdocker-compose

Unable to launch SQL Server 2022 in Docker Container


I am currently unable to launch SQL Server 2022 in its docker container due to an issue of a file or directory not being found. But the output of the error message gives no clue as to what I'm missing. This container was able to be launched before today (I did an update to my host and rebooted, nothing should have changed to not allow execution):

Attaching to db-1
db-1  | SQL Server 2022 will run as non-root by default.
db-1  | This container is running as user mssql.
db-1  | Your master database file is owned by mssql.
db-1  | To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
db-1  | This program has encountered a fatal error and cannot continue running at Mon Jan 15 16:34:36 2024
db-1  | The following diagnostic information is available:
db-1  | 
db-1  |          Reason: 0x00000001
db-1  |          Signal: SIGABRT - Aborted (6)
db-1  |           Stack:
db-1  |                  IP               Function
db-1  |                  ---------------- --------------------------------------
db-1  |                  000059c04b40ace1 std::__1::bad_function_call::~bad_function_call()+0x96661
db-1  |                  000059c04b40a6a6 std::__1::bad_function_call::~bad_function_call()+0x96026
db-1  |                  000059c04b409c2f std::__1::bad_function_call::~bad_function_call()+0x955af
db-1  |                  000070fbc4529520 __sigaction+0x50
db-1  |                  000070fbc457d9fc pthread_kill+0x12c
db-1  |                  000070fbc4529476 raise+0x16
db-1  |                  000070fbc450f7f3 abort+0xd3
db-1  |                  000059c04b3dbd96 std::__1::bad_function_call::~bad_function_call()+0x67716
db-1  |                  000059c04b4185b4 std::__1::bad_function_call::~bad_function_call()+0xa3f34
db-1  |                  000059c04b446318 std::__1::bad_function_call::~bad_function_call()+0xd1c98
db-1  |                  000059c04b4460fa std::__1::bad_function_call::~bad_function_call()+0xd1a7a
db-1  |                  000059c04b3e220a std::__1::bad_function_call::~bad_function_call()+0x6db8a
db-1  |                  000059c04b3e1e80 std::__1::bad_function_call::~bad_function_call()+0x6d800
db-1  |         Process: 10 - sqlservr
db-1  |          Thread: 157 (application thread 0x264)
db-1  |     Instance Id: c9380e05-c944-4cf5-9342-105397856038
db-1  |        Crash Id: 4b39a473-e76a-47b4-8a49-bb6fd55f2849
db-1  |     Build stamp: a9299dd605c652a3cea4246273441bcfaf48afb4b482ab9dc43771eecaf6600b
db-1  |    Distribution: Ubuntu 22.04.3 LTS
db-1  |      Processors: 32
db-1  |    Total Memory: 67119079424 bytes
db-1  |       Timestamp: Mon Jan 15 16:34:36 2024
db-1  |      Last errno: 2
db-1  | Last errno text: No such file or directory
db-1  | Capturing a dump of 10
db-1  | Executing: /opt/mssql/bin/handle-crash.sh with parameters
db-1  |      handle-crash.sh
db-1  |      /opt/mssql/bin/sqlservr
db-1  |      10
db-1  |      /opt/mssql/bin
db-1  |      /var/opt/mssql/log/
db-1  |      
db-1  |      c9380e05-c944-4cf5-9342-105397856038
db-1  |      4b39a473-e76a-47b4-8a49-bb6fd55f2849
db-1  |      
db-1  |      /var/opt/mssql/log/core.sqlservr.1_15_2024_16_34_36.10
db-1  | Successfully captured dump: /var/opt/mssql/log/core.sqlservr.1_15_2024_16_34_36.10
db-1  | 
db-1  | Ubuntu 22.04.3 LTS
db-1  | Capturing core dump and information to /var/opt/mssql/log...

docker-compose file:

**version: '3'
services:
  db:
    image: 'mcr.microsoft.com/mssql/server:2022-latest'
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_SA_PASSWORD=password1!
    ports:
      - 1433:1433
    volumes:
      - ./data:/var/opt/mssql/data
      - ./log:/var/opt/mssql/log
    expose:
      - 1433

User-Group ownership of ./data is 10001:0


Solution

  • I had this issue (or one very like it today). I was running Arch Linux and had just updated to the 6.7 kernel. Downgrading to the previous kernel version (6.6.7arch1-1) resolved the issue for me.