Hello folks,
I installed Docker and then mssql-server-linux on my Mac via Kitematic. I increased the memory to 8G via Docker Edge. After agreeing to EULA question; whenI try to start the MS SQL Server instance, I keep getting the error, "Dump collecting thread [6] hit exception [6]. Exiting." It is very vague.
Questions:-
Thank you, Max.
I am seeing similar behavior, on MacOS 10.13.2.
Docker Version 17.12.0-ce-mac49 (21995), Channel: stable, f50f37646d
My error varies in the thread: "Dump collecting thread [7] hit exception [6]. Exiting."
Thank you pnhamer. I also installed sqlcmd and get the same error. My Mac Version is 10.3.3.
Was having this exact error running this docker in OpenShift, solved by assigning it a ServiceAccount and giving it the anyuid SecurityContextConstraint.
Basically, it needs to be run as root.
Hi RBlaine95, root is currently disabled by default on my Mac. I will enable it, run some tests and provide feedback. Thank you for your input.
Ugh. I was so excited to discover this on Friday and have it up and running within an hour. Broken today. 😞
$ docker-compose up
Starting mssql-server ... done
Attaching to mssql-server
mssql-server | Dump collecting thread [7] hit exception [6]. Exiting.
mssql-server exited with code 255
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e42406f362f9 microsoft/mssql-server-linux:2017-latest "/bin/sh -c /opt/mss…" 21 minutes ago Exited (255) 3 minutes ago mssql-server
docker-compose.yml:
version: '3'
services:
mssql-server:
image: microsoft/mssql-server-linux:2017-latest
container_name: mssql-server
volumes:
- ./sql1data/backup:/var/opt/mssql/backup
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=yourStrong(!)Password
ports:
- "1433:1433"
@travismiller - Can you please try without the volume mount? SQL Server doesnt support volume mounting from a container on Mac. See this issue for details and alternatives: #12
Just confirmed the same result without the volume.
FWIW, I had originally tried using a volume to /var/opt/mssql but there were issues initializing the data files, likely because of #12 . However, just mounting the /var/opt/mssql/backup directory for restoring a backup file seemed to work fine and I was able to successfully run the restore.
Just did a complete delete and fresh install of docker.
Increased #CPUs to 4 (had previously reduced to 2).
Created microsoft/mssql-server-linux:2017-latest container and is now running without problems.
My issue was probably not the same as the parent.
twright and pnmaher. Thank you for the help! My SQL Server is running on IOS 10.13.3 :)
Like pnmaher:-
All is good! 👍 Please close this ticket.
@maxpwr2999 - great, good to hear!
@travismiller - yeah, _reading_ from a mounted volume should be fine. It's the writing that is a problem on macOS.
Thanks for everyone's help! After resetting Docker with Remove all data in Preferences, I was also able to get it back up and running. Removing and re-installing the Docker application was not necessary.
I'm still unclear on what's breaking however. Even after removing all containers and volumes, and establishing new containers without any defined volumes, I continue to get the error. What _IS_ persisting that keeps this in a broken state once it is broken? Why is a complete reset of all Docker data the only way we are able recover from this?
For reference, here's my working docker-compose.yml.
version: '3'
services:
mssql-server:
image: microsoft/mssql-server-linux:2017-latest
container_name: mssql-server
volumes:
- mssql-data:/var/opt/mssql
- ./mssql-backup:/var/opt/mssql/backup
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=yourStrong(!)Password
ports:
- "1433:1433"
volumes:
mssql-data:
$ docker-compose up
Creating network "docker_default" with the default driver
Creating volume "docker_mssql-data" with default driver
Pulling mssql-server (microsoft/mssql-server-linux:2017-latest)...
2017-latest: Pulling from microsoft/mssql-server-linux
f6fa9a861b90: Pull complete
…
ea7199b7fbb6: Pull complete
Digest: sha256:fa1265cae3447320542cd0d1da160988aeffe5d2ae602a84336ddbd069e2b4ee
Status: Downloaded newer image for microsoft/mssql-server-linux:2017-latest
Creating mssql-server ... done
Attaching to mssql-server
mssql-server | 2018-01-30 14:32:13.60 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
…
2018-01-30 14:35:27.14 Backup RESTORE DATABASE successfully processed 289998 pages in 21.194 seconds (106.898 MB/sec).
^CGracefully stopping... (press Ctrl+C again to force)
Stopping mssql-server ... done
$ docker-compose up -d
Starting mssql-server ... done
$ docker-compose down
Stopping mssql-server ... done
Removing mssql-server ... done
Removing network docker_default
$ docker-compose up
Creating network "docker_default" with the default driver
Creating mssql-server ... done
Attaching to mssql-server
mssql-server | 2018-01-30 14:42:45.81 Server Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64)
…
Hi travismiller;
What helped me were two things in 'my' #4 above: I added '/bin/true' to the first command, and '--volumes-from' for the second command.
i Have my custom server image which is working fine on OS X version 10.13.2 and lower but not working on 10.13.3 , When i am trying to start the container it exit automatically with error 255. Is there any solution to get rid off this issue. Docker Info -: Version 17.12.0-ce-mac49 (21995) Channel: stable f50f37646d . Also i have attached my custom DockerFile
Dockerfile.txt
@param0091 - If you docker run _without_ -d do you see anything useful in the output?
Attached is the log file when run without -d
Hi param0091, that was the original issue I had; and I am running Docker on 10.13.3. Step 4 above(from my email chain) fixed the error. I also have upgraded to Docker Edge last night because I need to test Kubernetes. After re-running step 4 above, I no longer face any issues.
However, please note that I am learning Docker/Kubernetes hence I don't have any problems if I lose data in SQL server. That might not be the case for you. Thank you.
Hello maxpwr2999, thanks for your reply and i will try you steps but basically these are the set of commands which i'm executing right now.
docker load -i server.tar
docker run -d --name name_your_container -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@55w0rd' -e 'MSSQL_PID=Developer' -p 1433:1433 server
docker cp /Users/param/Desktop/bak/AdventureWorks2012.bak jklaws:/tmp/
4.docker exec jklaws /opt/mssql-tools/bin/sqlcmd -U sa -P P@55w0rd -Q "RESTORE DATABASE [AdventureWorks2012] FROM DISK='/tmp/AdventureWorks2012.bak' WITH MOVE 'AdventureWorks2012_Data' TO '/var/opt/mssql/data/AdventureWorks2012_Data.mdf', MOVE 'AdventureWorks2012_log' TO '/var/opt/mssql/data/AdventureWorks2012_log.ldf' "
FWIW I just got the same error message after I changed Docker to use 2 CPU's from the default 4. Once I changed it back to 4, I was able to start the server up again.
Nevermind, no it didn't. still not starting up.
Hi param0091,
I think \bin\true (from 4(i) and --volumes-from mssql -d from 4(ii) above made the difference - because before that, I tried all other options but kept getting that 255 error. Good Luck!
Hi @maxpwr2999
I have tried the command but still facing same issue. My modified commands are below
let me know if i want to change something
Thanks,
I just started learning this and now getting into Kubernetes.[Other folks might be able to help out...]
Can you pls try these FULL commands one more time but with a more complex password? [My example above didn't have the real password...] *Replace Test@123 with a more complex password.
docker create -v /var/opt/mssql --name mssql microsoft/mssql-server-linux /bin/true
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Test@123' -p 1433:1433 --volumes-from mssql -d --name sql-server microsoft/mssql-server-linux
So, I am hitting the same issue and it started happening out of the blue after working for a long while:
sqlserver_db_1 | Dump collecting thread [7] hit exception [6]. Exiting.
tugberkweb_sqlserver_db_1 exited with code 255
I have ran:
docker rm 371ea73f8a1c
to remove the container and tried to start a new container. I am getting the same error which is pretty annoying cuz there is no state persisted between these two containers and I have no idea why this is happening. This is my manifest for the SQL Server container inside docker-compose file:
sqlserver_db:
image: 'microsoft/mssql-server-linux:2017-latest'
environment:
MSSQL_SA_PASSWORD: 'Passw0rd'
ACCEPT_EULA: 'Y'
ports:
- '1433:1433'
@travismiller
I Thank you in advance your contribution; Can you share the docker-compose.yml file? I like to know how declare the volume mssql-data to persist the databases
Thanks for everyone's help! After resetting Docker with
Remove all datain Preferences, I was also able to get it back up and running. Removing and re-installing the Docker application was not necessary.I'm still unclear on what's breaking however. Even after removing all containers and volumes, and establishing new containers without any defined volumes, I continue to get the error. What _IS_ persisting that keeps this in a broken state once it is broken? Why is a complete reset of all Docker data the only way we are able recover from this?
For reference, here's my working
docker-compose.yml.version: '3' services: mssql-server: image: microsoft/mssql-server-linux:2017-latest container_name: mssql-server volumes: - mssql-data:/var/opt/mssql - ./mssql-backup:/var/opt/mssql/backup environment: - ACCEPT_EULA=Y - SA_PASSWORD=yourStrong(!)Password ports: - "1433:1433" volumes: mssql-data:$ docker-compose up Creating network "docker_default" with the default driver Creating volume "docker_mssql-data" with default driver Pulling mssql-server (microsoft/mssql-server-linux:2017-latest)... 2017-latest: Pulling from microsoft/mssql-server-linux f6fa9a861b90: Pull complete … ea7199b7fbb6: Pull complete Digest: sha256:fa1265cae3447320542cd0d1da160988aeffe5d2ae602a84336ddbd069e2b4ee Status: Downloaded newer image for microsoft/mssql-server-linux:2017-latest Creating mssql-server ... done Attaching to mssql-server mssql-server | 2018-01-30 14:32:13.60 Server Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'. … 2018-01-30 14:35:27.14 Backup RESTORE DATABASE successfully processed 289998 pages in 21.194 seconds (106.898 MB/sec). ^CGracefully stopping... (press Ctrl+C again to force) Stopping mssql-server ... done $ docker-compose up -d Starting mssql-server ... done $ docker-compose down Stopping mssql-server ... done Removing mssql-server ... done Removing network docker_default $ docker-compose up Creating network "docker_default" with the default driver Creating mssql-server ... done Attaching to mssql-server mssql-server | 2018-01-30 14:42:45.81 Server Microsoft SQL Server 2017 (RTM-CU3-GDR) (KB4052987) - 14.0.3015.40 (X64) …
@lcuriel I have not been active on the project that used this in a while, though the docker-compose.yml I included above is complete. It starts with version: '3' and ends with mssql-data:. There is nothing more to it.
@lcuriel I have not been active on the project that used this in a while, though the
docker-compose.ymlI included above is complete. It starts withversion: '3'and ends withmssql-data:. There is nothing more to it.
@travismiller Thank you
Most helpful comment
twright and pnmaher. Thank you for the help! My SQL Server is running on IOS 10.13.3 :)
Like pnmaher:-
docker create -v /var/opt/mssql --name mssql microsoft/mssql-server-linux /bin/true
docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Test@123' -p 1433:1433 --volumes-from mssql -d --name sql-server microsoft/mssql-server-linux
All is good! 👍 Please close this ticket.