Minikube: `./minikube logs -f` do not work

Created on 23 Jan 2018  路  11Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST?: BUG REPORT

Please provide the following details:

Environment:

Minikube version: v0.24.1

  • OS: CentOS-7
  • VM Driver: none
  • Install tools:
    curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube

What happened:

  • Run command ./minikube start --vm-driver=none
  • Command end successfully, and a local k8s cluster is running as expected: kubectl commands works.
  • Run command ./minikube logs, gets the logs of the running localkube instance as expected
  • Run command ./minikube logs -f, nothing shows up.

    What you expected to happen:

The help message for minikube logs says:

-f, --follow Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.

I hope this command can work as it says.

How to reproduce it:

  • Run command ./minikube logs -f
  • Run command ./minikube logs and check the latest message timestamps, confirms new logs do exist during the time we run ./minikube logs -f.

Anything else do we need to know:

cat /tmp/minikube.INFO

Log file created at: 2018/01/23 11:38:11
Running on machine: GLB-Shanghai-ChenLi-003
Binary: Built with gc go1.9.1 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I0123 11:38:11.666772    7165 notify.go:109] Checking for updates...
I0123 11:38:11.718853    7165 exec_runner.go:49] Run with output: if [[ `systemctl` =~ -\.mount ]] &>/dev/null; then
  sudo journalctl -f -u localkube
else
  tail -n +1 -f /var/lib/localkube/localkube.err /var/lib/localkube/localkube.out
fi
help wanted kinbug lifecyclfrozen prioritimportant-longterm 2019q2

Most helpful comment

This is still broken in v0.34.0. Funny enough, you'll see the logs if you use minikube logs -f --alsologtostderr, however.

All 11 comments

The actual command running to get logs is sudo journalctl -f -u localkube, and if I directly run this command in terminal, it works well.

So, the issue is, why the output do not show in terminal ?

The same issue can be produce when we have vm-driver virtualbox

the same issue in macos10.12 minikube28.0
when using -f, nothing appears

I'm also not seeing anything when following from minikube log cli

How I reproduced:

  • start a tmux session and split panes
  • in pane 1 run
minikube logs -f
  • in pane2 run
minikube ssh
sudo journalctl -u kubelet -f
  • then I disable the kube-dns addon to see what happened. The manual ssh + journal on pane2 updated, pane1 did not.

I'll add any logs you feel are pertinent, but not sure what to attach..

I'm using

  • minikube: v0.28.2.
  • HostOS: Linux
  • Vmdriver: Virtualbox

Are there pointers on debugging? Perhaps I'm doing something daft without realising it.

This is still broken in v0.34.0. Funny enough, you'll see the logs if you use minikube logs -f --alsologtostderr, however.

I'm seeing this in v0.35.0. I'm using the workaround provided by @tstromberg to get around this issue.

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

This is still a thing.

I found that minikube logs -f works again.

My env:
OS: macOS 10.14.5
minikube: v1.5.2
driver: hyperkit(v0.20190201-11-gc0dd46) and virtualbox(6.0.8r130520)

Did someone fix this?

Yes, apparently @medyagh unintentionally fixed this bug in a code refactor that landed in v1.5.1: #5530

Was this page helpful?
0 / 5 - 0 ratings