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

The logs command doesn't work with the --follow flag #16120

Closed
tyler92 opened this issue Oct 11, 2022 · 5 comments
Closed

The logs command doesn't work with the --follow flag #16120

tyler92 opened this issue Oct 11, 2022 · 5 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@tyler92
Copy link
Contributor

tyler92 commented Oct 11, 2022

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

The logs command has '--follow' flag but it doesn't work in my environment.

Steps to reproduce the issue:

  1. Execute podman logs -f CTR_ID

  2. Observe output

Describe the results you received:

Logs + error message in the end:

ERRO[0000] Waiting for container to exit: failed to get journal cursor: failed to get cursor: cannot assign requested address

Describe the results you expected:

No errors and --follow flag will work as expected

Output of podman version:

Client:       Podman Engine
Version:      4.3.0-dev
API Version:  4.3.0-dev
Go Version:   go1.17.8
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/arm

Output of podman info:

host:
  arch: arm
  buildahVersion: 1.27.0
  cgroupControllers:
  - cpuset
  - cpu
  - cpuacct
  - blkio
  - memory
  - devices
  - freezer
  - net_cls
  - perf_event
  - net_prio
  - pids
  cgroupManager: systemd
  cgroupVersion: v1
  conmon:
    package: Unknown
    path: /usr/bin/conmon
    version: 'conmon version 2.0.29, commit: unknown'
  cpuUtilization:
    idlePercent: 73.8
    systemPercent: 19.33
    userPercent: 6.87
  cpus: 4
  distribution:
    distribution: buildroot
    version: "2022.02"
  eventLogger: journald
  hostname: comm99-dev
  idMappings:
    gidmap: null
    uidmap: null
  kernel: 4.14.98
  linkmode: dynamic
  logDriver: k8s-file
  memFree: 59863040
  memTotal: 511803392
  networkBackend: cni
  ociRuntime:
    name: crun
    package: Unknown
    path: /usr/bin/crun
    version: |-
      crun version 1.6
      commit: 18cf2efbb8feb2b2f20e316520e0fd0b6c41ef4d
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: false
    seccompEnabled: true
    seccompProfilePath: ""
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 0
  swapTotal: 0
  uptime: 103h 9m 15.00s (Approximately 4.29 days)
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
  - registry.fedoraproject.org
  - registry.access.redhat.com
  - registry.centos.org
store:
  configFile: /etc/containers/storage.conf
  containerStore:
    number: 32
    paused: 0
    running: 27
    stopped: 5
  graphDriverName: overlay
  graphOptions:
    overlay.mountopt: nodev
  graphRoot: /opt/containers/storage
  graphRootAllocated: 29639618560
  graphRootUsed: 10495381504
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 34
  runRoot: /run/containers/storage
  volumePath: /opt/containers/storage/volumes
version:
  APIVersion: 4.3.0-dev
  Built: 0
  BuiltTime: Thu Jan  1 00:00:00 1970
  GitCommit: ""
  GoVersion: go1.17.8
  Os: linux
  OsArch: linux/arm
  Version: 4.3.0-dev

Package info (e.g. output of rpm -q podman or apt list podman or brew info podman):

Manual build

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 11, 2022
@tyler92
Copy link
Contributor Author

tyler92 commented Oct 11, 2022

The same issue with events:

$ podman events
Error: failed to get journal cursor: failed to get cursor: cannot assign requested address

@Luap99
Copy link
Member

Luap99 commented Oct 12, 2022

What build is this? As for podman events this should have been fixed in #15717.

@tyler92
Copy link
Contributor Author

tyler92 commented Oct 12, 2022

I used the main branch at the moment of creating this issue (so it's one of yesterday's commits). Can't say what exactly, but #15717 is definitely included in my build.

But! Today I checked this issue again with the same binary as yesterday and all works fine. Before that, I created a test container that prints to its stdout a message every second. I'm not so familiar with journald but looks like the problem is reproduced when there are no (or quite a few) logs. I can continue to observe this issue.

@Luap99
Copy link
Member

Luap99 commented Oct 12, 2022

The problem only occurs when there are zero podman journal entries, at least for podman events the linked PR should have fixed it.

@tyler92
Copy link
Contributor Author

tyler92 commented Oct 12, 2022

You are right - I reproduced this issue again by generating a lot of logs. And it looks like my mistake - my build was not from main. Anyway tanks for the fix and sorry to bother you!

This issue can be closed

@Luap99 Luap99 closed this as completed Oct 12, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

2 participants