# error during connect: This error may indicate that the docker daemon is not running. (http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.41/containers/json)

- **ID:** `docker/docker-daemon-not-running-wsl2`
- **Domain:** docker
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 82%

## Root Cause

Docker Desktop for Windows fails to start the daemon when WSL2 integration is misconfigured or the WSL2 kernel is outdated.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Docker Desktop 4.20.0 | active | — | — |
| Docker Desktop 4.21.1 | active | — | — |
| WSL2 kernel 5.15.90.1 | active | — | — |
| Windows 10 22H2 | active | — | — |
| Windows 11 23H2 | active | — | — |

## Workarounds

1. **Update the WSL2 Linux kernel by running 'wsl --update' from an elevated PowerShell, then restart Docker Desktop.** (80% success)
   ```
   Update the WSL2 Linux kernel by running 'wsl --update' from an elevated PowerShell, then restart Docker Desktop.
   ```
2. **Disable and re-enable WSL2 integration in Docker Desktop: Settings > Resources > WSL Integration > toggle off all distros, apply, then toggle on the desired distro and restart.** (75% success)
   ```
   Disable and re-enable WSL2 integration in Docker Desktop: Settings > Resources > WSL Integration > toggle off all distros, apply, then toggle on the desired distro and restart.
   ```
3. **Manually set the WSL2 kernel path in %USERPROFILE%\.wslconfig with a 'kernel=C:\\path\\to\\kernel' entry, then run 'wsl --shutdown' and restart Docker Desktop.** (70% success)
   ```
   Manually set the WSL2 kernel path in %USERPROFILE%\.wslconfig with a 'kernel=C:\\path\\to\\kernel' entry, then run 'wsl --shutdown' and restart Docker Desktop.
   ```

## Dead Ends

- **Restarting Docker Desktop from the system tray** — If the underlying WSL2 integration is broken or kernel is outdated, restarting Docker Desktop alone does not fix the issue; the daemon will fail again immediately. (65% fail)
- **Reinstalling Docker Desktop entirely** — The error is often caused by a stale WSL2 kernel or misconfigured .wslconfig, not by Docker Desktop installation files. Reinstalling is time-consuming and rarely resolves the root cause. (80% fail)
- **Running 'wsl --shutdown' and then restarting Docker** — While this can temporarily clear state, it does not update the WSL2 kernel or fix integration settings; the error returns after the next system reboot. (55% fail)
