SQL Server Linux Docker镜像不断退出

时间:2017-01-23 18:08:47

标签: sql-server docker

设置
Windows 10专业版 Docker for Windows 1.13.0-beta38(9805)

Dockerfile

FROM microsoft/mssql-server-linux:latest
ENV ACCEPT_EULA "Y"
ENV SA_PASSWORD "my_strong_Password!"
EXPOSE 1433

问题
气质容器。有时它会停留几分钟。其他时间马上退出。

容器停止后,我运行docker start #containerID。容器将启动并保持几分钟。但它最终会退出。

我知道容器生命周期意味着如果容器中没有进程正在运行,它将退出,所以我只能假设这种情况正在发生。

我检查了日志,并且在退出之前我总是收到此消息:

sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.

我已经搜索了此消息,但无法找到有关该消息的任何有用信息。

有谁知道容器为什么要退出?

完整的SQL Server Linux日志

This is an evaluation version.  There are [141] days left in the evaluation period.
2017-01-23 17:42:33.90 Server      Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)
        Dec 10 2016 02:51:11
        Copyright (C) 2016 Microsoft Corporation. All rights reserved.
        on Linux (Ubuntu 16.04.1 LTS)
2017-01-23 17:42:33.91 Server      UTC adjustment: 0:00
2017-01-23 17:42:33.92 Server      (c) Microsoft Corporation.
2017-01-23 17:42:33.92 Server      All rights reserved.
2017-01-23 17:42:33.92 Server      Server process ID is 4116.
2017-01-23 17:42:33.93 Server      Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-01-23 17:42:33.93 Server      Registry startup parameters:
         -d C:\var\opt\mssql\data\master.mdf
         -l C:\var\opt\mssql\data\mastlog.ldf
         -e C:\var\opt\mssql\log\errorlog
2017-01-23 17:42:34.08 Server      SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical
processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-01-23 17:42:34.09 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-01-23 17:42:34.09 Server      Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-01-23 17:42:34.10 Server      Using conventional memory in the memory manager.
2017-01-23 17:42:34.90 Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-01-23 17:42:37.27 Server      Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:42:38.70 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-01-23 17:42:38.70 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-01-23 17:42:39.11 Server      The maximum number of dedicated administrator connections for this instance is '1'
2017-01-23 17:42:39.11 Server      Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description o
f the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-01-23 17:42:39.13 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational m
essage only.  No user action is required.
2017-01-23 17:42:39.14 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initial
ization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-01-23 17:42:39.16 Server      Query Store settings initialized with enabled = 1,
2017-01-23 17:42:39.16 spid5s      Starting up database 'master'.
2017-01-23 17:42:39.19 Server      In-Memory OLTP initialized on lowend machine.
2017-01-23 17:42:40.27 Server      Software Usage Metrics is disabled.
2017-01-23 17:42:40.79 spid5s      159 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:42:40.82 spid5s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:42:40.82 spid5s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-01-23 17:42:41.05 spid5s      Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:42:41.06 spid5s      Resource governor reconfiguration succeeded.
2017-01-23 17:42:41.06 spid5s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-01-23 17:42:41.07 spid5s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-01-23 17:42:41.80 spid5s      SQL Trace ID 1 was started by login "sa".
2017-01-23 17:42:41.82 spid5s      Server name is 'c0afcedc2500'. This is an informational message only. No user action is required.
2017-01-23 17:42:41.85 spid20s     Starting up database 'msdb'.
2017-01-23 17:42:41.85 spid21s     Starting up database 'MyTestDb'.
2017-01-23 17:42:41.85 spid6s      Starting up database 'mssqlsystemresource'.
2017-01-23 17:42:41.89 spid6s      The resource database build version is 14.00.100. This is an informational message only. No user action is required.
2017-01-23 17:42:41.99 spid6s      Starting up database 'model'.
2017-01-23 17:42:44.68 spid21s     Parallel redo is started for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:42:44.69 spid5s      Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
2017-01-23 17:42:44.85 spid21s     75 transactions rolled forward in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:42:44.91 spid5s      0 transactions rolled back in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:42:44.93 spid5s      Parallel redo is shutdown for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:42:44.98 spid6s      Polybase feature disabled.
2017-01-23 17:42:44.98 spid6s      Clearing tempdb database.
2017-01-23 17:42:49.01 spid6s      Starting up database 'tempdb'.
2017-01-23 17:42:49.03 spid17s     A self-generated certificate was successfully loaded for encryption.
2017-01-23 17:42:49.24 spid17s     Server is listening on [ 0.0.0.0 <ipv4> 1433].
2017-01-23 17:42:49.24 Server      Server is listening on [ 127.0.0.1 <ipv4> 1434].
2017-01-23 17:42:49.25 Server      Dedicated admin connection support was established for listening locally on port 1434.
2017-01-23 17:42:49.25 spid17s     SQL Server is now ready for client connections. This is an informational message; no user action is required.
2017-01-23 17:42:50.95 spid6s      The tempdb database has 1 data file(s).
2017-01-23 17:42:50.96 spid22s     The Service Broker endpoint is in disabled or stopped state.
2017-01-23 17:42:50.96 spid22s     The Database Mirroring endpoint is in disabled or stopped state.
2017-01-23 17:42:50.99 spid22s     Service Broker manager has started.
2017-01-23 17:42:51.14 spid5s      Recovery is complete. This is an informational message only. No user action is required.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Capturing core dump and information for sqlservr (pid 11)...
cat: core.sqlservr.11.temp/log/debug.log: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
ls: cannot access '/var/opt/mssql/log/log/errorlog*': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/exception.log': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.txt': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.mdmp': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/system_health*': No such file or directory
Packaging core dump and information into compressed files.
Core dump and information will be written to /var/opt/mssql/log/core.sqlservr.01_23_2017_17_43_37.11 and logs in /var/opt/mssql/log/core.sqlservr.01_23_2017_17_43_37.11.l
og
This is an evaluation version.  There are [141] days left in the evaluation period.
2017-01-23 17:45:25.45 Server      Microsoft SQL Server vNext (CTP1.1) - 14.0.100.187 (X64)
        Dec 10 2016 02:51:11
        Copyright (C) 2016 Microsoft Corporation. All rights reserved.
        on Linux (Ubuntu 16.04.1 LTS)
2017-01-23 17:45:25.45 Server      UTC adjustment: 0:00
2017-01-23 17:45:25.45 Server      (c) Microsoft Corporation.
2017-01-23 17:45:25.46 Server      All rights reserved.
2017-01-23 17:45:25.46 Server      Server process ID is 4116.
2017-01-23 17:45:25.46 Server      Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-01-23 17:45:25.46 Server      Registry startup parameters:
         -d C:\var\opt\mssql\data\master.mdf
         -l C:\var\opt\mssql\data\mastlog.ldf
         -e C:\var\opt\mssql\log\errorlog
2017-01-23 17:45:25.55 Server      SQL Server detected 1 sockets with 2 cores per socket and 2 logical processors per socket, 2 total logical processors; using 2 logical
processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-01-23 17:45:25.55 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-01-23 17:45:25.56 Server      Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-01-23 17:45:25.56 Server      Using conventional memory in the memory manager.
2017-01-23 17:45:26.40 Server      Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-01-23 17:45:28.55 Server      Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:45:29.96 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-01-23 17:45:29.96 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-01-23 17:45:30.43 Server      The maximum number of dedicated administrator connections for this instance is '1'
2017-01-23 17:45:30.43 Server      Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description o
f the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-01-23 17:45:30.45 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational m
essage only.  No user action is required.
2017-01-23 17:45:30.46 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initial
ization' in SQL Server Books Online. This is an informational message only. No user action is required.
2017-01-23 17:45:30.47 Server      Query Store settings initialized with enabled = 1,
2017-01-23 17:45:30.47 spid5s      Starting up database 'master'.
2017-01-23 17:45:30.49 Server      In-Memory OLTP initialized on lowend machine.
2017-01-23 17:45:32.07 Server      Software Usage Metrics is disabled.
2017-01-23 17:45:32.31 spid5s      5 transactions rolled forward in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:45:32.36 spid5s      0 transactions rolled back in database 'master' (1:0). This is an informational message only. No user action is required.
2017-01-23 17:45:32.36 spid5s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2017-01-23 17:45:32.64 spid5s      Buffer pool extension is already disabled. No action is necessary.
2017-01-23 17:45:32.65 spid5s      Resource governor reconfiguration succeeded.
2017-01-23 17:45:32.65 spid5s      SQL Server Audit is starting the audits. This is an informational message. No user action is required.
2017-01-23 17:45:32.65 spid5s      SQL Server Audit has started the audits. This is an informational message. No user action is required.
2017-01-23 17:45:33.47 spid5s      SQL Trace ID 1 was started by login "sa".
2017-01-23 17:45:33.49 spid5s      Server name is 'c0afcedc2500'. This is an informational message only. No user action is required.
2017-01-23 17:45:33.53 spid6s      Starting up database 'mssqlsystemresource'.
2017-01-23 17:45:33.54 spid20s     Starting up database 'msdb'.
2017-01-23 17:45:33.55 spid21s     Starting up database 'MyTestDb'.
2017-01-23 17:45:33.61 spid6s      The resource database build version is 14.00.100. This is an informational message only. No user action is required.
2017-01-23 17:45:33.67 spid6s      Starting up database 'model'.
2017-01-23 17:45:36.19 spid21s     Parallel redo is started for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:45:36.43 spid21s     78 transactions rolled forward in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:45:36.53 spid6s      Polybase feature disabled.
2017-01-23 17:45:36.53 spid6s      Clearing tempdb database.
2017-01-23 17:45:36.59 spid5s      0 transactions rolled back in database 'MyTestDb' (5:0). This is an informational message only. No user action is required.
2017-01-23 17:45:36.60 spid5s      Parallel redo is shutdown for database 'MyTestDb' with worker pool size [1].
2017-01-23 17:45:36.71 spid5s      Recovery is writing a checkpoint in database 'msdb' (4). This is an informational message only. No user action is required.
sqlservr: ObjectWaitContext.cpp:533: void ObjectWaitContext::Wait(const PLONG64): Assertion `m_state == State::Signaled' failed.
Capturing core dump and information for sqlservr (pid 12)...
cat: core.sqlservr.12.temp/log/debug.log: No such file or directory
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
ls: cannot access '/var/opt/mssql/log/log/errorlog*': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/exception.log': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.txt': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/SQLDu*.mdmp': No such file or directory
ls: cannot access '/var/opt/mssql/log/log/system_health*': No such file or directory
Packaging core dump and information into compressed files.
Core dump and information will be written to /var/opt/mssql/log/core.sqlservr.01_23_2017_17_45_37.12 and logs in /var/opt/mssql/log/core.sqlservr.01_23_2017_17_45_37.12.l
og

3 个答案:

答案 0 :(得分:0)

我遇到了同样的问题!

我使用了非常安全的密码,并逐步使用了该链接来解决问题。

Quickstart: Run the SQL Server 2017 container image with Docker

祝你好运。

答案 1 :(得分:0)

  

sqlservr:ObjectWaitContext.cpp:533:void ObjectWaitContext :: Wait(const PLONG64):断言'm_state == State :: Signaled'失败。

以上消息与Microsoft SQL Server错误有关(请参阅:GH-23)。升级应该有帮助。

  

Microsoft SQL Server vNext(CTP1.2)-14.0.200.24(X64)解决了此问题!

答案 2 :(得分:0)

尝试增加Docker VM的内存大小。左键单击任务栏上的鲸鱼图标,选择设置/高级,然后将内存量设置为适当的大小(例如4 Gigs),然后启动容器,等待并探查图像是否仍在运行。我的容器遇到了这个问题和其他问题,并对此进行了修复。祝你好运。