jesseduffield / jesseduffield/lazydocker

EOF error when streaming Docker events over SSH context

Open
#815 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Lazydocker fails when connected to a remote Docker Engine via a Docker SSH context. The Docker CLI works correctly (`docker ps`, `docker events`, etc.), but Lazydocker reports an error when subscribing to the Docker events stream.

Error displayed:

```text
Docker event stream returned error:
error during connect:
Get "http://%2Ftmp%2Flazydocker-sshtunnel-XXXXXXXX/dockerhost.sock/v1.51/events":
EOF
```

The container list loads successfully, but the event stream disconnects shortly afterward.

**To Reproduce**

1. Create a Docker context that connects to a remote Docker host over SSH:

```bash
docker context create AORUS --docker "host=ssh://AORUS"
docker context use AORUS
```

2. Verify the Docker context works:

```bash
docker ps
docker events
```

Both commands work correctly.

3. Launch Lazydocker:

```bash
lazydocker
```

4. Observe the error:

```text
Docker event stream returned error:
error during connect:
Get "http://%2Ftmp%2Flazydocker-sshtunnel-XXXXXXXX/dockerhost.sock/v1.51/events":
EOF
```

**Expected behaviour**

Lazydocker should connect to the remote Docker Engine and maintain the Docker events stream without errors, just as the Docker CLI does.

**Screenshots**

I can provide screenshots if needed. The error is displayed in the Lazydocker UI and references the `/v1.51/events` endpoint through Lazydocker's temporary SSH tunnel socket.

**Desktop (please complete the following information):**

- OS: macOS Sequoia
- Lazydocker Version: v0.25.2
- Installed via Homebrew
- Not built from source

Docker Client:

```text
Version: 29.6.0
API version: 1.55
```

Remote Docker Server:

```text
Version: 27.5.1
API version: 1.47
```

**Additional context**

The issue appears specific to Lazydocker. The following all work correctly using the same Docker context:

```bash
docker ps
docker events
docker logs
docker version
```

The Docker context configuration is:

```text
Host: ssh://AORUS
```

where `AORUS` is an SSH host alias defined in `~/.ssh/config`.

I also tested connectivity directly and verified that Docker's SSH transport is functioning correctly.

The most interesting detail is that the error references:

```text
/v1.51/events
```

while the remote Docker daemon reports:

```text
API version: 1.47
```

Docker CLI successfully negotiates and communicates with the remote daemon, but Lazydocker appears to lose the event stream connection with an EOF error.

Please let me know if there is a debug mode or additional logging I can provide.

Also note these errors happen on both MacOS and Ubuntu Server.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with a Docker SSH context using the commands and versions in the report, then trace Lazydocker's Docker event subscription and temporary SSH tunnel handling. Done means the remote event stream remains connected without an EOF while container events continue to appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.