microsoft/WSL

docker run remote error: tls: bad record MAC.

Closed this issue · 6 comments

  • Your Windows build number: Microsoft Windows [Version 10.0.18936.1000]

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

  • What's wrong / what should be happening instead:
    root@LAPTOP-BPPURGE2:/mnt/c/Users/appenthused# docker run hello-world
    Unable to find image 'hello-world:latest' locally
    docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: remote error: tls: bad record MAC.
    See 'docker run --help'.

@appenthused Plugging in my network cable resolved this.

I hit this as well. Ping and other network-related commands worked fine. Tried a few fixes (below), but issue is resolved with plugging in network cable (so specific to the wifi/vethernet bridge, I guess).

I can now remove the cable and all is well with docker in WSL2, BUT upon reboot, I have the same issue and need to re-cable.

INFO:
Windows 18936.1000
Killer E2500 Gigabit Ethernet

TRIED (to no avail):

  1. Uninstall all network components and reinstall
  2. Alt method of starting docker sudo /etc/init.d/docker start vs. sudo service docker start
  3. Different versions of linux from the store
  4. Uninstall docker desktop
  5. Create a wsl.conf in /etc
  6. Drop firewall

MORE INFO - likely not a docker issue... 1 hour later with docker working swimmingly, again, san cable:

➜ tendermint git clone http://github.com/tendermint/tendermint.git
Cloning into 'tendermint'...
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: The remote end hung up unexpectedly
➜ tendermint
➜ tendermint
PLUGIN ETHERNET:
➜ tendermint git clone http://github.com/tendermint/tendermint.git
Cloning into 'tendermint'...
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: The remote end hung up unexpectedly
➜ tendermint git clone http://github.com/tendermint/tendermint.git
Cloning into 'tendermint'...
remote: Enumerating objects: 31, done.
remote: Counting objects: 100% (31/31), done.
remote: Compressing objects: 100% (24/24), done.
remote: Total 57257 (delta 14), reused 14 (delta 5), pack-reused 57226
Receiving objects: 100% (57257/57257), 59.98 MiB | 7.09 MiB/s, done.
Resolving deltas: 100% (38085/38085), done.

However, pulling the plug in the git clone case causes the git clone to fail again. The TLS(?) work-around for docker doesn't stick the same way for git:

@vanstinator Resolved. Thanks! It was a Killer Networking driver.

现在可以确定,OpenSSL的握手过程不是多线程安全的操作,在我写这篇文章前,网络上却始终没有一个人给出这个解答,真是悲剧,不过你很走运,如果你的软件,或者开源软件使用了OPEN SSL,使用多线程过程中出现随机的bad record mac, 或者干脆卡在tls握手阶段,恭喜你中招,解决办法只有一个,取消掉多线程握手加速,当然你想重写OpenSSL握手函数,我会非常佩服,成功了记得告诉我一声

CS2Us commented

I was checking this problem and i finally figure out: the reason is because the intel wifi card driver. when i update the driver to the latest version but it can't work, so i go to the internet wift card driver setting and Roll Back Driver to the previous version. it finally work. So, if you update to the latest version and then it can't work, try roll back to the previous version.