_or_
The connection gets opened and the application continues.
The connection does not get opened, the application hangs on the .Open() method call.
The issue only occurs in docker images based on mcr.microsoft.com/dotnet/core/runtime:3.0-buster-slim (tested 3.0.0-alpine3.9, 3.0.0-disco, 3.0.0-bionic, the code runs fine in these containers).
docker versionClient: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:13:06 2019
OS/Arch: linux/amd64
Experimental: false
docker infoContainers: 43
Running: 1
Paused: 0
Stopped: 42
Images: 133
Server Version: 18.09.2
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 local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.125-linuxkit
Operating System: Docker for Windows
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.934GiB
Name: linuxkit-00155de3300c
ID: 3HKI:LSNS:WMPD:J4SS:6YT7:VWZN:AI4P:X7N3:7QMJ:C6K5:NYJU:CO7W
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 36
Goroutines: 62
System Time: 2019-10-14T12:37:16.6440944Z
EventsListeners: 3
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Looks to be a duplicate of https://github.com/dotnet/SqlClient/issues/222.
Ah yes, indeed. I had not yet found the issue and the solution posted there. Thanks 馃憤
I can confirm that adding the following two lines to the Dockerfile fixes the issue:
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /etc/ssl/openssl.cnf
RUN sed -i 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/g' /usr/lib/ssl/openssl.cnf
Most helpful comment
Ah yes, indeed. I had not yet found the issue and the solution posted there. Thanks 馃憤
I can confirm that adding the following two lines to the Dockerfile fixes the issue: