WSL2 배포가 충분하지 않은 상태에서 Docker Desktop Use the WSL2 based engine을 사용하도록 설정했을 때의 해결 방법

10188 단어 도커WSL2

환경


  • Windows 10 Pro 2004 (19041)
  • Docker Desktop 2.3.0.4

  • 배경





    WSL2의 도입이 불충분한 상태(※)로 Docker Desktop의 Use the WSL2 based engine를 유효하게 해 버리면, 경우에 따라서는 Docker Desktop를 기동할 수 없게 되어 버린다.
    ※필자의 경우는 VPN 소프트웨어가 기동하고 있을 때에 WSL2 를 인스톨 해 버렸기 때문에, 인스톨했지만 WSL2 의 기동을 할 수 없는 상태에 빠져 버렸다.
    htps : // 기주 b. 코 m/미 c로소 ft/WSL/이스에 s/5351

    일단 이렇게 되면 Docker Desktop의 Factory Reset을 걸어도, 재설치해도 개선되지 않았다. (Use the WSL2 based engine이 ☑인 상태.)

    해결책


    Docker Desktop を起動 → [起動中] → エラーで落ちる
    

    "시작 중"인 동안 작업 트레이에서 Docker Desktop 설정 창을 엽니 다.
    그 후, 다시 Use the WSL2 based engine의 체크를 해제하면 된다.

    설정 창이 열리면 괜찮습니다.
    Apply 버튼을 누를 때 Docker Desktop이 오류로 떨어지면 설정이 완료되지 않는 것처럼 보이지만 수동으로 창을 닫을 수 있습니다.

    다시 Docker Desktop을 다시 시작하면 WSL2가 체크되지 않은 상태에서 시작됩니다.

    노트: Docker Desktop에 출력되는 오류 메시지


    [16:02:30.382][LoggingMessageHandler][Info   ] [5b30b70a] <BackendAPIClient end> POST http://backend/hyperv/stop -> 204 NoContent (took 9149ms)
    [16:02:30.387][ApiProxy          ][Info   ] Killing existing com.docker.proxy with PID 19304
    [16:02:30.429][VpnKit            ][Info   ] Killing existing vpnkit with PID 16264
    [16:02:30.458][VpnKitBridge      ][Info   ] Killing existing vpnkit-bridge with PID 2208
    [16:02:30.482][EngineStateMachine][Debug  ] sending state Docker.ApiServices.StateMachines.StoppedState to state change sink
    [16:02:30.482][EngineStateMachine][Debug  ] State Docker.ApiServices.StateMachines.StoppedState sent to state change sink
    [16:02:30.482][EngineStateListener][Debug  ] received state Docker.ApiServices.StateMachines.StoppedState from LinuxHyperV
    [16:02:30.483][EngineStateNotificationRecorder][Debug  ] Registered state {"State":"stopped","Mode":"linux","date":1599634950}
    [16:02:30.483][SystrayNotifications][Info   ] Docker has stopped
    [16:02:30.483][LoggingMessageHandler][Info   ] [a1a2394b] <NotificationsClient start> POST http://localhost/engine/state
    [16:02:30.492][LoggingMessageHandler][Info   ] [a1a2394b] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 8ms)
    [16:02:30.501][Engines           ][Debug  ] Starting
    [16:02:30.502][LoggingMessageHandler][Info   ] [abeb5d24] <BackendAPIClient start> POST http://backend/versionpack/enable
    [16:02:30.520][LoggingMessageHandler][Info   ] [abeb5d24] <BackendAPIClient end> POST http://backend/versionpack/enable -> 204 NoContent (took 18ms)
    [16:02:30.520][EngineStateMachine][Debug  ] sending state Docker.ApiServices.StateMachines.StartTransition to state change sink
    [16:02:30.520][EngineStateMachine][Debug  ] State Docker.ApiServices.StateMachines.StartTransition sent to state change sink
    [16:02:30.521][EngineStateListener][Debug  ] received state Docker.ApiServices.StateMachines.StartTransition from LinuxWSL2
    [16:02:30.521][EngineStateNotificationRecorder][Debug  ] Registered state {"State":"starting","Mode":"linux","date":1599634950}
    [16:02:30.521][SystrayNotifications][Info   ] Docker is starting
    [16:02:30.522][LoggingMessageHandler][Info   ] [fdbe74be] <NotificationsClient start> POST http://localhost/engine/state
    [16:02:30.527][LinuxWSL2Engine   ][Info   ] Terminating lingering processes and wsl distros and patching host file
    [16:02:30.527][LoggingMessageHandler][Info   ] [15e2371f] <BackendAPIClient start> POST http://backend/dns/refresh-hosts
    [16:02:30.532][LoggingMessageHandler][Info   ] [fdbe74be] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 10ms)
    [16:02:30.604][LoggingMessageHandler][Info   ] [15e2371f] <BackendAPIClient end> POST http://backend/dns/refresh-hosts -> 204 NoContent (took 77ms)
    [16:02:30.609][WSL2Provisioning  ][Info   ] Checking docker-desktop
    [16:02:30.613][WSL2Provisioning  ][Info   ] deploying WSL distro docker-desktop to C:\Users\ogawa\AppData\Local\Docker\wsl\distro
    [16:02:31.338][WSL2Provisioning  ][Error  ] Failed to set version to docker-desktop: exit code: -1
     stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
    
     stderr: 
    [16:02:31.343][LinuxWSL2Engine   ][Info   ] Stopping windows side processes
    [16:02:31.418][LinuxWSL2Engine   ][Info   ] Stopping engine
    [16:02:31.529][LinuxWSL2Engine   ][Warning] Failed to send stop message to distro, will terminate abrubtly: 
    [16:02:31.647][LoggingMessageHandler][Info   ] [fe4e5f2d] <BackendAPIClient start> POST http://backend/windowsfeatures/check
    [16:02:32.062][LoggingMessageHandler][Info   ] [fe4e5f2d] <BackendAPIClient end> POST http://backend/windowsfeatures/check -> 200 OK (took 414ms)
    [16:02:32.607][LinuxWSL2Engine   ][Info   ] Terminating lingering processes and wsl distros and patching host file
    [16:02:32.607][LoggingMessageHandler][Info   ] [84dcd8a7] <BackendAPIClient start> POST http://backend/dns/refresh-hosts
    [16:02:32.667][WSL2Provisioning  ][Info   ] Checking docker-desktop
    [16:02:32.667][WSL2Provisioning  ][Info   ] deploying WSL distro docker-desktop to C:\Users\ogawa\AppData\Local\Docker\wsl\distro
    [16:02:32.686][LoggingMessageHandler][Info   ] [84dcd8a7] <BackendAPIClient end> POST http://backend/dns/refresh-hosts -> 204 NoContent (took 77ms)
    [16:02:33.320][WSL2Provisioning  ][Error  ] Failed to set version to docker-desktop: exit code: -1
     stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
    
     stderr: 
    [16:02:33.320][LinuxWSL2Engine   ][Info   ] Stopping windows side processes
    [16:02:33.387][LinuxWSL2Engine   ][Info   ] Stopping engine
    [16:02:33.473][LinuxWSL2Engine   ][Warning] Failed to send stop message to distro, will terminate abrubtly: 
    [16:02:33.556][EngineStateMachine][Debug  ] sending state Docker.ApiServices.StateMachines.FailedToStartState to state change sink
    [16:02:33.556][EngineStateMachine][Debug  ] State Docker.ApiServices.StateMachines.FailedToStartState sent to state change sink
    [16:02:33.556][EngineStateListener][Debug  ] received state Docker.ApiServices.StateMachines.FailedToStartState from LinuxWSL2
    [16:02:33.557][EngineStateNotificationRecorder][Debug  ] Registered state {"State":"failed to start","Mode":"linux","date":1599634953}
    [16:02:33.557][LoggingMessageHandler][Info   ] [26d81e32] <NotificationsClient start> POST http://localhost/engine/state
    [16:02:33.558][SystrayNotifications][Error  ] Failed to set version to docker-desktop: exit code: -1
     stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
    
     stderr: 
    [16:02:33.568][LoggingMessageHandler][Info   ] [26d81e32] <NotificationsClient end> POST http://localhost/engine/state -> 200 OK (took 11ms)
    [16:02:33.589][Engines           ][Error  ] Start failed with Failed to set version to docker-desktop: exit code: -1
     stdout: ?[L?W0?0F0h0W0_0?d\Oo00?SgqW0_0?0?0?0?0?0?0n0.z^?g0o0?0?0?0?0U0?0f0D0~0[0?00
    
     stderr: 
       場所 Docker.Core.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Core\WslCommand.cs:行 119
       場所 Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__6.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:行 48
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
       場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       場所 Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__23.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:行 91
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
       場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       場所 Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:行 29
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
       場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       場所 Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:行 67
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
       場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       場所 Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:行 92
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
       場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       場所 Docker.ApiServices.StateMachines.EngineStateMachine.<StartAsync>d__14.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\EngineStateMachine.cs:行 72
    --- 直前に例外がスローされた場所からのスタック トレースの終わり ---
       場所 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       場所 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       場所 Docker.Engines.Engines.<StartAsync>d__24.MoveNext() 場所 C:\workspaces\stable-2.3.x\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:行 109)
    

    좋은 웹페이지 즐겨찾기