kubectl-trace: Missing header error while trying to run a trace
I tried to run a trace on a cluster built with kops, here is what I see in trace logs
# kubectl-trace logs kubectl-trace-c2405ead-a4b3-11e9-890b-0232f65d1adc
if your program has maps to print, send a SIGINT using Ctrl-C, if you want to interrupt the execution send SIGINT two times
/bpftrace/include/asm_goto_workaround.h:14:10: fatal error: 'linux/types.h' file not found
Relevant info
# kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.9", GitCommit:"16236ce91790d4c75b79f6ce96841db1c843e7d2", GitTreeState:"clean", BuildDate:"2019-03-25T06:40:24
Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.9", GitCommit:"16236ce91790d4c75b79f6ce96841db1c843e7d2", GitTreeState:"clean", BuildDate:"2019-03-25T06:30:48
Z", GoVersion:"go1.10.8", Compiler:"gc", Platform:"linux/amd64"}
# kubectl-trace version
git commit:
build date: undefined
# uname -a
Linux ip-10-65-134-126 4.9.0-7-amd64 #1 SMP Debian 4.9.110-3+deb9u2 (2018-08-13) x86_64 GNU/Linux
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 21 (4 by maintainers)
For anyone in the future having the same problem on
Amazon Linux 2
the solution to run successfullykubectl trace
is to have installed on node thekernel-devel
package.relevant resource
Thanks, @joestringer for the initial advice that help me to find the fix for my use case.
Tks for the fix @fntlnz and @joestringer 😃
Similarly,
sudo apt-get install linux-headers-amd64
fixed this on Debian 10.@joestringer Unfortunately it doesn’t work.
And the error remains the same.
@stafot I think you also need to install the
kernel-headers
package on the node to get this working on Amazon Linux 2.Same here. Running master and nodes with ubuntu 19.04.
Trying installing the build-essentials in all of them, but the error still happens. The cluster is running with Cilium correctly, so it might be some other thing.
The same happens while running against Node or Pod, as the following:
Tks
I ran this from a master node, so all other nodes in the cluster should have the same kernel and Linux version. We do, however, use our own custom AMI that adds a bunch of other tools on top of Kops’ AMI. I can try this on a vanilla kops cluster.