Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logs tab is always empty #218

Open
benjamin-feron opened this issue Apr 30, 2020 · 20 comments · Fixed by #241
Open

Logs tab is always empty #218

benjamin-feron opened this issue Apr 30, 2020 · 20 comments · Fixed by #241
Labels
bug Something isn't working

Comments

@benjamin-feron
Copy link

benjamin-feron commented Apr 30, 2020

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 benjamin-feron added the bug Something isn't working label Apr 30, 2020
@firefox360
Copy link

Same problem here. Did you find any solution?

@benjamin-feron
Copy link
Author

benjamin-feron commented Jun 8, 2020

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

@austingg
Copy link

same problem here。

@iangregsondev
Copy link

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
Copy link

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.

@tylerstillwater
Copy link
Contributor

Same here - none of the tabs show output.

@frqnck
Copy link

frqnck commented Oct 7, 2020

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

@tylerstillwater
Copy link
Contributor

tylerstillwater commented Oct 7, 2020

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
Copy link
Contributor

tylerstillwater commented Oct 8, 2020

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
Copy link
Contributor

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

@jacobgoh101
Copy link

Thanks @tylerstillwater

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

@europ
Copy link

europ commented Oct 13, 2020

Same problem when using container.

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

@metronidazole
Copy link

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

@jwesemann
Copy link

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

@KostaGorod
Copy link

having this behavior on dockerized version on rocky 8.6

@xeruf
Copy link

xeruf commented Feb 23, 2023

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 :/

@jesseduffield jesseduffield reopened this Feb 23, 2023
@jesseduffield
Copy link
Owner

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)

@jwesemann
Copy link

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.

@turbcool
Copy link

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

@Kenya-West
Copy link

Kenya-West commented Sep 25, 2024

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

sequencerr added a commit to sequencerr/dotfiles that referenced this issue Nov 7, 2024
+ fix select in (fallback from fzf)
+ disable mouse
+ fix no logs. see: jesseduffield/lazydocker#569 jesseduffield/lazydocker#218 jesseduffield/lazydocker#574
sequencerr added a commit to sequencerr/dotfiles that referenced this issue Jan 23, 2025
+ fix select in (fallback from fzf)
+ disable mouse
+ fix no logs. see: jesseduffield/lazydocker#569 jesseduffield/lazydocker#218 jesseduffield/lazydocker#574
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.