kubectl-dig icon indicating copy to clipboard operation
kubectl-dig copied to clipboard

Waiting indefinitely

Open Sh4d1 opened this issue 5 years ago • 16 comments

Hey!

When I try to run kubectl dig <my-node> it is waiting without suceeding (I've left it almost 1h waiting).

Any ideas on how to debug?

Cheers!

Sh4d1 avatar May 23 '19 08:05 Sh4d1

@Sh4d1 Oh thanks for bringing this up, we need to add some kind of status update for when it takes too long. It should be normally less than one second on with good bandwidth (the image is 700mb).

What dig does is that it creates a container, so you should see it with kubectl get pods and then you can get the logs for it as with anything else.

fntlnz avatar May 23 '19 09:05 fntlnz

Hmm, okay.

So I have: error opening device /host/dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.

Guess I have to load the module :grin: maybe add it to the readme?

Sh4d1 avatar May 23 '19 09:05 Sh4d1

@Sh4d1 the module should load automatically, it probably had problems at downloading or compiling it in case it was not pre built.

I noticed the same problems too on machines that don’t have kernel headers for example, could you provide more info about the node like kernel version, Linux dietro and so on?

I think this is important to solve, thanks for reporting!

fntlnz avatar May 23 '19 15:05 fntlnz

Kernel: 4.15.0-50-generic Distro: Ubuntu 18.04.2 LTS (Bionic Beaver) I also don't have the kernel headers installed.

Also, maybe it's a new issue, but 9 times out of 10 when I try to log the pod (via docker on the node or via kubectl) it fucks up my terminal :disappointed:

Sh4d1 avatar May 24 '19 08:05 Sh4d1

I also don't have the kernel headers installed.

Can you please try installing headers?

leodido avatar May 25 '19 00:05 leodido

I'm butting up against this on GKE too.

Also having the same problem where getting logs breaks my terminal (tmux/zsh/iTerm on Mac OS 10.14)

mjrlee avatar May 28 '19 10:05 mjrlee

Same issue on Debian 8.10 kops AMI with the 4.4.121-k8s kernel and headers installed.

zmarouf avatar May 29 '19 06:05 zmarouf

PR #4 solves this 🎉 can you please confirm @zmarouf @MartinLeedotOrg @Sh4d1 ?

kernel headers are still needed.

fntlnz avatar May 31 '19 02:05 fntlnz

@zmarouf @MartinLeedotOrg @Sh4d1 have you had the opportunity to try it?

leodido avatar Jun 03 '19 17:06 leodido

@leodido not yet, I'll try to test it this week :)

Sh4d1 avatar Jun 03 '19 17:06 Sh4d1

@leodido - tried it on an EKS cluster. Had to install the kernel header in the user data for the Amazon AMI and tried running kubectl dig however, it still did error out with the same message.

D8Hl6kUUIAA7gsf D8Hl6kZUcAAuFE9

naiduarvind avatar Jun 04 '19 06:06 naiduarvind

Thanks for feedback @naiduarvind.

This probably depends by the ko missing for the specific Amazon AMI. Having more details could help us investigating faster :)

leodido avatar Jun 05 '19 05:06 leodido

I tried again on one of our test clusters and I'm still seeing the same error. AMI: k8s-1.9-debian-jessie-amd64-hvm-ebs-2018-03-11 (ami-4bfe6f33) Thank you for looking into this. It works well for other workloads though :)

zmarouf avatar Jun 07 '19 20:06 zmarouf

Same issue Ubuntu 16.04.3 LTS linux-headers-4.4.0-101-generic installed

$ kubectl logs -f kubectl-dig9fc21343-8dae-11e9-a5d9-cc2f716a3fd8-wfn8w 
error opening device /host/dev/sysdig0. Make sure you have root credentials and that the sysdig-probe module is loaded.

suside avatar Jun 13 '19 08:06 suside

Stuck at a long waiting too, But my log says.

root@node1:~# kubectl logs kubectl-dig08476147-e101-11e9-b0c3-0cc47aeb8f5c-ccggf
can't open BPF probe '/root/.sysdig/sysdig-probe-bpf.o': No such file or directory

And seems like the driver is not able to load automatically.

root@node1:~# lsmod | grep sysdig
root@node1:~# 

mJace avatar Sep 27 '19 08:09 mJace

I pre-installed the sysdig on my node1 And ok to run sysdig and csysdig on node1 by CLI But still unable to start kubectl-dig pod successfully.

the log of the error pod is still

can't open BPF probe '/root/.sysdig/sysdig-probe-bpf.o': No such file or directory

mJace avatar Oct 01 '19 09:10 mJace