记录一次Windows重启导致的docker报错

win11电脑,有个ARMOURY CRATE的软件更新,居然直接给我电脑重启了,后面他还没更新成功 我焯

结果就是docker报错了

1
running engine: waiting for the VM setup to be ready: starting WSL engine: bootstrapping in the main distro: starting wsl-bootstrap: context canceled

又重启docker软件和电脑升级docker desktop都没用 wsl确定有问题了

后面在docker desktop中的troubleshooting中Clean / Purge data清除了wsl重新安装wsl才可以

参考这个安装的wsl https://learn.microsoft.com/en-us/windows/wsl/install-manual

最后就是开梯子重新启动

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
PS E:\mine\app\immich-app> docker-compose.exe up -d
[+] Running 2/5
- immich-server [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀] Pulling 14.1s
- immich-microservices Pulling 14.1s
- immich-machine-learning [⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀] Pulling 14.1s
✘ database Error context canceled 14.1s
✘ redis Error Get "https://registry.hub.docker.com/v2/": context deadline exceeded 14.1s
Error response from daemon: Get "https://registry.hub.docker.com/v2/": context deadline exceeded
### 报错就是没开梯子
PS E:\mine\app\immich-app> docker-compose.exe up -d
[+] Running 62/5
✔ immich-machine-learning Pulled 168.9s
✔ immich-microservices Pulled 272.6s
✔ redis Pulled 271.4s
✔ database Pulled 281.4s
✔ immich-server Pulled 272.5s
[+] Running 7/7
✔ Network immich_default Created 0.0s
✔ Volume "immich_model-cache" Created 0.0s
✔ Container immich_redis Started 0.9s
✔ Container immich_machine_learning Started 1.1s
✔ Container immich_postgres Started 1.0s
✔ Container immich_server Started 1.0s
✔ Container immich_microservices Started 0.9s

第二天开机docker报错

1
running engine: waiting for the VM setup to be ready: starting WSL engine: bootstrapping in the main distro: running wsl-bootstrap: exit status 0xffffffff

开终端wsl指令报错

1
2
The attempted operation is not supported for the type of object referenced.
Error code: Wsl/Service/0x8007273d

参考这个https://wangyj.medium.com/the-solution-to-wsl-error-the-attempted-operation-is-not-supported-for-the-type-of-object-aa559854d1e3 执行netsh winsock reset解决了

1
2
3
4
5
6
7
8
9
10
11
12
13
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\weimo> netsh winsock reset

Sucessfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.

PS C:\Users\weimo> wsl.exe
DESKTOP-E71FGHT:/mnt/host/c/Users/weimo#
PS C:\Users\weimo>

要永久解决下载NoLsp.exe工具到C:\Windows\system32 下载链接 http://www.proxifier.com/tmp/Test20200228/NoLsp.exe

然后执行 NoLsp.exe C:\Windows\system32\wsl.exe

1
2
PS C:\Users\weimo> NoLsp.exe C:\Windows\system32\wsl.exe
Success!

2025-02-11

电脑在某次开机wsl又不行了 还有弹窗报错读不到内存中的地址

我直接重装系统+wsl根治问题

目前docker运行良好

作者

Wei Mo

发布于

2025-01-23

更新于

2025-02-19

许可协议

评论