Unable to get rkt logs from journalctl

81 views
Skip to first unread message

serge...@clearpoint.co.nz

unread,
Nov 13, 2017, 10:06:20 PM11/13/17
to CoreOS User
Hi,

I'm trying to diagnose an issue with a Kubernetes 1.8 upgrade on CoreOS 1520.8.0 and can't seem to get any logs from the rkt containers running "hyperkube".

ip-172-19-76-221 ~ # machinectl
No machines.

ip-172-19-76-221 ~ # rkt list --full
...
5c370f8d-8dc2-429a-8117-90ca29d249aa    hyperkube    quay.io/coreos/hyperkube:v1.8.2_coreos.0    sha512-c06f7fddf104    running 

ip-172-19-76-221 ~ # journalctl -M rkt-5c370f8d-8dc2-429a-8117-90ca29d249aa
Failed to open root directory: No machine 'rkt-5c370f8d-8dc2-429a-8117-90ca29d249aa' known

I'm trying to follow the instructions here: https://coreos.com/rkt/docs/latest/commands.html#logging

How can I find where rkt containers are logging to?

OS version is:

ip-172-19-76-221 ~ # cat /etc/os-release
NAME="Container Linux by CoreOS"
ID=coreos
VERSION=1520.8.0
VERSION_ID=1520.8.0
BUILD_ID=2017-10-26-0342
PRETTY_NAME="Container Linux by CoreOS 1520.8.0 (Ladybug)"
ANSI_COLOR="38;5;75"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://issues.coreos.com"
COREOS_BOARD="amd64-usr"


Thank you
Serge

Seán C. McCord

unread,
Nov 14, 2017, 9:05:50 AM11/14/17
to serge...@clearpoint.co.nz, CoreOS User
I've never tried to access the logs from the machine code; indeed, I've never seen another machine running (according to machinectl).  I get the logs by referencing the unit name, e.g.:

journalctl -u kubelet



--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Seán C McCord
CyCore Systems, Inc

Euan Kemp

unread,
Nov 15, 2017, 8:52:20 PM11/15/17
to Seán C. McCord, serge...@clearpoint.co.nz, CoreOS User
On Tue, Nov 14, 2017 at 02:05:36PM +0000, Seán C. McCord wrote:
> I've never tried to access the logs from the machine code; indeed, I've
> never seen another machine running (according to machinectl).

When using the stage1-coreos rkt stage1, a pod should show up as a
"container" type machine and journalctl may be used.

In this case, I suspect the pod is running under "stage1-fly", which
doesn't implement machinectl/journald integration.

With stage1-fly, output goes straight to stdout/stderr, and thus ends
up in the unit's journal if it's running as a unit.

- Euan
signature.asc

Seán C. McCord

unread,
Nov 15, 2017, 8:59:38 PM11/15/17
to Euan Kemp, serge...@clearpoint.co.nz, CoreOS User
This would certainly be consistent with the default environment for the CoreOS kubelet-wrapper, which runs with stage1-fly (again, by default).

Serge Dukic

unread,
Nov 15, 2017, 10:44:57 PM11/15/17
to Seán C. McCord, Euan Kemp, CoreOS User
Yes, thank you all! I got the logs I was after with "journalctl", not sure why I didn't look there in the first place.

Thanks again
Serge
--
Serge Dukic
Support Infrastructure Engineer
021 689 347






Reply all
Reply to author
Forward
0 new messages