lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

Logs tab is always empty

Open benjamin-feron opened this issue 4 years ago • 20 comments

Describe the bug The Logs tab is empty for each containers but when I press "m" key, logs appears as well.

To Reproduce Steps to reproduce the behavior:

  1. Launch lazydocker
  2. Navigate in different containers -> Logs tab is still empty
  3. Press "m" key -> GUI disappears, logs are shown
  4. Press Ctrl+c -> GUI re-appears, Logs tab is still empty

Expected behaviour Logs tab should display content !

Desktop (please complete the following information):

  • OS: Debian Stretch
  • Lazydocker Version: docker image lazyteam/lazydocker:version-0.9.1

docker-compose.yml

version: '3'
services:
  lazydocker:
    container_name: lazydocker
    image: lazyteam/lazydocker:version-0.9.1
    build:
      context: https://github.com/jesseduffield/lazydocker.git
      args:
        BASE_IMAGE_BUILDER: golang
        GOARCH: amd64
        GOARM:
    stdin_open: true
    tty: true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /var/local/lazydocker/:/.config/jesseduffield/lazydocker
    restart: always

benjamin-feron avatar Apr 30 '20 13:04 benjamin-feron

Same problem here. Did you find any solution?

firefox360 avatar Jun 03 '20 09:06 firefox360

No solution found... an upgrade to version-0.9.1 had no effect :(

benjamin-feron avatar Jun 08 '20 11:06 benjamin-feron

same problem here。

austingg avatar Jul 16 '20 03:07 austingg

I am using macOS and just installed via brew and the same here, services doesn't seem to activate the logs, its empty, clicking on the container does show though

iangregsondev avatar Sep 28 '20 22:09 iangregsondev

Actual maybe mine is more serious :-(

Stats, Config and Top are all blank also.

I am using docker-machine, I assume that should not matter?

I can see the logs by clicking the container but not services.

iangregsondev avatar Sep 28 '20 22:09 iangregsondev

Same here - none of the tabs show output.

tylerstillwater avatar Oct 07 '20 15:10 tylerstillwater

Same issue, no outputs in any of the tabs, this since the last upgrade of Docker for Mac.

frqnck avatar Oct 07 '20 18:10 frqnck

I'd be happy to help debug this, but I can't find a way to spit out errors from lazydocker, assuming it can do that.

Is there a way for me to make lazydocker spit out any errors it encounters? I'm assuming something changed with the latest Docker release that caused whatever pipe is in use to fail in some unexpected way.

I've tried the -d=true flag, but it didn't seem to do anything.

tylerstillwater avatar Oct 07 '20 18:10 tylerstillwater

Ok, so the NewTickerTask in renderContainerLogs never sends the notifyStopped <- struct{}{} message, because the cmd.Wait() never returns, because the child process com.docker.cli logs --timestamps --follow --since=60m 65b3bf998bdeb0ad48ab59e6f7fc9954cf324e5192657163795b8ac5d83dd57 never exits.

if err := gui.OSCommand.Kill(cmd); err != nil {
	gui.Log.Warn(err)
}

That block finishes, does not spit out an error, but the log process continues to run. I have about 30 of them running right now, since I've been restarting lazydocker over and over.

tylerstillwater avatar Oct 08 '20 16:10 tylerstillwater

Found the fix. Simply add gui.OSCommand.PrepareForChildren(cmd) on line 188 of containers_panel.go

tylerstillwater avatar Oct 08 '20 17:10 tylerstillwater

Thanks @tylerstillwater

I hope that the fix will be merged and released soon.

jacobgoh101 avatar Oct 09 '20 04:10 jacobgoh101

Same problem when using container.

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock lazyteam/lazydocker

europ avatar Oct 13 '20 07:10 europ

Does anyone still have this issue when using the docker container on synology?

metronidazole avatar Jan 27 '22 11:01 metronidazole

@metronidazole : Having exactly this old behavior on a synology 718+

jwesemann avatar Sep 16 '22 15:09 jwesemann

having this behavior on dockerized version on rocky 8.6

KostaGorod avatar Sep 28 '22 07:09 KostaGorod

Did everybody here check https://github.com/jesseduffield/lazydocker#why-cant-i-see-my-containers-logs ?

As for me, I adjusted the command but the logs are still not shown for some containers :/

xeruf avatar Feb 23 '23 23:02 xeruf

I'm reopening cos it sounds like we're still having issues. On my machine sometimes container logs won't show until I hit enter to focus the logs panel. So that's clearly an issue on our side.

Let me know if you see the same behaviour @metronidazole @jwesemann @KostaGorod @xeruf (but also see if https://github.com/jesseduffield/lazydocker#why-cant-i-see-my-containers-logs helps you)

jesseduffield avatar Feb 23 '23 23:02 jesseduffield

I just updated on my raspi (ARM64) to the latest version native & running a docker build.

I see all expected log entries directly without further key presses for native binary and docker-based lazydocker. "Expected" means containers which produced logs recently because documentation mentions that lazydocker shows only logs from the last 24 hour if I remember right.

The only thing I observe is that the docker variant does not show a version info in the bottom righ area.

I tested remotely using ssh in a standard terminal and a tmux session. Afterwards in a VNC GUI session with & without tmux.

I found no issues at all.

jwesemann avatar Feb 24 '23 08:02 jwesemann

Experienced this bug on Debian 12 (x64), both in binary installation and running inside a docker container.

turbcool avatar Jul 30 '24 12:07 turbcool

I think it is relative to logs that were not been updated since some time.

For example, I have logs from first container, the logs been spawned just now because I touched the container:

Details

image

While this one (the second) has the last log record on yesterday and does not display anything (even if I press M):

Details

image

I checked logs of the second container manually and see they are exist:

Details

image

All the containers are 2 days old.

My OS is always Ubuntu on any server:

Details

image

Kenya-West avatar Sep 25 '24 14:09 Kenya-West