-
Notifications
You must be signed in to change notification settings - Fork 225
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
docker run fail,Error with no such device #278
Comments
You are trying to run the See libbpf docs: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
【env】
mac os
【cmd】
docker build --tag ebpf_exporter --target ebpf_exporter_with_examples .
docker run --rm -it --privileged -p 9435:9435
ebpf_exporter --config.dir=examples --config.names=timers --debug
【result】
2023/09/28 00:41:16 Error attaching fanotify, using on-demand resolution instead: error calling fanotify_mark for "/sys/fs/cgroup": no such device
2023/09/28 00:41:16 libbpf [debug]: libbpf: loading examples/timers.bpf.o
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(3) tp_btf/timer_start, size 232, link 0, flags 6, type=1
2023/09/28 00:41:16 libbpf [debug]: libbpf: sec 'tp_btf/timer_start': found program 'timer_start' at insn offset 0 (0 bytes), code size 29 insns (232 bytes)
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(4) .reltp_btf/timer_start, size 48, link 27, flags 40, type=9
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(5) license, size 4, link 0, flags 3, type=1
2023/09/28 00:41:16 libbpf [debug]: libbpf: license of examples/timers.bpf.o is GPL
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(6) .maps, size 32, link 0, flags 3, type=1
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(17) .BTF, size 1317, link 0, flags 0, type=1
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(19) .BTF.ext, size 300, link 0, flags 0, type=1
2023/09/28 00:41:16 libbpf [debug]: libbpf: elf: section(27) .symtab, size 408, link 1, flags 0, type=2
2023/09/28 00:41:16 libbpf [debug]: libbpf: looking for externs among 17 symbols...
2023/09/28 00:41:16 libbpf [debug]: libbpf: collected 0 externs total
2023/09/28 00:41:16 libbpf [debug]: libbpf: map 'timer_starts_total': at sec_idx 6, offset 0.
2023/09/28 00:41:16 libbpf [debug]: libbpf: map 'timer_starts_total': found type = 1.
2023/09/28 00:41:16 libbpf [debug]: libbpf: map 'timer_starts_total': found key [8], sz = 8.
2023/09/28 00:41:16 libbpf [debug]: libbpf: map 'timer_starts_total': found value [8], sz = 8.
2023/09/28 00:41:16 libbpf [debug]: libbpf: map 'timer_starts_total': found max_entries = 1024.
2023/09/28 00:41:16 libbpf [debug]: libbpf: sec '.reltp_btf/timer_start': collecting relocation for section(3) 'tp_btf/timer_start'
2023/09/28 00:41:16 libbpf [debug]: libbpf: sec '.reltp_btf/timer_start': relo #0: insn #7 against 'timer_starts_total'
2023/09/28 00:41:16 libbpf [debug]: libbpf: prog 'timer_start': found map 0 (timer_starts_total, sec 6, off 0) for insn #7
2023/09/28 00:41:16 libbpf [debug]: libbpf: sec '.reltp_btf/timer_start': relo #1: insn #15 against 'timer_starts_total'
2023/09/28 00:41:16 libbpf [debug]: libbpf: prog 'timer_start': found map 0 (timer_starts_total, sec 6, off 0) for insn #15
2023/09/28 00:41:16 libbpf [debug]: libbpf: sec '.reltp_btf/timer_start': relo #2: insn #20 against 'timer_starts_total'
2023/09/28 00:41:16 libbpf [debug]: libbpf: prog 'timer_start': found map 0 (timer_starts_total, sec 6, off 0) for insn #20
2023/09/28 00:41:16 libbpf [warn]: libbpf: failed to find valid kernel BTF
2023/09/28 00:41:16 libbpf [warn]: libbpf: Error loading vmlinux BTF: -3
2023/09/28 00:41:16 libbpf [warn]: libbpf: failed to load object 'examples/timers.bpf.o'
2023/09/28 00:41:16 Error attaching exporter: error loading bpf object from "examples/timers.bpf.o" for config "timers": failed to load BPF object: no such process
Mac os seems not have /sys/fs/cgroup, so I read the steps of README, found the way that can run without any bind mounts, but errors above occur, how I can solve this?
The text was updated successfully, but these errors were encountered: