最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

macos - Unable to run MSSQL in my docker container. Stops running after few secs - Stack Overflow

programmeradmin1浏览0评论

I am a newbie to Docker. I am using MAC to run docker Container for my application. The mssql service start for a few seconds and stops immediately. Below is the service code from YAML file.

  #
  # MSSQL
  #
  mssql:
    image: mcr.microsoft/mssql/server:2019-GA-ubuntu-16.04
    user: root
    ports:
      - "1433:1433"
      - "1444:1444"
    environment:
      ACCEPT_EULA: "Y"
      SA_PASSWORD: "Adm1nistrator"
      MSSQL_PID: Express
      DATABASE: "service"
    volumes:
      - ./db-migrations:/tmp/db-migrations:ro
      - ./db-migrations-scripts:/tmp/db-migrations-scripts:ro

I had a different MAC computer a while back and this same service worked fine then. It even works flawlessly on other's system.

Below is log from the service, I am unable to pinpoint the exact reason of failure here.

2025-02-10 21:28:35 SQL Server 2019 will run as non-root by default.
2025-02-10 21:28:35 This container is running as user root.
2025-02-10 21:28:35 To learn more visit /?linkid=2099216.
2025-02-10 21:28:35 Start database configuration
2025-02-10 21:28:35 total 28
2025-02-10 21:28:35 drwxrwxrwt 1 root root 4096 Feb 10 15:58 .
2025-02-10 21:28:35 drwxr-xr-x 1 root root 4096 Feb 10 15:58 ..
2025-02-10 21:28:35 drwxrwxrwt 2 root root 4096 Oct  9  2019 .ICE-unix
2025-02-10 21:28:35 drwxrwxrwt 2 root root 4096 Oct  9  2019 .Test-unix
2025-02-10 21:28:35 drwxrwxrwt 2 root root 4096 Oct  9  2019 .X11-unix
2025-02-10 21:28:35 drwxrwxrwt 2 root root 4096 Oct  9  2019 .XIM-unix
2025-02-10 21:28:35 drwxrwxrwt 2 root root 4096 Oct  9  2019 .font-unix
2025-02-10 21:28:35 drwxr-xr-x 8 root root  256 Jan 22 11:16 db-migrations
2025-02-10 21:28:35 drwxr-xr-x 6 root root  192 Feb 10 14:43 db-migrations-scripts
2025-02-10 21:28:40 2025-02-10 15:58:40.40 Server      The licensing PID was successfully processed. The new edition is [Express Edition].
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.70 Server      Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.72 Server      Did not find an existing master data file /var/opt/mssql/data/master.mdf, copying the missing default master and other system database files. If you have moved the database location, but not moved the database files, startup may fail. To repair: shutdown SQL Server, move the master database to configured location, and restart.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.72 Server      Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.74 Server      Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.77 Server      Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.80 Server      Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.83 Server      Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.84 Server      Setup step is copying system data file 'C:\templatedata\model_replicatedmaster.mdf' to '/var/opt/mssql/data/model_replicatedmaster.mdf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.86 Server      Setup step is copying system data file 'C:\templatedata\model_replicatedmaster.ldf' to '/var/opt/mssql/data/model_replicatedmaster.ldf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.87 Server      Setup step is copying system data file 'C:\templatedata\model_msdbdata.mdf' to '/var/opt/mssql/data/model_msdbdata.mdf'.
2025-02-10 21:28:40 
2025-02-10 05:30:00 15:58:40.91 Server      Setup step is copying system data file 'C:\templatedata\model_msdblog.ldf' to '/var/opt/mssql/data/model_msdblog.ldf'.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) 
2025-02-10 21:28:41 
Sep 24 2019 13:48:23 
2025-02-10 21:28:41 
Copyright (C) 2019 Microsoft Corporation
2025-02-10 21:28:41 
Express Edition (64-bit) on Linux (Ubuntu 16.04.6 LTS) <X64>
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      UTC adjustment: 0:00
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      (c) Microsoft Corporation.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      All rights reserved.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      Server process ID is 32.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.04 Server      Registry startup parameters: 
2025-02-10 21:28:41 
 -d /var/opt/mssql/data/master.mdf
2025-02-10 21:28:41 
 -l /var/opt/mssql/data/mastlog.ldf
2025-02-10 21:28:41 
 -e /var/opt/mssql/log/errorlog
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.05 Server      SQL Server detected 1 sockets with 16 cores per socket and 16 logical processors per socket, 16 total logical processors; using 4 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.05 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.05 Server      Detected 6350 MB of RAM. This is an informational message; no user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.06 Server      Using conventional memory in the memory manager.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.06 Server      Page exclusion bitmap is enabled.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.11 Server      Buffer pool extension is not supported on Linux platform.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.11 Server      Buffer Pool: Allocating 1048576 bytes for 927746 hashPages.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.34 Server      Buffer pool extension is already disabled. No action is necessary.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.60 Server      Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are ['ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.62 Server      Query Store settings initialized with enabled = 1, 
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.66 Server      The maximum number of dedicated administrator connections for this instance is '1'
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.67 Server      Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.68 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.68 Server      Lock partitioning is enabled.  This is an informational message only. No user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.70 Server      In-Memory OLTP initialized on lowend machine.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.76 Server      [INFO] Created Extended Events session 'hkenginexesession'
2025-02-10 21:28:41 

2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.76 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' in SQL Server Books Online. This is an informational message only. No user action is required.
2025-02-10 21:28:41 
ForceFlush is enabled for this instance. 
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.80 Server      Total Log Writer threads: 2. This is an informational message; no user action is required.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.84 Server      clflushopt is selected for pmem flush operation.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.84 Server      Software Usage Metrics is disabled.
2025-02-10 21:28:41 
2025-02-10 05:30:00 15:58:41.94 Server      CLR version v4.0.30319 loaded.
2025-02-10 21:28:42 
2025-02-10 05:30:00 15:58:42.04 spid9s      [1]. Feature Status: PVS: 0. CTR: 0. ConcurrentPFSUpdate: 1.
2025-02-10 21:28:42 
2025-02-10 05:30:00 15:58:42.05 spid9s      Starting up database 'master'.
2025-02-10 21:28:42 This program has encountered a fatal error and cannot continue running at Mon Feb 10 15:58:42 2025
2025-02-10 21:28:42 The following diagnostic information is available:
2025-02-10 21:28:42 
2025-02-10 21:28:42          Reason: 0x00000001
2025-02-10 21:28:42          Signal: SIGABRT - Aborted (6)
2025-02-10 21:28:42           Stack:
2025-02-10 21:28:42                  IP               Function
2025-02-10 21:28:42                  ---------------- --------------------------------------
2025-02-10 21:28:42                  00005646c2f2aa5a std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > c
2025-02-10 21:28:42                  00005646c2f2a559 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > c
2025-02-10 21:28:42                  00005646c2f2945c std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > c
2025-02-10 21:28:42                  00007fb948c354b0 killpg+0x40
2025-02-10 21:28:42                  00007fb948c35428 gsignal+0x38
2025-02-10 21:28:42                  00007fb948c3702a abort+0x16a
2025-02-10 21:28:42                  00005646c2ebcdd4 std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > std::__1::operator+<char, std::__1::char_traits<char>, std::__1::allocator<char> >(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > c
2025-02-10 21:28:42         Process: 14 - sqlservr
2025-02-10 21:28:42          Thread: 123 (application thread 0x1b0)
2025-02-10 21:28:42     Instance Id: 857e130f-5aba-48dd-9ec2-cae9682cdfdc
2025-02-10 21:28:42        Crash Id: d7d53537-90b5-4554-a34d-62c255c11278
2025-02-10 21:28:42     Build stamp: 52ec5c991c015cbdd504002245460be8a9a9b6c41343aaab03cf768750a6c2df
2025-02-10 21:28:42    Distribution: Ubuntu 16.04.6 LTS
2025-02-10 21:28:42      Processors: 16
2025-02-10 21:28:42    Total Memory: 8322998272 bytes
2025-02-10 21:28:42       Timestamp: Mon Feb 10 15:58:42 2025
2025-02-10 21:28:42      Last errno: 2
2025-02-10 21:28:42 Last errno text: No such file or directory
2025-02-10 21:28:42 
2025-02-10 21:28:42 Ubuntu 16.04.6 LTS
2025-02-10 21:28:42 Capturing core dump and information to /var/opt/mssql/log...
2025-02-10 21:28:43 Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
2025-02-10 21:28:43 Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
2025-02-10 21:28:43 Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
2025-02-10 21:28:44 dmesg: read kernel buffer failed: Operation not permitted
2025-02-10 21:28:44 No journal files were found.
2025-02-10 21:28:44 No journal files were found.
2025-02-10 21:28:44 Mon Feb 10 15:58:44 UTC 2025 Capturing program information
2025-02-10 21:28:44 Mon Feb 10 15:58:44 UTC 2025 Attempting to capture a dump with paldumper
2025-02-10 21:28:44 WARNING: Capture attempt failure detected
2025-02-10 21:28:44 Attempting to capture a filtered dump with paldumper
2025-02-10 21:28:44 WARNING: Attempt to capture dump failed.  Reference /var/opt/mssql/log/core.sqlservr.14.temp/log/paldumper-debug.log for details
2025-02-10 21:28:44 Mon Feb 10 15:58:44 UTC 2025 Attempting to capture a dump with gdb
2025-02-10 21:28:44 Mon Feb 10 15:58:44 UTC 2025 Captured a dump with gdb
2025-02-10 21:28:44 Mon Feb 10 15:58:44 UTC 2025 Capturing program binaries
2025-02-10 21:28:44 Mon Feb 10 15:58:44 UTC 2025 Compressing the dump files
发布评论

评论列表(0)

  1. 暂无评论
ok 不同模板 switch ($forum['model']) { /*case '0': include _include(APP_PATH . 'view/htm/read.htm'); break;*/ default: include _include(theme_load('read', $fid)); break; } } break; case '10': // 主题外链 / thread external link http_location(htmlspecialchars_decode(trim($thread['description']))); break; case '11': // 单页 / single page $attachlist = array(); $imagelist = array(); $thread['filelist'] = array(); $threadlist = NULL; $thread['files'] > 0 and list($attachlist, $imagelist, $thread['filelist']) = well_attach_find_by_tid($tid); $data = data_read_cache($tid); empty($data) and message(-1, lang('data_malformation')); $tidlist = $forum['threads'] ? page_find_by_fid($fid, $page, $pagesize) : NULL; if ($tidlist) { $tidarr = arrlist_values($tidlist, 'tid'); $threadlist = well_thread_find($tidarr, $pagesize); // 按之前tidlist排序 $threadlist = array2_sort_key($threadlist, $tidlist, 'tid'); } $allowpost = forum_access_user($fid, $gid, 'allowpost'); $allowupdate = forum_access_mod($fid, $gid, 'allowupdate'); $allowdelete = forum_access_mod($fid, $gid, 'allowdelete'); $access = array('allowpost' => $allowpost, 'allowupdate' => $allowupdate, 'allowdelete' => $allowdelete); $header['title'] = $thread['subject']; $header['mobile_link'] = $thread['url']; $header['keywords'] = $thread['keyword'] ? $thread['keyword'] : $thread['subject']; $header['description'] = $thread['description'] ? $thread['description'] : $thread['brief']; $_SESSION['fid'] = $fid; if ($ajax) { empty($conf['api_on']) and message(0, lang('closed')); $apilist['header'] = $header; $apilist['extra'] = $extra; $apilist['access'] = $access; $apilist['thread'] = well_thread_safe_info($thread); $apilist['thread_data'] = $data; $apilist['forum'] = $forum; $apilist['imagelist'] = $imagelist; $apilist['filelist'] = $thread['filelist']; $apilist['threadlist'] = $threadlist; message(0, $apilist); } else { include _include(theme_load('single_page', $fid)); } break; default: message(-1, lang('data_malformation')); break; } ?>