Skip to content
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 for Desktop MacOS: kernel tracing is not available: stat /sys/kernel/debug/tracing: no such file or directory #54

Open
dj-wasabi opened this issue Dec 26, 2023 · 2 comments

Comments

@dj-wasabi
Copy link

I am trying to run coroot locally in my Docker for Desktop on Mac, to experiment a bit. I have the following error:

$ kubectl -n coroot logs -f coroot-node-agent-sgg44
I1226 11:46:02.098046   14086 net.go:29] ephemeral-port-range: 32768-60999
I1226 11:46:02.120372   14086 cilium.go:29] Unable to get object /proc/1/root/sys/fs/bpf/tc/globals/cilium_ct4_global: no such file or directory
I1226 11:46:02.120501   14086 cilium.go:35] Unable to get object /proc/1/root/sys/fs/bpf/tc/globals/cilium_ct6_global: no such file or directory
I1226 11:46:02.120511   14086 cilium.go:42] Unable to get object /proc/1/root/sys/fs/bpf/tc/globals/cilium_lb4_backends_v2: no such file or directory
I1226 11:46:02.120518   14086 cilium.go:42] Unable to get object /proc/1/root/sys/fs/bpf/tc/globals/cilium_lb4_backends_v3: no such file or directory
I1226 11:46:02.120524   14086 cilium.go:51] Unable to get object /proc/1/root/sys/fs/bpf/tc/globals/cilium_lb6_backends_v2: no such file or directory
I1226 11:46:02.120598   14086 cilium.go:51] Unable to get object /proc/1/root/sys/fs/bpf/tc/globals/cilium_lb6_backends_v3: no such file or directory
I1226 11:46:02.121085   14086 main.go:100] agent version: 1.15.1
I1226 11:46:02.121188   14086 main.go:106] hostname: linuxkit-e6ee0407aa7e
I1226 11:46:02.121193   14086 main.go:107] kernel version: 6.4.16-linuxkit
W1226 11:46:02.121674   14086 main.go:69] failed to read machine-id: open /proc/1/root/sys/devices/virtual/dmi/id/product_uuid: no such file or directory
W1226 11:46:02.121674   14086 main.go:69] failed to read machine-id: open /proc/1/root/sys/devices/virtual/dmi/id/product_uuid: no such file or directory
W1226 11:46:02.121723   14086 main.go:69] failed to read machine-id: open /proc/1/root/etc/machine-id: no such file or directory
W1226 11:46:02.121723   14086 main.go:69] failed to read machine-id: open /proc/1/root/etc/machine-id: no such file or directory
W1226 11:46:02.121731   14086 main.go:69] failed to read machine-id: open /proc/1/root/var/lib/dbus/machine-id: no such file or directory
W1226 11:46:02.121731   14086 main.go:69] failed to read machine-id: open /proc/1/root/var/lib/dbus/machine-id: no such file or directory
I1226 11:46:02.121747   14086 tracing.go:36] OpenTelemetry traces collector endpoint: http://coroot-opentelemetry-collector:4318/v1/traces
I1226 11:46:02.121841   14086 otel.go:28] OpenTelemetry logs collector endpoint: http://coroot-opentelemetry-collector:4318/v1/logs
I1226 11:46:02.121967   14086 metadata.go:66] cloud provider:
I1226 11:46:02.121979   14086 collector.go:157] instance metadata: <nil>
I1226 11:46:02.122107   14086 profiling.go:51] profiles endpoint: http://coroot-pyroscope:4040/ingest
linkKProbes
linkKProbes end
W1226 11:46:02.309859   14086 registry.go:74] Cannot connect to the Docker daemon at unix:///proc/1/root/run/docker.sock. Is the docker daemon running?
W1226 11:46:02.309859   14086 registry.go:74] Cannot connect to the Docker daemon at unix:///proc/1/root/run/docker.sock. Is the docker daemon running?
I1226 11:46:05.318197   14086 containerd.go:37] using /run/containerd/containerd.sock
W1226 11:46:05.318317   14086 registry.go:80] stat /proc/1/root/var/run/crio/crio.sock: no such file or directory
W1226 11:46:05.318317   14086 registry.go:80] stat /proc/1/root/var/run/crio/crio.sock: no such file or directory
W1226 11:46:05.320744   14086 registry.go:83] systemd journal not found in /proc/1/root/run/log/journal,/proc/1/root/var/log/journal
W1226 11:46:05.320744   14086 registry.go:83] systemd journal not found in /proc/1/root/run/log/journal,/proc/1/root/var/log/journal
F1226 11:46:05.321518   14086 main.go:136] kernel tracing is not available: stat /sys/kernel/debug/tracing: no such file or directory
F1226 11:46:05.321518   14086 main.go:136] kernel tracing is not available: stat /sys/kernel/debug/tracing: no such file or directory
F1226 11:46:05.321518   14086 main.go:136] kernel tracing is not available: stat /sys/kernel/debug/tracing: no such file or directory
F1226 11:46:05.321518   14086 main.go:136] kernel tracing is not available: stat /sys/kernel/debug/tracing: no such file or directory
F1226 11:46:05.321518   14086 main.go:136] kernel tracing is not available: stat /sys/kernel/debug/tracing: no such file or directory

I followed the https://coroot.com/docs/coroot-community-edition/getting-started/installation installation steps. All is working/running:

$ kubectl -n coroot get pods
NAME                                             READY   STATUS    RESTARTS        AGE
coroot-78dc5f6597-l2v9b                          1/1     Running   0               17m
coroot-clickhouse-shard0-0                       1/1     Running   0               17m
coroot-kube-state-metrics-78c5649759-xbk8r       1/1     Running   0               17m
coroot-node-agent-sgg44                          0/1     Error     8 (5m23s ago)   17m
coroot-opentelemetry-collector-68db4f574-26zbc   1/1     Running   4 (16m ago)     17m
coroot-prometheus-server-6bc948d5dc-rhzts        2/2     Running   0               17m
coroot-pyroscope-85ffd498b7-v4stb                1/1     Running   0               17m

Is there a way that I can change the daemonset in a way to have it running? So I can at least experiment a bit with it?
Thanks in advance!

@def
Copy link
Member

def commented Dec 27, 2023

@dj-wasabi, thanks for the report! I've reproduced the issue.
Running the agent in Docker Desktop is theoretically possible, but we'd need to make some tweaks to the code:

  • /sys/kernel/debug is not mounted from the host (seems like the system tries to mount it from the Mac host instead of the Linux VM).
  • To retrieve container metadata, the agent should use Dockerd through the /run/guest-services/docker.sock

Until these adjustments are made, it's safe to consider Docker Desktop as unsupported.

@dj-wasabi
Copy link
Author

Hi @def !

Thank you for your answer. If you need any help testing or validating things, don't hesitate to reach out. Happy to help where needed. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants