I'm trying to integrate VSTS with Docker to run automated tests, and I want to dockerize my databases to maintain a consistent database state among tests without take care of cleanup step, running a new container with no modifications. But I have receiving a lot of errors from Docker for containerize a SQL Server database. Frequently my containers hangs, and I can't stop or remove these containers without reboot the Boot2Docker VM. Sometimes, I receive a error message for any Docker command after that error. Even a simple docker ps or docker version didn't work after a container hangs (sometimes these commands work, but stop or remove don't after container hanging), giving me the following error message:
- error during connect: Post https://192.168.99.100:2376/v1.26/containers/container-name/stop: dial tcp 192.168.99.100:2376: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
If I reopen the Docker QuickStart Terminal after this issue, I receive the following error description:
- Error getting IP address: ssh command error: command : ip addr show err : exit status 255
Because of that, I have to manually stop the default docker machine and reopen Docker Quickstart.
I have using a container released by Microsoft SQL Server to evaluate my solution, so a believe this container should work properly. So, to test my environment, I created a simple app with netcat server just to send several connections and evaluate whether for any reason my operating system, or Docker Toolbox, or anything related with, were causing these problems, but testing this simple docker server with several threads sending a lot of messages in several iterations my solution work properly with none errors. Dockerfile:
FROM centos:latest
RUN yum install nc -y
EXPOSE 1433CMD nc -l -k 1433 > /out.netcat
CMD nc -l -k 1433 > /out.netcat
Are there any released solution for these problems, or even an way to avoid it? Looking for solutions in Google, I couldn't identify any solution, I just identified that there are others with the same errors. Can Docker be used to containerize databases?
Environment:
$ docker version
time="2017-03-31T10:23:50-03:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
Client:
Version: 1.13.1
API version: 1.26
Go version: go1.7.5
Git commit: 092cba3
Built: Wed Feb 8 08:47:51 2017
OS/Arch: windows/amd64
Server:
Version: 17.03.0-ce
API version: 1.26 (minimum version 1.12)
Go version: go1.7.5
Git commit: 3a232c8
Built: Tue Feb 28 07:52:04 2017
OS/Arch: linux/amd64
Experimental: false
$ docker info
time="2017-03-31T10:27:10-03:00" level=info msg="Unable to use system certificate pool: crypto/x509: system root pool is not available on Windows"
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 25
Server Version: 17.03.0-ce
Storage Driver: aufs
Root Dir: /mnt/sda1/var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 25
Dirperm1 Supported: true
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: docker-init
containerd version: 977c511eda0925a723debdc94d09459af49d082a
runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70
init version: 949e6fa
Security Options:
seccomp
Profile: default
Operating System: Boot2Docker 17.03.0-ce (TCL 7.2); HEAD : f11a204 - Thu Mar 2 00:14:47 UTC 2017
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.491 GiB
Name: default
ID: 56MH:QSVM:SCCQ:DKVC:HBNI:AYJK:UCQN:2UJZ:A4NV:KOZQ:XC67:EEPY
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 14
Goroutines: 22
System Time: 2017-03-31T13:27:08.809341202Z
EventsListeners: 0
Username: pablogoulart
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
docker logs container-name:
This is an evaluation version. There are [164] days left in the evaluation period.
RegQueryValueEx HADR for key "Software\Microsoft\Microsoft SQL Server\MSSQL\MSSQLServer\HADR" failed.
2017-03-31 12:30:40.77 Server Microsoft SQL Server vNext (CTP1.4) - 14.0.405.198 (X64)
Mar 11 2017 01:54:12
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
on Linux (CentOS Linux 7 (Core))
2017-03-31 12:30:40.78 Server UTC adjustment: 0:00
2017-03-31 12:30:40.78 Server (c) Microsoft Corporation.
2017-03-31 12:30:40.78 Server All rights reserved.
2017-03-31 12:30:40.78 Server Server process ID is 4116.
2017-03-31 12:30:40.78 Server Logging SQL Server messages in file 'C:\var\opt\mssql\log\errorlog'.
2017-03-31 12:30:40.79 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-03-31 12:30:41.29 Server SQL Server detected 1 sockets with 1 cores per socket and 1 logical processors per socket, 1 total logical processors; using 1 logical processors based on SQL Server licensing. This is an informational message; no user action is required.
2017-03-31 12:30:41.34 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2017-03-31 12:30:41.37 Server Detected 2860 MB of RAM. This is an informational message; no user action is required.
2017-03-31 12:30:41.37 Server Using conventional memory in the memory manager.
2017-03-31 12:30:41.51 Server Default collation: SQL_Latin1_General_CP1_CI_AS (us_english 1033)
2017-03-31 12:30:41.76 Server Buffer pool extension is already disabled. No action is necessary.
2017-03-31 12:30:41.97 Server InitializeExternalUserGroupSid failed. Implied authentication will be disabled.
2017-03-31 12:30:41.98 Server Implied authentication manager initialization failed. Implied authentication will be disabled.