Closed andrewnicols closed 6 years ago
I am also seeing this issue on Linux with 2017-GA. It works fine on my Mac, but when running this on an Ubuntu server, I am seeing the same error:
Starting up database 'master'.
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.
Converting database 'master' from version 862 to the current version 869.
Database 'master' running the upgrade step from version 862 to version 863.
Database 'master' running the upgrade step from version 863 to version 864.
Error: 17053, Severity: 16, State: 1.
/var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
Error: 928, Severity: 20, State: 1.
During upgrade, database raised exception 9002, severity 17, state 0, address 0000000484D726DE. Use the exception number to determine the cause.
Error: 9002, Severity: 17, State: 0.
The transaction log for database 'master' is full due to 'NOTHING'.
OS name: "linux", version: "3.13.0-133-generic", arch: "amd64", family: "unix"
FYI, I switched all of our nodes to use the {{overlay2}} file storage backend for Docker, and can now start the 2017-GA image.
I suspect that the images are not entirely compatible with the AUFS storage backend. MacOS also uses overlay2.
switched from ext3 to ext4 on the host... that's was the only way we solved it.
seeing this issue on centos kernel : 4.14.0-1.el7.elrepo.x86_64
docker info
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 1
Server Version: 17.11.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 992280e8e265f491f7a624ab82f3e238be086e49
runc version: 0351df1c5a66838d0c392b4ac4cf9450de844e2d
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.14.0-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.858GiB
Name: VM_1_164_centos
ID: LJ7I:YD4Y:27KI:HY57:5BQQ:YONL:WBHT:GRGF:RKV6:OLCX:PA7K:WQRM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
docker logs
2017-11-21 09:40:29.50 spid6s Error: 17053, Severity: 16, State: 1.
2017-11-21 09:40:29.50 spid6s /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2017-11-21 09:40:30.51 spid6s Error: 928, Severity: 20, State: 1.
2017-11-21 09:40:30.51 spid6s During upgrade, database raised exception 9002, severity 17, state 0, address 0000000404CED37E. Use the exception number to determine the cause.
2017-11-21 09:40:30.51 spid6s Error: 9002, Severity: 17, State: 0.
2017-11-21 09:40:30.51 spid6s The transaction log for database 'master' is full due to 'NOTHING'.
Probably the same issue... try to use ext4 fs to host the var/lib/docker....
@tiny1990 - Are you using EXT4?
Thanks a lot. switched /var/lib/docker/ to ext4 solved
Cool. @loadtool - Can you check your file system and if needed change to EXT4 to see if that resolves the issue?
I have the same issue on Ubuntu 12.04
image microsoft/mssql-server-linux 2017-latest b0bb2e68f09
Command to run
$ docker run -ti -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=...' -p 1433:1433 --name ms-sql -d microsoft/mssql-server-linux:2017-latest
2017-12-12 08:06:54.07 Server Microsoft SQL Server 2017 (RTM-CU2) (KB4052574) - 14.0.3008.27 (X64)
Nov 16 2017 10:00:49
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.3 LTS)
$ docker info
Server Version: 17.04.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 192
Dirperm1 Supported: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary:
containerd version: 422e31ce907fd9c3833a38d7b8fdd023e5a76e73
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
apparmor
Kernel Version: 3.13.0-32-generic
Operating System: Ubuntu precise (12.04.5 LTS)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.851GiB
...
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: ashumkin
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
/var/lib/docker
filesystem is ext4
$ grep 'docker ' /etc/mtab
/dev/mapper/vg_cis-docker /var/lib/docker ext4 rw 0 0
The same image on Ubuntu 16.04 works well
$ docker info
Server Version: 1.12.6
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 400
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: host null overlay bridge
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: apparmor seccomp
Kernel Version: 4.4.0-98-generic
Operating System: Ubuntu 16.04.2 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 22.73 GiB
...
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: No swap limit support
Insecure Registries:
127.0.0.0/8
$ grep 'docker ' /etc/mtab
/dev/mapper/drcis--vg--data-docker /var/lib/docker ext4 rw,relatime,data=ordered 0 0
Upd. the issue is gone after I've mounted /var/opt/mssql
$ docker run -ti -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=...' -p 1433:1433 --name ms-sql -v /data/ms-sql-docker-data:/var/opt/mssql microsoft/mssql-server-linux:2017-latest
I have the same problem.
17.12.0-ce
microsoft/mssql-server-linux:2017-latest
cb3198f4b4d3
@styfle - Did you ever get past this error?
@mmacneil No, I gave up after several hours 🤷
I get the same error, if I try to create a container without a volume. I never had to use a volume before, but now it fails. We use the image to test our application with different databases, but it's hard to define an absolute path for the volume, as we have "Docker for Mac" for developer machines and a Linux CI server (Ubuntu 16.04.3 LTS
) for our E2E tests.
Ubuntu 16.04.3 LTS
17.09.1-ce, build 19e2cf6
microsoft/mssql-server-linux:2017-latest
cb3198f4b4d3
docker run -ti -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=...' -p 1433:1433 --name ms-sql microsoft/mssql-server-linux:2017-latest
docker run -ti -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=...' -p 1433:1433 --name ms-sql -v /data/ms-sql-docker-data:/var/opt/mssql microsoft/mssql-server-linux:2017-latest
Having this same problem now on Windows 10 1709 with CU2. It was working on an existing installation I had running, but not on anything new that I try. Docker compose:
version: '3'
services:
mssql:
image: microsoft/mssql-server-linux:2017-CU2
container_name: mssql
restart: always
volumes:
- ./mssql/data:/var/opt/mssql/data
- ./mssql/backups:/etc/myapp/mssql/backups
env_file:
- mssql.env
- ./env/mssql.override.env
Any workaround for windows users?
OS: windows 10 (17025 & 17604 builds) Docker: 17.12.0-ce Image: microsoft/mssql-server-linux:latest
Regards
I had no issues locally on my mac.
But I'm having the same issue on Docker Cloud / AWS. My Docker Stack YML is:
db: image: microsoft/mssql-server-linux:2017-latest environment: SA_PASSWORD: "PASSWORD" ACCEPT_EULA: "Y" web: image: feltonvillain/headhuntapi ports:
The service runs and the containers runs and bombs out with same errors:
2017-11-21 09:40:29.50 spid6s Error: 17053, Severity: 16, State: 1. 2017-11-21 09:40:29.50 spid6s /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered. 2017-11-21 09:40:30.51 spid6s Error: 928, Severity: 20, State: 1. 2017-11-21 09:40:30.51 spid6s During upgrade, database raised exception 9002, severity 17, state 0, address 0000000404CED37E. Use the exception number to determine the cause. 2017-11-21 09:40:30.51 spid6s Error: 9002, Severity: 17, State: 0. 2017-11-21 09:40:30.51 spid6s The transaction log for database 'master' is full due to 'NOTHING'.
@tiny1990 - you said switching " /var/lib/docker/ to ext4" solved it. Can you provide more insight? I'm trying to deploy a container onto a AWS Ec2 Instance (t2.small | us-east-1d).
I have a solution, hard work but solution at least. I create an Hyper-V virtual machine with same OS that SQL Server image, in my case CentOS (finally I'm not using microsoft/mssql-server-linux, I build my own in CentOS7). Second step, install SQL Server. Finally zip your /var/opt/mssql folder and download to your host machine using WinSCP. Unzip this folder in your mounted volume. Run docker compose. It should work.
For all using CentOS 7 I let you my zip here. And this is my own image reynier3mil/centos-mssql-full:centos.
Hope it works for you.
Note: password for SQL Server will be the one you use installing in your Hyper-V machine, not the one used in enviroment variables in docker compose file, if differents of course.
@twright-msft Here is a simple repro for this issue on Windows 10 with docker compose:
version: '3'
services:
mssql:
image: microsoft/mssql-server-linux:2017-CU5
container_name: test-mssql
volumes:
- ./mssql:/var/opt/mssql
env_file:
- mssql.env
PS > docker-compose up
Recreating test-mssql ... done
Attaching to test-mssql
test-mssql | 2018-03-30 19:16:41.79 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2018-03-30 19:16:42.34 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.
2018-03-30 19:16:42.36 Server Setup step is copying system data file 'C:\templatedata\mastlog.ldf' to '/var/opt/mssql/data/mastlog.ldf'.
2018-03-30 19:16:42.39 Server Setup step is copying system data file 'C:\templatedata\model.mdf' to '/var/opt/mssql/data/model.mdf'.
2018-03-30 19:16:42.52 Server Setup step is copying system data file 'C:\templatedata\modellog.ldf' to '/var/opt/mssql/data/modellog.ldf'.
2018-03-30 19:16:42.64 Server Setup step is copying system data file 'C:\templatedata\msdbdata.mdf' to '/var/opt/mssql/data/msdbdata.mdf'.
2018-03-30 19:16:42.88 Server Setup step is copying system data file 'C:\templatedata\msdblog.ldf' to '/var/opt/mssql/data/msdblog.ldf'.
2018-03-30 19:16:43.47 Server Microsoft SQL Server 2017 (RTM-CU5) (KB4092643) - 14.0.3023.8 (X64)
Mar 2 2018 18:24:44
Copyright (C) 2017 Microsoft Corporation
Developer Edition (64-bit) on Linux (Ubuntu 16.04.4 LTS)
2018-03-30 19:16:43.48 Server UTC adjustment: 0:00
2018-03-30 19:16:43.49 Server (c) Microsoft Corporation.
2018-03-30 19:16:43.49 Server All rights reserved.
2018-03-30 19:16:43.49 Server Server process ID is 4120.
2018-03-30 19:16:43.49 Server Logging SQL Server messages in file '/var/opt/mssql/log/errorlog'.
2018-03-30 19:16:43.50 Server Registry startup parameters:
-d /var/opt/mssql/data/master.mdf
-l /var/opt/mssql/data/mastlog.ldf
-e /var/opt/mssql/log/errorlog
2018-03-30 19:16:43.52 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.
2018-03-30 19:16:43.54 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2018-03-30 19:16:43.54 Server Detected 3143 MB of RAM. This is an informational message; no user action is required.
2018-03-30 19:16:43.55 Server Using conventional memory in the memory manager.
2018-03-30 19:16:45.55 Server Buffer pool extension is already disabled. No action is necessary.
2018-03-30 19:16:46.66 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2018-03-30 19:16:46.67 Server Implied authentication manager initialization failed. Implied authentication will be disabled.
2018-03-30 19:16:46.67 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'].
2018-03-30 19:16:46.78 Server The maximum number of dedicated administrator connections for this instance is '1'
2018-03-30 19:16:46.79 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.
2018-03-30 19:16:46.80 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.
2018-03-30 19:16:46.81 Server In-Memory OLTP initialized on lowend machine.
2018-03-30 19:16:46.93 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.
2018-03-30 19:16:46.93 Server Query Store settings initialized with enabled = 1,
2018-03-30 19:16:46.94 spid7s Starting up database 'master'.
2018-03-30 19:16:46.96 Server Software Usage Metrics is disabled.
2018-03-30 19:16:47.59 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.
2018-03-30 19:16:48.33 spid7s Converting database 'master' from version 862 to the current version 869.
2018-03-30 19:16:48.33 spid7s Database 'master' running the upgrade step from version 862 to version 863.
2018-03-30 19:16:48.34 spid7s Database 'master' running the upgrade step from version 863 to version 864.
2018-03-30 19:16:48.36 spid7s Error: 17053, Severity: 16, State: 1.
2018-03-30 19:16:48.36 spid7s /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2018-03-30 19:16:49.37 spid7s Error: 928, Severity: 20, State: 1.
2018-03-30 19:16:49.37 spid7s During upgrade, database raised exception 9002, severity 17, state 0, address 0000000484D02C8E. Use the exception number to determine the cause.
2018-03-30 19:16:49.37 spid7s Error: 9002, Severity: 17, State: 0.
2018-03-30 19:16:49.37 spid7s The transaction log for database 'master' is full due to 'NOTHING'.
test-mssql exited with code 255
I tried CU5 and CU2 with the same results.
Have same issue.
Host - Windows 10
Container: microsoft/mssql-server-linux:latest,
Docker: Version 18.03.0-ce-win59 (16762)
I have workaround that works for me: 1) start container with config:
version: '3'
services:
db:
image: "microsoft/mssql-server-linux"
ports:
- "1433:1433"
environment:
SA_PASSWORD: You!Password
ACCEPT_EULA: Y
volumes:
- C:\Dev\TempDb:/tmp
2) Run command:
docker exec {CONTAINER_NAME} cp -R /var/opt/mssql /tmp
Then "C:\Dev\TempDb" will contains updated data.
3) So you can copy this data to your directory and mount it as volume, for example:
version: '3'
services:
db:
image: "microsoft/mssql-server-linux"
ports:
- "1433:1433"
environment:
SA_PASSWORD: You!Password
ACCEPT_EULA: Y
volumes:
- C:\Dev\TempDb:/var/opt/mssql
Similar issues for me.
If I remove the docker volume it works fine:
Does not work: docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword123456' --name SQLLinuxLocal -d -i -p 15105:1433 -v C:\Docker\SQLServer\Linux\SQLLinuxLocalPersist:/var/opt/mssql ` microsoft/mssql-server-linux:2017-GA
Works ok: docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=MyPassword123456' --name SQLLinuxLocal -d -i -p 15105:1433 microsoft/mssql-server-linux:2017-GA
I can create a volume, copy a file to it and use that volume with these images successfully but mounting does not seem to work.....
Same issue for me on a fresh install of Windows 10 Enterprise and Docker for Windows.
2018-04-20 19:00:38.02 spid7s Starting up database 'master'.
2018-04-20 19:00:38.05 Server Software Usage Metrics is disabled.
2018-04-20 19:00:38.72 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.
2018-04-20 19:00:38.96 spid7s Converting database 'master' from version 862 to the current version 869.
2018-04-20 19:00:38.97 spid7s Database 'master' running the upgrade step from version 862 to version 863.
2018-04-20 19:00:39.03 spid7s Database 'master' running the upgrade step from version 863 to version 864.
2018-04-20 19:00:39.06 spid7s Error: 17053, Severity: 16, State: 1.
2018-04-20 19:00:39.06 spid7s /var/opt/mssql/data/mastlog.ldf: Operating system error 31(A device attached to the system is not functioning.) encountered.
2018-04-20 19:00:39.68 spid7s Error: 928, Severity: 20, State: 1.
2018-04-20 19:00:39.68 spid7s During upgrade, database raised exception 9002, severity 17, state 0, address 0000000404CD26DE. Use the exception number to determine the cause.
2018-04-20 19:00:39.69 spid7s Error: 9002, Severity: 17, State: 0.
2018-04-20 19:00:39.69 spid7s The transaction log for database 'master' is full due to 'NOTHING'.
I do however, need the volume to function due to data persistence in development.
I am also having this issue with Windows 10 Enterprise and Docker for Windows.
I too am having this issue. Running Win 10 Enterprise and Docker (edge) for Windows. Same as others, without the volume mapping it works.
I am also seeing this on Win10. Is there a workaround for Docker on Windows users?
@collinsauve Yes there is. I have found that if you mount to a folder that already exists (ie. /var/opt/mssql/data/) then you will get this error. Mount to a new folder (ie. /sqlserver/data) then you can get the container to run successfully, see the examples below:
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@ssword1' `
--cpus="2" `
--name SQLLinuxLocal1 -d -i `
-p 1433:1433 `
-v C:\Docker\SQLServer\Linux\SQLLinuxLocal:/sqlserver/data/ `
microsoft/mssql-server-linux:latest
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@ssword1' `
--cpus="2" `
--name SQLLinuxLocal2 -d -i `
-p 15106:1433 `
-v C:\Docker\SQLServer\Linux\SQLLinuxLocal:/var/opt/mssql/data/ `
microsoft/mssql-server-linux:latest
Or if you can, create a data volume instead and use that.
@SQLGeordie if you mount in another folder then you need to change default location in SQL Server and you will have same error, your solution works because you are saving data in your container not in your mounted folder.
I´m facing the same issue on windows 10, and the only alternative to get my SqlServer up and running, was to get back to docker 17.09.1-ce-win42...
@sirio3mil Yes, but my example (#1) was to mount the data to /sqlserver/data/, perform a restore (if it is a .bak that you are passing to the container) using with move to restore the data/log files to /var/opt/mssql/data/ - which works.
This is a workaround, not a solution
We are seeing this as well on a new install of 18.05.0-ce-rc1 with :latest. We can use a volume but not a bind mount. The docs indicate that bind mounts are not working for macs but say nothing about windows.
I got a similar error. The host was already on ext4
.
Adding external volumes seems to have fixed it.
Did not work:
mssql:
image: microsoft/mssql-server-linux:latest
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: yourStrong(!)Password
ports:
- "8997:1433"
container_name: mssql
Worked:
mssql:
image: microsoft/mssql-server-linux:latest
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: yourStrong(!)Password
ports:
- "8997:1433"
container_name: mssql
volumes:
- "/home/janis/Darbvirsma/sequelize/sequelize/var/data:/var/opt/mssql/data"
- "/home/janis/Darbvirsma/sequelize/sequelize/var/backups:/etc/myapp/mssql/backups"
I have the same problem. But I am using macOS running docker-machine. What should I do?
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
On Windows 10, microsoft/mssql-server-linux:latest (as of today) works for me with this version of docker for windows:
Any version of docker after that produces the error described in OP.
same thing happened after upgrade to 18.03.1-ce
now have to downgrade back
It seems Microsoft fixed the issue in the new CU7 https://support.microsoft.com/en-us/help/4212960/fix-sql-server-2017-won-t-start-with-linux-container-image-on-docker
yes, the latest label seems to work as of the time of writing.
Confirmed, it's working in CU7 update (tag latest
).
You can pull the image to your local by:
docker image pull microsoft/mssql-server-linux
Great to hear that this is now working for you.
2017-GA Image repeatedly does not start. I'm seeing this on three of the nodes that I've tried, with a fourth loading up correctly. All of these nodes will happily run CTP-2.1, but were unable to run RC1, or RC2 due to #126.
docker run command:
docker logs output:
docker info:
I can provide additional debugging information as required.