Mar 21 2021

Docker freeze my PC

Category: — Duke @ 03:45

I’ve a quite old beast pc from 10+ year ago (i7 Lynnfield 4 core – 8 thread) but apart for the slow disks it is still reasonable to use(still faster than the “modern” laptop provided by my company)

ANyway i’ve always had an issue with Docker, which made the computer unstable.

if docker is enabled, it happens from times to times that the PC freeze completely, it happens more often when media app like spotify and netflix are running.

if dev tools are open at the same time, the chances multiplies, and there is no way to recover it other than hard reboot.

After a quick search i found that is not uncommon (Docker for Windows 10 Experiencing Random Freezes · Issue #3815 · docker/for-win · GitHub)

So far i’ve

  • checked that in the BIOS the hyperthreadin is set to Enabled and not Auto (but in my BIOS the option is not available at all, it is on by default)
  • updated windows and docker to the lates stable version
  • enabled “containes” in the windows feature
  • disabled all the network adapter which are unplugged (i’ve an additional NIC on the motherboard that is unplugged)
  • disabled the Windows compatibility telemetry  (do this anyway that only such you CPU cycle and power Permanently Disabling Windows Compatibility Telemetry - Microsoft Community)

To test i’ve launched spotify, netflixh vs code and i’m enabling kube on docker desktop… looks quite stable but only the time can say. Usually the issue appear after 1 or 2 hours so it is too early to say.

Anyway i’ve posted the action list, mainly as reminder to myself of what has been tryed already

Update: the fix above mentioned seems to work very well, no more lock or freeze or bluescreen, yay!

I suspect the important part is to disable all the disconnected network interfaces, and enable the “containers” windows feature (one of the two, i bet on the network interfaces…)

Update2: now that docker works let’s use kubernetes! but what if it stucks in “starting” forever? there is this nice guide Docker for Windows - Cannot list nodes: Get https://kubernetes.docker.internal:6443/api/v1/nodes: Forbidden - Stack Overflow

that reports these steps

1. Change DNS to fixed and use 8.8.8.8, this is within docker for window's settings

2. Remove the .kube

3. Add the KUBECONFIG environment variable to System Variables and have the path be C:\Users[MYUSER].kube\config. Note that before I had it set as a User Variable.

4. Restart Docker from the Docker for Window's reset tab in settings.

5. Restart Kubernetes Cluster from the Docker for Window's reset tab in settings (you can do this a number of times).

but it is not the whole story because the important part is to DAMMIT remove the PKI folder, but looks like that docker have changed the location of the folder during the time plus maybe windows have done some magic…

basically what worked for me, apart following the quite above is

  • uninstall docker
  • delete %LOCALAPPDATA%\Docker\ (the important part i suspect is the pki subfolder) (see note)

note: i suspect that the problem is that if you have an older installation you have removed more than 60 day before, the folder rest in place but the certificate expires and don’t get renewed, for som e reason resintalling docker keeps the previous certificates, expired and it is unable to renew them. So please delete it

delete also the .Kube and .docker folder inthe user’s home (here som ref Docker crashes at start: C:\\ProgramData\\DockerDesktop\\pki\\apiserver-kubelet-client.crt not found · Issue #2935 · docker/for-win · GitHub)

delete also Docker and DockerDesktop folder in C:\ProgramData

so many shit left behind….

if you find any other kube docker or docker desktop folder somewhere delete them as with with no mercy.

then happily resintall docker, possibly with the antivirus and firewall disabled, take care to follow the steps 1,3 of the guide above

enable kube in docker aaaaaaaand…. be patient. it may take several minutes to spawn!

finally it should start!

Tags:

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading