microsoft / mssql-docker

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

Docker mssql-server-linux crash when mounting a volume #136

Closed SebastianPfliegel closed 6 years ago

SebastianPfliegel commented 7 years ago

Setup:

Host-OS: Windows 10 Docker: 17.06.0-ce

Command:

docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=strong1Pass!' -e 'MSSQL_PID=Developer' --cap-add SYS_PTRACE -p 1433:1433 -v c:/users/pfliegel.sebastian/docker_vol/mssql:/var/opt/mssql -d --name mssql microsoft/mssql-server-linux:latest

Error:

This is an evaluation version. There are [165] days left in the evaluation period.This program has encountered a fatal error and cannot continue running. The following diagnostic information is available: Reason: 0x00000006 Status: 0x40000015 Message: Kernel bug check Address: 0x6a42b4a0 Parameters: 0x6a62a250 Stacktrace: 000000006a4e83c6 000000006a42b4fb 000000006a41ec9d 000000006a42ae9b 000000006a4e695d 000000006a4e599c 000000006a4e5810 000000006a4e5745 Process: 8 - sqlservr Thread: 12 (application thread 0x1000) Instance Id: 644f9aaa-60cc-444e-92cd-c2c483694108 Crash Id: e47f1b2c-f882-44ca-9a80-6b380e504d2f Build stamp: e83d0295c4b8a8055fc3842cb84be4f864e57a4bf7c38359c4427ace56a27dbf Capturing core dump and information... dmesg: read kernel buffer failed: Operation not permitted No journal files were found. No journal files were found. Attempting to capture a dump with paldumper

When I try to run the container without attaching volumes it works just fine.

Dumplog is attached: log.zip

sirkkalap commented 7 years ago

This looks a lot similar to another "Kernel bug check" in https://github.com/Microsoft/mssql-docker/issues/99

SebastianPfliegel commented 7 years ago

The difference is he blames NFS, I use a local Windows drive. It looks like it's an issue introduced in RC1. I'm currently trying to run the same command (different local path of course) from my private notebook (openSUSE Tumbleweed and 17.04.0-ce) and it works fine.

Will try it also with one of the CTPs.

SebastianPfliegel commented 7 years ago

ctp2-1 is working fine.

SebastianPfliegel commented 7 years ago

2 hours ago the new rc2 tag has been pushed. Same issue, though ... :(

kspearrin commented 7 years ago

I am having the same issue (I think).

$ docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>' -e 'MSSQL_PID=Express' --cap-add SYS_PTRACE -p 1401:1433 -v c:/data/mysql/data:/var/opt/mssql/data -d microsoft/mssql-server-linux
4aee903227eb2c5831a69e8e7d9f817710f984294810a860d9d24c070e0e5676
$ docker ps
CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                                         NAMES
4aee903227eb        microsoft/mssql-server-linux   "/bin/sh -c /opt/m..."   3 seconds ago       Up 2 seconds        0.0.0.0:1401->1433/tcp                        cranky_rosalind

docker ps shows it running initially, however, after a few seconds I can run docker ps again and it is gone. Not sure where I can get any logs?

No issue when running without the volume. This is docker on windows.

Version 17.06.0-ce-win19 (12801)
Channel: stable
c98c1c2
SebastianPfliegel commented 7 years ago

After getting the dump the container stops, so it is correct that it is gone. You can find the logs at your mounted volume (c:/data/mysql/data).

kspearrin commented 7 years ago

Here is what's in my volume:

image

Not sure how to open these though.

kspearrin commented 7 years ago

Here is a log from docker:

$ docker-compose up
Creating network "bwcore_default" with the default driver
Creating mssql-server ...
Creating mssql-server
Attaching to mssql-server
mssql-server    | This is an evaluation version.  There are [173] days left in the evaluation period.
mssql-server    | 2017-08-03 12:44:34.57 Server      The licensing PID was successfully processed. The new edition is [Express Edition].
2017-08-03 12:44:34.80 Server      Microsoft SQL Server 2017 (RC2) - 14.0.900.75 (X64)
mssql-seJul 27 2017 08:53:49
mssql-seCopyright (C) 2017 Microsoft Corporation
mssql-seExpress Edition (64-bit) on Linux (Ubuntu 16.04.2 LTS)
2017-08-03 12:44:34.80 Server      UTC adjustment: 0:00
2017-08-03 12:44:34.80 Server      (c) Microsoft Corporation.
2017-08-03 12:44:34.80 Server      All rights reserved.
2017-08-03 12:44:34.80 Server      Server process ID is 4116.
2017-08-03 12:44:34.81 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2017-08-03 12:44:34.81 Server      Registry startup parameters:
mssql-se -d /var/opt/mssql/data/master.mdf
mssql-se -l /var/opt/mssql/data/mastlog.ldf
mssql-se -e /var/opt/mssql/log/errorlog
2017-08-03 12:44:34.82 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-08-03 12:44:34.82 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-08-03 12:44:34.82 Server      Detected 3143 MB of RAM. This is an informational message; no user action is required.
2017-08-03 12:44:34.83 Server      Using conventional memory in the memory manager.
2017-08-03 12:44:34.99 Server      Buffer pool extension is already disabled. No action is necessary.
2017-08-03 12:44:35.08 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-08-03 12:44:35.09 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-08-03 12:44:35.10 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'].
2017-08-03 12:44:35.13 Server      The maximum number of dedicated administrator connections for this instance is '1'
2017-08-03 12:44:35.13 Server      Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-08-03 12:44:35.14 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.
2017-08-03 12:44:35.15 Server      In-Memory OLTP initialized on lowend machine.
2017-08-03 12:44:35.20 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.
2017-08-03 12:44:35.21 Server      Query Store settings initialized with enabled = 1,
2017-08-03 12:44:35.21 spid6s      Starting up database 'master'.
2017-08-03 12:44:35.21 Server      Software Usage Metrics is disabled.
2017-08-03 12:44:35.47 spid6s      Service Master Key could not be decrypted using one of its encryptions. See sys.key_encryptions for details.
2017-08-03 12:44:35.48 spid6s      An error occurred during Service Master Key initialization. SQLErrorCode=33095, State=8, LastOsError=0.
2017-08-03 12:44:35.48 spid6s      Converting database 'master' from version 863 to the current version 869.
2017-08-03 12:44:35.48 spid6s      Database 'master' running the upgrade step from version 863 to version 864.
2017-08-03 12:44:35.49 spid6s      Error: 17053, Severity: 16, State: 1.
2017-08-03 12:44:35.49 spid6s      /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2017-08-03 12:44:36.50 spid6s      Error: 9002, Severity: 17, State: 0.
2017-08-03 12:44:36.50 spid6s      The transaction log for database 'master' is full due to 'NOTHING'.
2017-08-03 12:44:36.51 spid6s      Error: 928, Severity: 20, State: 1.
2017-08-03 12:44:36.51 spid6s      During upgrade, database raised exception 3602, severity 25, state 53, address 0000000404CD1D8E. Use the exception number to determine the cause.
mssql-server exited with code 255

compose file:

version: '3'

services:
  mssql-server:
    image: microsoft/mssql-server-linux:latest
    container_name: mssql-server
    volumes:
      - c:/data/mssql/data:/var/opt/mssql/data
    environment:
      ACCEPT_EULA=Y
      MSSQL_PID=Express
      SA_PASSWORD=MyPassword123456
    ports:
      - "1433:1433"
SebastianPfliegel commented 7 years ago

You can only see the databases as you are only mounting the data volume instead of the whole mssql volume: /var/opt/mssql (not /var/opt/mssql/data).

kspearrin commented 7 years ago

New compose file:

version: '3'

services:
  mssql-server:
    image: microsoft/mssql-server-linux:latest
    container_name: mssql-server
    volumes:
      - c:/data/mssql:/var/opt/mssql
    environment:
      ACCEPT_EULA=Y
      MSSQL_PID=Express
      SA_PASSWORD=MyPassword123456
    ports:
      - "1433:1433"

Output from docker-compose up:

$ docker-compose up
Creating network "bwcore_default" with the default driver
Creating mssql-server ...
Creating mssql-server
Attaching to mssql-server
mssql-server    | This is an evaluation version.  There are [173] days left in the evaluation period.
mssql-server    | This program has encountered a fatal error and cannot continue running.
mssql-server    | The following diagnostic information is available:
mssql-server    |
mssql-server    |        Reason: 0x00000006
mssql-server    |        Status: 0x40000015
mssql-server    |       Message: Kernel bug check
mssql-server    |       Address: 0x6a42b4b0
mssql-server    |    Parameters: 0x6a62a250
   Stacktrace: 000000006a4e8446 000000006a42b50b 000000006a41ecad
mssql-server    |                000000006a42aeab 000000006a4e69dd 000000006a4e5a1c
mssql-server    |                000000006a4e5890 000000006a4e57c5
      Process: 7 - sqlservr
mssql-server    |        Thread: 11 (application thread 0x1000)
mssql-server    |   Instance Id: ea74a1c5-68e0-4080-bfcf-5c0225e813fa
mssql-server    |      Crash Id: 524793ab-9d77-4d48-aefe-b032583c2dd6
mssql-server    |   Build stamp: a37664e45e4156e76a53fa282fd694cb49f70c2037515f5684e3ce6dfa7549bc
mssql-server    |
mssql-server    | Capturing core dump and information...
mssql-server    | dmesg: read kernel buffer failed: Operation not permitted
mssql-server    | No journal files were found.
mssql-server    | No journal files were found.
mssql-server    | Attempting to capture a dump with paldumper
mssql-server    | WARNING: Capture attempt failure detected
mssql-server    | Attempting to capture a filtered dump with paldumper
mssql-server    | WARNING: Attempt to capture dump failed.  Reference /var/opt/mssql/log/core.sqlservr.7.temp/log/paldumper-debug.log for details
mssql-server    | Attempting to capture a dump with gdb
mssql-server    | WARNING: Unable to capture crash dump with GDB. You may need to
mssql-server    | allow ptrace debugging, enable the CAP_SYS_PTRACE capability, or
mssql-server    | run as root.
mssql-server exited with code 1

Here's a log from c:/data/mssql/log/core.sqlservr.08_03_2017_13_19_14.7.txt

This program has encountered a fatal error and cannot continue running.
The following diagnostic information is available:

       Reason: 0x00000006
       Status: 0x40000015
      Message: Kernel bug check
      Address: 0x6a42b4b0
   Parameters: 0x6a62a250

   Stacktrace: 000000006a4e8446 000000006a42b50b 000000006a41ecad 
               000000006a42aeab 000000006a4e69dd 000000006a4e5a1c 
               000000006a4e5890 000000006a4e57c5 

      Process: 7 - sqlservr
       Thread: 11 (application thread 0x1000)
  Instance Id: ea74a1c5-68e0-4080-bfcf-5c0225e813fa
     Crash Id: 524793ab-9d77-4d48-aefe-b032583c2dd6
  Build stamp: a37664e45e4156e76a53fa282fd694cb49f70c2037515f5684e3ce6dfa7549bc

Looks like the same problem.

Logs: log.zip

kspearrin commented 7 years ago

In the meantime, this seems to work fine.

version: '3'

services:
  mssql-server:
    image: microsoft/mssql-server-linux:latest
    container_name: mssql-server
    volumes:
      - mssql_server_data:/var/opt/mssql/data
    environment:
      ACCEPT_EULA=Y
      MSSQL_PID=Express
      SA_PASSWORD=MyPassword123456
    ports:
      - "1433:1433"

volumes:
  mssql_server_data:

So it appears that this is only a problem when mounting the volume from the host machine.

SebastianPfliegel commented 7 years ago

And only on Docker for Windows 10. Works splendid on openSUSE as host system.

benze commented 7 years ago

I have the same problem and have reverted to tag ctp2-1, which is working fine.

SebastianPfliegel commented 7 years ago

@benze: what host system are you running? Local mount or network share?

dweggemans commented 7 years ago

I have this problem as well. It used to work fine like a week ago. Since then a new Docker version was released. I have no idea what version that was though.

Currently on Docker for windows version 17.06.1-ce, build 874a737 Also tried version 17.07.0-ce build 8784753 which doesn't work either The volume is local. Edit: no luck with Docker version 17.06.2-ce, build cec0b72 either

I'd appreciate a fix or workaround as reverting to ctp2-1 (on which volumes currently do work) is not really a improvement for me. Recreating and seeding the databases is actually faster on rc2 than remounting on ctp2-1.

benze commented 7 years ago

@aerkefiende: I'm running in a Win 10 box, with local mount drives. Running Docker Engine 17.06.1-ce-win24 (13025). Using Docker for Linux Containers.

clydeigc commented 7 years ago

Same problem encountered on Win10, Version 17.06.2-ce-win27 (13194), LinuxVM

twright-msft commented 7 years ago

This is a known bug. It is fixed in the RTM/GA release which will be available soon. Alternatives for now: Use :ctp2-1 or email me for a special preview image. Please only email me if this is a significant problem for you and you can't use :ctp2-1 for some reason. It takes some effort on my side to be able to set you up to pull the special preview image from our private preview registry. Email address is twright @ microsoft Sorry for the inconvenience!

sangohan commented 6 years ago

now that 2017-GA is available (and the old ctp2-1 tag is deleted), this issue is resurfacing - it hasn't been fixed at all.

[INFO] DOCKER> [microsoft/mssql-server-linux:2017-GA] "Microsoft SQL Server-confluence": Start container 66f49e17402a
2017-10-03 07:58:26.07 Server      Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2017-10-03 07:58:26.12 Server      Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2017-10-03 07:58:26.13 Server      Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2017-10-03 07:58:26.14 Server      Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2017-10-03 07:58:26.16 Server      Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2017-10-03 07:58:26.19 Server      Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2017-10-03 07:58:26.26 Server      Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)
Aug 22 2017 17:04:49
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.3 LTS)
2017-10-03 07:58:26.26 Server      UTC adjustment: 0:00
2017-10-03 07:58:26.26 Server      (c) Microsoft Corporation.
2017-10-03 07:58:26.26 Server      All rights reserved.
2017-10-03 07:58:26.26 Server      Server process ID is 4120.
2017-10-03 07:58:26.26 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2017-10-03 07:58:26.26 Server      Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2017-10-03 07:58:26.27 Server      SQL Server detected 1 sockets with 2 cores per socket and 4 logical processors per socket, 4 total logical processors; using 4 logical  user action is required.
2017-10-03 07:58:26.27 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-03 07:58:26.27 Server      Detected 5984 MB of RAM. This is an informational message; no user action is required.
2017-10-03 07:58:26.27 Server      Using conventional memory in the memory manager.
2017-10-03 07:58:26.50 Server      Buffer pool extension is already disabled. No action is necessary.
2017-10-03 07:58:26.66 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-10-03 07:58:26.66 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-10-03 07:58:26.66 Server      Successfully initialized the TLS configuration. Allowed TLS protocol versions are ['1.0 1.1 1.2']. Allowed TLS ciphers are 8-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:AES-RSA-AES128-GCM-SHA256:!DHE-RSA-AES256-SHA:!DHE-RSA-AES128-SHA'].
2017-10-03 07:58:26.70 Server      The maximum number of dedicated administrator connections for this instance is '1'
2017-10-03 07:58:26.70 Server      Node configuration: node 0: CPU mask: 0x000000000000000f:0 Active CPU mask: 0x000000000000000f:0. This message provides a description of the o user action is required.
2017-10-03 07:58:26.71 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message 
2017-10-03 07:58:26.71 Server      In-Memory OLTP initialized on lowend machine.
2017-10-03 07:58:26.76 Server      Database Instant File Initialization: enabled. For security and performance considerations see the topic 'Database Instant File Initialization' ion is required.
2017-10-03 07:58:26.76 Server      Query Store settings initialized with enabled = 1,
2017-10-03 07:58:26.77 spid6s      Starting up database 'master'.
2017-10-03 07:58:26.77 Server      Software Usage Metrics is disabled.
2017-10-03 07:58:26.95 spid6s      The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes.  3072 bytes at offset 418816 in file /var/
2017-10-03 07:58:27.04 spid6s      Converting database 'master' from version 862 to the current version 869.
2017-10-03 07:58:27.04 spid6s      Database 'master' running the upgrade step from version 862 to version 863.
2017-10-03 07:58:27.07 spid6s      Database 'master' running the upgrade step from version 863 to version 864.
2017-10-03 07:58:27.08 spid6s      Error: 17053, Severity: 16, State: 1.
2017-10-03 07:58:27.08 spid6s      /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2017-10-03 07:58:28.09 spid6s      Error: 928, Severity: 20, State: 1.
2017-10-03 07:58:28.09 spid6s      During upgrade, database raised exception 9002, severity 17, state 0, address 0000000484D726DE. Use the exception number to determine the cause.
2017-10-03 07:58:28.09 spid6s      Error: 9002, Severity: 17, State: 0.
2017-10-03 07:58:28.09 spid6s      The transaction log for database 'master' is full due to 'NOTHING'.
dweggemans commented 6 years ago

Volume mappings are working again. I just tried both GA and latest and can confirm that the issue is fixed.

jertel commented 6 years ago

I'm running into this problem now, after being forced to upgrade to 2017-GA since the CTP2 tags are no longer hosted on docker hub. Same error as sangohan posted a few hours ago.

I found that if I explicitly mount a local directory into the /var/opt/mssql container location then the problem goes away. So it looks like I have a workaround. For those that might be wondering why I didn't already specify a mount point, it's because I use this container for automated testing so there was never a need to persist the test data once the container shutdown.

Also, the problem did not occur locally on Docker for Mac. However it was consistently happening when running on a Local SSD-backed EC2 instance.

twright-msft commented 6 years ago

OK, so is this issue resolved for you @jertel and @sangohan?

SebastianPfliegel commented 6 years ago

@twright-msft: works like a charm for me!

Now I only need the option to create a database at startup and I'm happy.

sangohan commented 6 years ago

@jertel's workaround seems to work. I am still testing it out on the EC2 agents i use.

SebastianPfliegel commented 6 years ago

Closing the issue as noone complained so far :)

benze commented 6 years ago

I'm actually still using the ctp-2 container I have on my machine for the next couple of weeks; I can't afford the time right now to validate that the final version works properly.

I'll post my findings as soon as I test it.

Does the final release have the same 180 day eval license restrictions, or has that changed?

twright-msft commented 6 years ago

The General Availability (GA) release is not timebombed. If you choose MSSQL_PID=Evaluation it will be limited to 180 days, but realistically I dont know why you would use that. If you want to just do demo, eval, testing, dev you can use MSSQL_PID=Developer (which is the default if you don't specify MSSQL_PID).

Artgit commented 6 years ago

I ran into exactly the same issue when updated to the latest release a few days ago. My container loses data during restarts. Is there any way to get the fixed image or some previous tag without this issue?

Artgit commented 6 years ago

I see the new tags here https://hub.docker.com/r/microsoft/mssql-server-linux/tags/ which were updated ~30 mins ago. Was this problem with "The transaction log for database 'master' is full due to 'NOTHING'." fixed there?

Artgit commented 6 years ago

@benze or @twright-msft could you please share ctp-2 image? Or publish it somewhere at https://hub.docker.com ? Thanks in advance.

benze commented 6 years ago

@Artgit I would have no issues uploading it to dockerhub, but I don't know if the MS license allows me to redistribute or republish it.

@twright-msft Would it be permissible for me to upload it to my own dockerhub account?

twright-msft commented 6 years ago

I need to check on the redistribution issue. For now, to be safe, I'd suggest that you push your image to a private registry and if you want to share it with others like @Artgit then you can do that by providing him docker login credentials to your private registry via a private message.

Artgit commented 6 years ago

@benze please do this via private registry as @twright-msft suggested. I need this image because the latest one completely blocked my work. Thanks.

Artgit commented 6 years ago

Also, @twright-msft can this image can be shared by you? I really need this one in order to unblock my work

Artgit commented 6 years ago

@twright-msft I checked on the "latest" tag here https://hub.docker.com/r/microsoft/mssql-server-linux/tags/ - the issue is still there and has not been fixed :(

So, I'll be really grateful for the last working tag... it seems to be the mentioned previously "ctp-2". Thanks

benze commented 6 years ago

@Artgit I managed to push it to my private DockerHub repo - I just need to figure out how to give you access to it; do you have a username I can add as a collaborator? Or do you have another private repo I can push it to?

Artgit commented 6 years ago

@benze thank you very much ! Please try this username "inttest"

Also, today I found another repository with a fork of ctp-2. I have no issues with this one except one noisy message - "This is an evaluation version. There are [16] days left in the evaluation period." Do you have the same issue on your own version?

benze commented 6 years ago

Yes... Although I dont think it is a noisy message. These RC releases were supposed to be time bombed, so I suspect that it'll stop working in 16 days. In any case, I've added you as a collaborator to my private dockerhub repo. Please let me know once you've retrieved the image. benze/private:mssql-ctp2-1

I thought it was 180days from the day off first use, but might be fixed to a specific calendar date instead. Perhaps @twright-msft https://github.com/twright-msft might know more.

Artgit commented 6 years ago

@benze thanks! I retrieved the image, please close access.

@twright-msft Is there any chance that Microsoft will fix their mssql-server-linux image in the next couple of days because the only 15 days remain before ctp-2-1 will stop working?

twright-msft commented 6 years ago

The 180 day timebomb is from the date of the build. The SQL Server instance will continue to run after the timebomb period is over, but when you try to start a new container or restart the container after the timebomb period it will not start.

@Artgit - can you please state the problem you are experiencing in detail so I can try to reproduce the problem?

Artgit commented 6 years ago

@twright-msft I use the following configuration:

Windows 10 Home Edition 1709 OS Build 16299.19 Vagrant 2.0.0 VirtualBox 5.1.30 r118389 (Qt5.6.2

I use mssql-server-linux image in my integration tests via Maven + https://github.com/fabric8io/docker-maven-plugin

Everything was working fine(and works right now on ctp-2-1) before the recent releases of mssql-server-linux.

On the recent releases (including the latest one) it fails with the following error:

The transaction log for database 'master' is full due to 'NOTHING'.

I think this is some kind of mount issue... the container also loses its state(for example the previously imported data) between restarts.

I believe this topic is also related to this issue - https://social.msdn.microsoft.com/Forums/sqlserver/en-US/ca65a3e2-2f30-4641-a7ea-d3998c8dd8a7/the-transaction-log-for-database-master-is-full-due-to-nothing-during-updade?forum=sqlsetupandupgrade&prof=required

Could you please take a look into this issue?

twright-msft commented 6 years ago

A few questions: 1) Where are you running Docker Engine - in a Virtual Box VM, in a Vagrant Box, or are you using Docker for Windows and running Docker Engine inside of the Moby VM on Hyper-V?

Can you please provide the complete output? There should be some additional error messages before the 'The transaction log for ...' message.

Do things work OK without docker -v volume mounting? Does the data persist a container stop/start if the data is in the container?

Artgit commented 6 years ago

I use Docker inside of Virtual Box VM (Windows Docker Vagrant default - Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)).

The output:

2017-10-23 12:04:59.68 Server      Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2017-10-23 12:04:59.83 Server      Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2017-10-23 12:04:59.87 Server      Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2017-10-23 12:04:59.92 Server      Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2017-10-23 12:04:59.98 Server      Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2017-10-23 12:05:00.03 Server      Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2017-10-23 12:05:00.21 Server      Microsoft SQL Server 2017 (RTM) - 14.0.1000.169 (X64)
        Aug 22 2017 17:04:49
        Copyright (C) 2017 Microsoft Corporation
        Developer Edition (64-bit) on Linux (Ubuntu 16.04.3 LTS)
2017-10-23 12:05:00.22 Server      UTC adjustment: 0:00
2017-10-23 12:05:00.22 Server      (c) Microsoft Corporation.
2017-10-23 12:05:00.25 Server      All rights reserved.
2017-10-23 12:05:00.25 Server      Server process ID is 4116.
2017-10-23 12:05:00.26 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2017-10-23 12:05:00.27 Server      Registry startup parameters:
         -d /var/opt/mssql/data/master.mdf
         -l /var/opt/mssql/data/mastlog.ldf
         -e /var/opt/mssql/log/errorlog
2017-10-23 12:05:00.28 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-10-23 12:05:00.30 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-10-23 12:05:00.30 Server      Detected 3124 MB of RAM. This is an informational message; no user action is required.
2017-10-23 12:05:00.31 Server      Using conventional memory in the memory manager.
2017-10-23 12:05:00.32 Server      Warning: Timer device resolution is greater than required. Required: 1. Found: 10.
2017-10-23 12:05:00.82 Server      Buffer pool extension is already disabled. No action is necessary.
2017-10-23 12:05:01.09 Server      InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-10-23 12:05:01.10 Server      Implied authentication manager initialization failed. Implied authentication will be disabled.
2017-10-23 12:05:01.11 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'].
2017-10-23 12:05:01.17 Server      The maximum number of dedicated administrator connections for this instance is '1'
2017-10-23 12:05:01.19 Server      Node configuration: node 0: CPU mask: 0x0000000000000003:0 Active CPU mask: 0x0000000000000003:0. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2017-10-23 12:05:01.23 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.
2017-10-23 12:05:01.24 Server      In-Memory OLTP initialized on lowend machine.
2017-10-23 12:05:01.34 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.
2017-10-23 12:05:01.37 Server      Query Store settings initialized with enabled = 1,
2017-10-23 12:05:01.40 spid7s      Starting up database 'master'.
2017-10-23 12:05:01.40 Server      Software Usage Metrics is disabled.
2017-10-23 12:05:01.94 spid7s      The tail of the log for database master is being rewritten to match the new sector size of 4096 bytes.  3072 bytes at offset 418816 in file /var/opt/mssql/data/mastlog.ldf will be written.
2017-10-23 12:05:02.03 spid7s      Converting database 'master' from version 862 to the current version 869.
2017-10-23 12:05:02.04 spid7s      Database 'master' running the upgrade step from version 862 to version 863.
2017-10-23 12:05:02.06 spid7s      Database 'master' running the upgrade step from version 863 to version 864.
2017-10-23 12:05:02.08 spid7s      Error: 17053, Severity: 16, State: 1.
2017-10-23 12:05:02.08 spid7s      /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2017-10-23 12:05:03.13 spid7s      Error: 928, Severity: 20, State: 1.
2017-10-23 12:05:03.13 spid7s      During upgrade, database raised exception 9002, severity 17, state 0, address 0000000404CD26DE. Use the exception number to determine the cause.
2017-10-23 12:05:03.18 spid7s      Error: 9002, Severity: 17, State: 0.
2017-10-23 12:05:03.18 spid7s      The transaction log for database 'master' is full due to 'NOTHING'.
twright-msft commented 6 years ago

There are a couple of potential problems here: 1) I think this combination of using Docker volume mounting inside of a Virtual Box VM on Windows 10 doesn't work well. This isnt the first time I've seen a problem with that. 2) We support only Ubuntu 16.04 and you are using 14.04.

Can you please try to use a vagrant 16.04 box with Docker Engine inside of it? If that doesnt solve the problem, please try using Docker for Windows instead. That's the scenario that we test for.

Artgit commented 6 years ago

Thanks for your answer.

Because of Windows 10 Home edition, I'm unable to use Hyper-V.. and thus Docker for Windows... Maybe I should consider upgrading to Windows 10 Pro...

Artgit commented 6 years ago

@twright-msft We tried to upgrade Ubuntu from 14.04 to 16.04 on Vagrant VM and this approach did the trick. Now everything works fine. Thanks for your help!

twright-msft commented 6 years ago

Good to hear! Party on!

benze commented 6 years ago

@twright-msft I finally upgraded by docker image and can confirm that the new image works for me too. Thanks!

mjaric commented 6 years ago

It does not work form me. I'm using docker for Mac

Client: Version: 17.09.0-ce API version: 1.32 Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:40:09 2017 OS/Arch: darwin/amd64

Server: Version: 17.09.0-ce API version: 1.32 (minimum version 1.12) Go version: go1.8.3 Git commit: afdb6d4 Built: Tue Sep 26 22:45:38 2017 OS/Arch: linux/amd64 Experimental: true

Here is log

2017-11-23 08:08:30.55 Server      Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2017-11-23 08:08:30.81 Server      Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2017-11-23 08:08:30.85 Server      Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2017-11-23 08:08:31.36 Server      Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2017-11-23 08:08:31.87 Server      Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2017-11-23 08:08:32.59 Server      Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2017-11-23 08:08:32.72 Server      Microsoft SQL Server 2017 (RTM-CU1) (KB4038634) - 14.0.3006.16 (X64)
    Oct 19 2017 02:42:29
    Copyright (C) 2017 Microsoft Corporation
    Developer Edition (64-bit) on Linux (Ubuntu 16.04.3 LTS)
2017-11-23 08:08:32.73 Server      UTC adjustment: 0:00
2017-11-23 08:08:32.73 Server      (c) Microsoft Corporation.
2017-11-23 08:08:32.73 Server      All rights reserved.
2017-11-23 08:08:32.73 Server      Server process ID is 4116.
2017-11-23 08:08:32.73 Server      Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2017-11-23 08:08:32.74 Server      Registry startup parameters:
     -d /var/opt/mssql/data/master.mdf
     -l /var/opt/mssql/data/mastlog.ldf
     -e /var/opt/mssql/log/errorlog
2017-11-23 08:08:32.75 Server      Error: 17113, Severity: 16, State: 1.
2017-11-23 08:08:32.75 Server      Error 87(The parameter is incorrect.) occurred while opening file '/var/opt/mssql/data/master.mdf' to obtain configuration information at startup. An invalid startup option might have caused the error. Verify your startup options, and correct or remove them if necessary.
twright-msft commented 6 years ago

@mjaric - Do you have files in your host directory at the time you are staring the container? If so, can you please try mounting to a host directory that doesnt have any files in it?