"tls: oversized record received with length 20527" trying to "docker run" from Win10 WSL Bash only

spex66 picture spex66 · Mar 1, 2018 · Viewed 7.9k times · Source

reproduction

Latest Docker Edge (18.03.0-ce-rc1-win54 (16164)) installed on Win10.

Switched to "Linux Container" before updated to latest Docker CE Edge version (but latest "Docker for Windows" UI don't show the switch option anymore?!).

No problem to run docker run hello-world from Windows CMD.

But calling the same from WSL Bash (latest Win10 1709) always respond with this tls error message:

$ docker images
REPOSITORY                        TAG                        IMAGE ID            CREATED             SIZE
continuumio/miniconda3            latest                     29af5106b6a4        17 hours ago        443 MB
hello-world                       latest                     f2a91732366c        3 months ago        1.85 kB

$ docker --version
Docker version 1.13.1, build 092cba3

$ docker version
Client:
 Version:      1.13.1
 API version:  1.26
 Go version:   go1.6.2
 Git commit:   092cba3
 Built:        Thu Nov  2 20:40:23 2017
 OS/Arch:      linux/amd64

Server:
 Version:      18.03.0-ce-rc1
 API version:  1.37 (minimum version 1.12)
 Go version:   go1.9.4
 Git commit:   c160c73
 Built:        Thu Feb 22 02:42:37 2018
 OS/Arch:      linux/amd64
 Experimental: true

$ echo $DOCKER_HOST
tcp://0.0.0.0:2375

$ docker run hello-world
tls: oversized record received with length 20527

This setting seems unrelated, but necessary to run the docker command at all:

Expose daemon on tcp://localhost:2375 without TLS

question

I wonder why this is not a common reported problem for Windows Docker / WSL usage. Something seems to be messed up, but I've no clue where to start to look into.

For example:

  1. Why does the problem only appear under WSL Bash and not Windows CMD?
  2. How to change daemon.json value for "insecure-registries": [] as some SO related messages advice?

Any help / pointers are appreciated!

(=PA=)

Answer

spex66 picture spex66 · Mar 16, 2018

Solution

As this freaked me out a bit, I made another Google session and found the solution down in the comments of this side: * https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly

In a nutshell: * The issue I've described comes from an default but outdated docker.io installation, instead of the latest and maintained docker-ce installation.

Once I've removed the old one with (the trailing * is intended!):

sudo apt-get remove --purge docker*

and installed the latest docker-ce one -- according to the procedure described on the page above -- the TLS issue was gone!

Happy docking.