podman wsl2在windows重启后报错ERRO[0000] error joining network namespace for container
1. error joining network namespace for container
如果没有先停止容器就重启windows,极大概率就会出现这个问题
解决方法
先停止停止的容器再启动已退出的容器. 会提示无法启动,但现在可以podman ps,也可以继续执行podman start来启动容器了, 很神奇,是吧
podman stop $(podman ps 2>&1 | grep -oE 'for container [a-f0-9]+' | awk '$0=$NF') podman start $(podman ps --format '{{.Names}}' --filter status=exited)
2. Error refreshing volume
类似这样的
$ podman ps -a ERRO[0000] Error refreshing volume 20115fd77826acd6308a6dceb6318062fcdae8e3626c7b3367de25d328e93a2f: error acquiring lock 1 for volume 20115fd77826acd6308a6dceb6318062fcdae8e3626c7b3367de25d328e93a2f: file exists ERRO[0000] Error refreshing volume 74d3b3f07e31ce9baabd307ebfea62c0860aa2454babff744c04e828eb571b89: error acquiring lock 2 for volume 74d3b3f07e31ce9baabd307ebfea62c0860aa2454babff744c04e828eb571b89: file exists ERRO[0000] Error refreshing volume fbbb149df2df1ed1ac1092976de6216e604ea773958ee812e3e24e0d1e635850: error acquiring lock 1 for volume fbbb149df2df1ed1ac1092976de6216e604ea773958ee812e3e24e0d1e635850: file exists ERRO[0000] Error refreshing volume spec: error acquiring lock 1 for volume spec: file exists CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
解决方法
podman system renumber