Skip to content

Backend aborts startup when it cannot remove its own AF_UNIX socket (error 1920) - Inference manager / Secrets Engine #531

Open

Description

@uday32367

Related: docker/for-win#14176 - same class (an AF_UNIX socket in the Docker/run directory aborts startup), but an older, different case: OTel manager, Docker 26.1.4, a socket-creation protocol error. This report is a distinct, current failure - error 1920 on remove of an existing socket, Inference manager + Secrets Engine, Docker Desktop 4.81.0 / engine 29.6.1.

Expected behavior

Docker Desktop starts. If a leftover AF_UNIX socket file cannot be removed, the
backend either forces past it (bind/replace, unique path, retry) or degrades the
affected optional service — the engine still comes up.

Actual behavior

The backend aborts the entire startup and shows "Docker Desktop encountered an
unexpected error and needs to close." The daemon never starts. The failing step is
a remove of a socket file Docker itself created, which Windows rejects with
error 1920 (ERROR_CANT_ACCESS_FILE).

Two different services fail this way, sequentially — fixing the first reveals
the next, with a different message, which makes this look like several unrelated bugs:

starting services: initializing Inference manager: listening on unix://C:/Users/<USER>/AppData/Local/Docker/run/dockerInference: remove C:/Users/<USER>/AppData/Local/Docker/run/dockerInference: The file cannot be accessed by the system. (listener: The filename, directory name, or volume label syntax is incorrect.)
starting services: initializing Secrets Engine: listening on unix://C:/Users/<USER>/AppData/Local/docker-secrets-engine/engine.sock: remove C:/Users/<USER>/AppData/Local/docker-secrets-engine/engine.sock: The file cannot be accessed by the system. (listener: The filename, directory name, or volume label syntax is incorrect.)

Note the message also contains a second, likely-bogus clause — listener: The filename, directory name, or volume label syntax is incorrect — for the path
unix://C:/Users/..., which mixes a URI scheme with a Windows path.

Information

  • Diagnostics ID: D41CE6AC-02AA-47C6-93AC-363D8C0B2A30/20260717123707
    (earlier occurrence of the same fault: .../20260717093426)
  • Docker Desktop 4.81.0 (Windows; x64)
  • Engine 29.6.1, API 1.55, overlayfs, kernel 6.18.33.2-microsoft-standard-WSL2
  • Windows 11 Home Single Language, 10.0.26200
  • WSL2 backend, containerd snapshotter enabled

Steps to reproduce

  1. Have Docker Desktop running normally.
  2. Terminate it uncleanly (force-kill the process; a crash or hard power-off does the same).
    This leaves %LOCALAPPDATA%\Docker\run\dockerInference and
    %LOCALAPPDATA%\docker-secrets-engine\engine.sock behind.
  3. Start Docker Desktop again.
  4. It fails with the error above and never starts.

Reproduced repeatedly on this machine: every ungraceful termination puts it in
this state, and it stays broken across restarts until the directory is renamed.

The orphaned socket is unremovable by any normal means

Every one of these fails with error 1920 on the leftover file:

Method Result
[System.IO.File]::Delete() error 1920
Remove-Item -Force / -Recurse error 1920
fsutil reparsepoint query / delete error 1920
robocopy empty-dir mirror fails
WSL rm -rf via /mnt/c/... fails silently, file remains
Renaming the PARENT directory works

The files report 0 bytes with the ReparsePoint attribute. The parent directory
renames happily even though its contents cannot be touched or even stat'd — which
is what makes the workaround possible.

Important: this is not only a stale-leftover problem

With EnableDockerAI: true, startup fails even against a freshly cleared
%LOCALAPPDATA%\Docker\run\ directory
. Docker recreates dockerInference
during startup and it is immediately inaccessible, so the very next
remove-then-bind fails. Deleting the leftovers does not fix it; only disabling the
feature does.

Workaround

  1. Fully quit Docker Desktop.
  2. Rename the offending directories aside (they cannot be deleted):
    • %LOCALAPPDATA%\Docker\run
    • %LOCALAPPDATA%\docker-secrets-engine
  3. Set "EnableDockerAI": false in %APPDATA%\Docker\settings-store.json — otherwise
    the Inference manager kills startup again on the next launch.
  4. Start Docker Desktop. It comes up clean.

Cost of the workaround: Docker Model Runner is unusable on this machine.

Impact

  • A single ungraceful shutdown permanently bricks Docker Desktop startup until
    manual filesystem surgery — with no in-product recovery path. "Reset to factory
    defaults" is the only offered action and is drastically out of proportion (it
    destroys all images, containers and volumes) for a stale socket file.
  • The error names an internal service and a path, not an action, so the user has
    no way to know that renaming a directory is the fix.
  • An optional subsystem (Inference/Model Runner) can take down the entire
    engine, for users who do not use it at all.

Suggested fixes

  1. Do not treat a failed socket remove as fatal to the whole backend — fall back
    to a fresh unique socket path, or bind over it.
  2. Isolate optional services: the Inference manager failing should disable Model
    Runner, not abort engine startup.
  3. Clean these sockets up on startup and on graceful shutdown, and handle
    error 1920 explicitly (rename-aside is demonstrably possible where delete is not).
  4. Fix or drop the misleading trailing clause listener: The filename, directory name, or volume label syntax is incorrect on unix://C:/... paths.
  5. Surface an actionable message + a targeted "clear stale sockets" recovery action
    in the error dialog, instead of offering only "Reset to factory defaults".

Activity

  1. transferred this issue fromdocker/for-winon Jul 20, 2026
  2. bsousaa commented on Jul 20, 2026

    @bsousaa
    Collaborator

    Can you please share a diagnostics?

  3. baramsesang-source commented on Aug 19, 2026

    @baramsesang-source

    Still reproducing on 4.87.0. On this machine, an unclean shutdown or a Windows reboot is not required to reproduce the failure — a clean stop followed by an immediate restart in the same session is enough.

    Environment

    • Docker Desktop 4.87.0 (236836), Docker Engine / CLI 29.7.2 (API 1.55)
    • Windows 11 Pro 25H2, build 26200.9168, WSL 2 backend, Docker VMM not enabled
    • com.docker.service: Stopped / Manual — it was not started during these reproductions, and no UAC prompt was required
    • "EnableDockerAI" was already false in settings-store.json, but that did not prevent the sailor-ingest.sock failure. With Inference disabled, the same failure class still occurs on a different internal AF_UNIX endpoint (the Ingest server).

    Reproduction: clean stop, no reboot

    1. Docker Desktop running and healthy
    2. docker desktop stop → prints ✓ Stopping Docker Desktop, exits 0
    3. Backend log reports sending desktop state:ExitHealthyState, then electron processes have shut down, shutting down vital services, [socketforwarder] root context has been cancelled
    4. Verified fully down: 0 Docker Desktop / com.docker.* processes, 0 Docker named pipes, docker-desktop WSL distro Stopped
    5. No reboot — start Docker Desktop again in the same Windows session
    6. Backend crashes:
    [com.docker.backend.exe] backend cancelling with error: starting services:
      initializing Ingest server: listening on
      unix://C:/Users/<user>/AppData/Local/Docker/run/sailor-ingest.sock:
      remove C:/Users/<user>/AppData/Local/Docker/run/sailor-ingest.sock:
      The file cannot be accessed by the system.
      (listener: The file cannot be accessed by the system.)
    [com.docker.backend.exe] backend crashed, dumping error to file and reporting to user
    

    The five runtime endpoints are still on disk after the clean stop completes, with LastWriteTime unchanged from the previous start:

    • %LOCALAPPDATA%\Docker\run\dockerInference
    • %LOCALAPPDATA%\Docker\run\dockerEthernetVfkit
    • %LOCALAPPDATA%\Docker\run\sailor-ingest.sock
    • %LOCALAPPDATA%\Docker\run\userAnalyticsOtlpHttp.sock
    • %LOCALAPPDATA%\docker-secrets-engine\engine.sock

    In my runs, startup aborted at sailor-ingest.sock (Ingest server) before any later socket-related failure was logged. This is a different first fatal endpoint from dockerInference or the Secrets Engine socket reported in related cases.

    I also tried the two shutdown paths already described in this issue, on the same machine and the same day:

    • Docker running → Windows Restart → start = FAIL
    • docker desktop stop (exit 0) → Windows Restart → start = FAIL

    In my case, a reboot did not clear the endpoints. They survived with their original timestamps, and the next start still failed.

    Workaround (3/3 here)

    With no Docker process running, rename (do not delete):

    • %LOCALAPPDATA%\Docker\run
    • %LOCALAPPDATA%\docker-secrets-engine

    to <name>.stale-<timestamp>, then start Docker Desktop normally.

    The Engine responded in about 10 seconds each time on the same Docker Desktop 4.87.0 installation, without elevation. Named volumes retained their original creation timestamps, and the containers returned healthy with their ports published. No data loss occurred, and "Reset to factory defaults" was not needed.

    This machine has accumulated 13 run.stale-* and 10 docker-secrets-engine.stale-* directories since 2026-08-15, showing that this has recurred repeatedly rather than being a one-off event.

    Observed vs. not claimed

    Observed:

    • The graceful stop completed successfully.
    • The runtime endpoint remained.
    • An immediate same-session restart failed.
    • The backend attempted to remove sailor-ingest.sock.
    • Windows returned The file cannot be accessed by the system.
    • The backend aborted startup.
    • Parent-directory quarantine restored startup immediately.

    Not claimed:

    • That Docker's source code is definitely the sole cause.
    • That filesystem, security, or filter drivers cannot contribute.
    • That leaving an endpoint file after shutdown is necessarily itself a bug.

    Related observations also look similar to #460 and #554.

    A local Docker diagnostics bundle is available and can be uploaded if maintainers need a Diagnostics ID.

  4. eljaunis commented on Aug 28, 2026

    @eljaunis

    Still reproduces on Docker Desktop 4.88.1 (237512) after a clean Docker-managed restart.

    Environment

    • Docker Desktop 4.88.1 (237512), Docker Engine and CLI 29.7.2, API 1.55
    • Windows 11 build 10.0.26200.9278
    • WSL 2.7.11.0, kernel 6.18.33.2-2, docker-desktop version 2
    • Active context: desktop-linux
    • WslEngineEnabled=true
    • UseLibkrun=false
    • EnableDockerAI=false during the final persistence test

    Reproduction

    1. Fully stopped Docker Desktop and verified zero remaining Docker Desktop or backend processes.
    2. Renamed both runtime directories as a reversible pair, then let Docker recreate them:
      • %LOCALAPPDATA%\Docker\run
      • %LOCALAPPDATA%\docker-secrets-engine
    3. Started Docker Desktop. It reached running; docker version, docker info, and docker run --rm hello-world all exited 0. Four existing services returned healthy, with 23 containers and 34 volumes preserved.
    4. Ran docker desktop restart from that healthy state.
    5. The shutdown path logged backend cancelling with error: <nil>, stopped the WSL engine, and the subsequent startup failed on the newly created Sailor socket:
    starting services: initializing Ingest server: listening on unix://C:/Users/<user>/AppData/Local/Docker/run/sailor-ingest.sock: remove C:/Users/<user>/AppData/Local/Docker/run/sailor-ingest.sock: The file cannot be accessed by the system. (listener: The file cannot be accessed by the system.)
    

    The same failure reproduced after disabling Docker AI and recreating both parent directories, so on this machine the Docker AI workaround does not make restart persistent. sailor-ingest.sock is the first fatal endpoint.

    Renaming both parent directories again restores one successful start. No distribution unregister, factory reset, VHDX change, reinstall, socket deletion, or Docker data cleanup was performed.

  5. bsousaa commented on Aug 31, 2026

    @bsousaa
    Collaborator

    We have a fix in progress that will be released with Desktop 4.89

  6. max171198 commented on Sep 13, 2026

    @max171198

    Still reproducing on Docker Desktop 4.90.0 on Windows 11 Home 23H2, build 22631.6199 (x64), with WSL 2.7.14.0. The active context is desktop-linux, but the Linux Engine does not come up. I could not establish an Insider/Preview status from the local configuration, so I am not claiming one. This is a different Windows build from the 26200 builds reported above. I also saw the maintainer note that a fix was planned for 4.89; this case remains affected after updating to 4.90.0.

    The most useful new observation is the 4.90.0 recovery attempt. Startup now tries to rename %LOCALAPPDATA%\Docker\run\dockerInference to dockerInference.stale, but Windows rejects the rename with The file cannot be accessed by the system (ERROR_CANT_ACCESS_FILE). The backend then aborts, and the additional listener message about invalid filename/directory/volume-label syntax is still present. This is an observed failure of the rename, not a conclusion about its root cause.

    Brief chronology on this machine:

    1. The failure first appeared with Docker Desktop 4.79.0. dockerInference was a 0-byte ReparsePoint, not a normal directory. A Windows reboot did not resolve it. A targeted fsutil reparsepoint delete failed with the same access error.
    2. With Docker Desktop stopped, the parent %LOCALAPPDATA%\Docker\run directory was renamed aside, not deleted. Docker created a new run directory and dockerInference endpoint on the next start, but the same failure class recurred. At one point the analogous error also appeared for %LOCALAPPDATA%\docker-secrets-engine\engine.sock; that parent runtime directory was likewise only renamed aside.
    3. Docker Desktop was updated in place from 4.79.0 to 4.90.0 using the official installer after checking its SHA-256 and valid Docker Inc. signature. Startup still fails, now at the dockerInference → dockerInference.stale rename described above. The Linux Engine remains unavailable.

    I did not add an enableInference key to settings-store.json; that key is absent locally. I attempted the official docker desktop disable model-runner command once, but it could not change the setting because the backend had already failed before its local dockerBackendApiServer pipe became available. I therefore cannot say whether Model Runner was enabled or whether disabling it would fix this machine.

    No factory reset, Clean/Purge, uninstall, volume deletion, WSL unregister, or VHDX manipulation was performed. The renamed runtime directories were retained. The Docker data VHDX showed the same size and modification time after the in-place update; that observation is not a byte-level integrity proof.

    A local Docker diagnostics bundle was generated successfully. It has not been uploaded because it may contain personal or sensitive local information. I can provide it through an appropriate private diagnostics channel if a maintainer requests it, after reviewing what would be shared.

    Could a maintainer clarify:

    • Is the .stale rename in 4.90.0 part of the planned recovery logic for this failure class?
    • What is the officially supported, data-preserving recovery path when even that AF_UNIX/ReparsePoint rename returns ERROR_CANT_ACCESS_FILE?
    • Would a diagnostics upload/ID be useful, and are there specific Windows/AF_UNIX diagnostics to collect before sharing it?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions