2.3. 无法载入内核驱动程序
在 Collector 启动前,它会载入内核驱动程序。然而,在个别情况下,您可能会遇到 Collector 无法加载内核驱动程序的问题,从而导致各种错误消息或异常。在这种情况下,您必须检查日志来识别载入内核驱动程序时失败的问题。
考虑以下 Collector 日志:
[INFO 2022/10/13 14:25:13] Hostname: 'hostname' [...] [INFO 2022/10/13 14:25:13] Successfully downloaded and decompressed /module/collector.ko [INFO 2022/10/13 14:25:13] [INFO 2022/10/13 14:25:13] This product uses kernel module and ebpf subcomponents licensed under the GNU [INFO 2022/10/13 14:25:13] GENERAL PURPOSE LICENSE Version 2 outlined in the /kernel-modules/LICENSE file. [INFO 2022/10/13 14:25:13] Source code for the kernel module and ebpf subcomponents is available upon [INFO 2022/10/13 14:25:13] request by contacting support@stackrox.com. [INFO 2022/10/13 14:25:13] [...] [INFO 2022/10/13 14:25:13] Inserting kernel module /module/collector.ko with indefinite removal and retry if required. [ERROR 2022/10/13 14:25:13] Error inserting kernel module: /module/collector.ko: Operation not permitted. Aborting... [ERROR 2022/10/13 14:25:13] Failed to insert kernel module [ERROR 2022/10/13 14:25:13] Failed to setup Kernel module [INFO 2022/10/13 14:25:13] [INFO 2022/10/13 14:25:13] == Collector Startup Diagnostics: == [INFO 2022/10/13 14:25:13] Connected to Sensor? true [INFO 2022/10/13 14:25:13] Kernel driver available? true [INFO 2022/10/13 14:25:13] Driver loaded into kernel? false [INFO 2022/10/13 14:25:13] ==================================== [INFO 2022/10/13 14:25:13] [FATAL 2022/10/13 14:25:13] Failed to initialize collector kernel components.
[INFO 2022/10/13 14:25:13] Hostname: 'hostname'
[...]
[INFO 2022/10/13 14:25:13] Successfully downloaded and decompressed /module/collector.ko
[INFO 2022/10/13 14:25:13]
[INFO 2022/10/13 14:25:13] This product uses kernel module and ebpf subcomponents licensed under the GNU
[INFO 2022/10/13 14:25:13] GENERAL PURPOSE LICENSE Version 2 outlined in the /kernel-modules/LICENSE file.
[INFO 2022/10/13 14:25:13] Source code for the kernel module and ebpf subcomponents is available upon
[INFO 2022/10/13 14:25:13] request by contacting support@stackrox.com.
[INFO 2022/10/13 14:25:13]
[...]
[INFO 2022/10/13 14:25:13] Inserting kernel module /module/collector.ko with indefinite removal and retry if required.
[ERROR 2022/10/13 14:25:13] Error inserting kernel module: /module/collector.ko: Operation not permitted. Aborting...
[ERROR 2022/10/13 14:25:13] Failed to insert kernel module
[ERROR 2022/10/13 14:25:13] Failed to setup Kernel module
[INFO 2022/10/13 14:25:13]
[INFO 2022/10/13 14:25:13] == Collector Startup Diagnostics: ==
[INFO 2022/10/13 14:25:13] Connected to Sensor? true
[INFO 2022/10/13 14:25:13] Kernel driver available? true
[INFO 2022/10/13 14:25:13] Driver loaded into kernel? false
[INFO 2022/10/13 14:25:13] ====================================
[INFO 2022/10/13 14:25:13]
[FATAL 2022/10/13 14:25:13] Failed to initialize collector kernel components.
如果您遇到此类错误,您不太可能自己修复它。因此,将其报告给 Red Hat Advanced Cluster Security for Kubernetes (RHACS)支持团队,或创建 GitHub 问题。