V2EX 前天 14:46
[Kubernetes] 求大神指点在 k3s 上面启动容器报错 libc.so.6: invalid ELF header milvus 应该怎么入手排查
index_new5.html
../../../zaker_core/zaker_tpl_static/wap/tpl_guoji1.html

 

本文描述了在 VMware 虚拟机上使用 Debian 12 系统,通过 k3s 部署 Milvus 时遇到的问题。尽管其他服务如 minio 和 Docker Registry 运行正常,但 Milvus 无法启动,并报错“invalid ELF header”。通过使用 ctr 和 Docker 进行了排查,确认镜像架构无误,问题可能出在 k3s 的 containerd 上。文章提供了详细的排查步骤和环境信息,为解决类似问题提供了参考。

🤔 在 Debian 12 虚拟机上,使用 k3s 部署 Milvus 时,出现“invalid ELF header”错误,导致 Milvus 无法启动。

🔍 错误发生在使用 k3s 的 containerd 运行 Milvus 镜像时,即使使用 ctr 命令手动运行容器也同样报错。

🧐 通过 crictl inspect 检查镜像架构,确认是 linux/amd64 架构,排除了镜像架构不兼容的可能性。

💡 在同一虚拟机上安装 Docker 并成功运行 Milvus 容器,表明问题可能与 k3s 使用的 containerd 有关。

💻 提供了虚拟机的 CPU 详细信息,包括架构、型号、虚拟化特性等,有助于分析环境差异。

同事在一台用 VmWare 创建的虚拟机(x86_64)上面,安装了 Debian 12 ,在其上安装了 k3s 1.28.15

随后在这个 k3s 上面部署了一些服务比如 minio, docker registry 之类的,都是正常启动运行的。但是部署 milvus 时老是起不来,报错

/tini: error while loading shared libraries: /lib/x86_64-linux-gnu/libc.so.6: invalid ELF header milvus

我随后尝试使用 ctr 创建容器进入 shell 环境,也是不行

k3s ctr run --rm -t --platform linux/amd64 docker.io/milvusdb/milvus:v2.4.5 milvus /bin/bash

还是一样的报错。

我一开始怀疑是我们拉取的镜像有问题,怀疑是用了 arm 架构的镜像,但是随后我使用 crictl inspeci 查看了镜像确实是是 linux/amd64 的,另外我看了下 milvus 的 Dockerfile 看着也中规中规,目前还没找出原因,也不知道如何入手排查。

随后我在这台虚拟机上面安装了 docker 并创建容器,是可以成功启动的,看起来问题可能在 k3s 用的 containerd 这里,但是不知道该从哪里排查了。

附:该虚拟机 CPU 情况

root@debian1:~/ccdinstaller# lscpuArchitecture:            x86_64  CPU op-mode(s):        32-bit, 64-bit  Address sizes:         45 bits physical, 48 bits virtual  Byte Order:            Little EndianCPU(s):                  16  On-line CPU(s) list:   0-15Vendor ID:               GenuineIntel  BIOS Vendor ID:        GenuineIntel  Model name:            11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz    BIOS Model name:     11th Gen Intel(R) Core(TM) i7-11700 @ 2.50GHz  CPU @ 2.5GHz    BIOS CPU family:     2    CPU family:          6    Model:               167    Thread(s) per core:  1    Core(s) per socket:  16    Socket(s):           1    Stepping:            1    BogoMIPS:            4991.99    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopolo                         gy tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hyperviso                         r lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed adx smap avx512ifma clflushopt avx5                         12cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512vbmi umip avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg avx512_vpopcntdq rdpid md_cle                         ar flush_l1d arch_capabilitiesVirtualization features:  Hypervisor vendor:     VMware  Virtualization type:   fullCaches (sum of all):  L1d:                   768 KiB (16 instances)  L1i:                   512 KiB (16 instances)  L2:                    8 MiB (16 instances)  L3:                    16 MiB (1 instance)NUMA:  NUMA node(s):          1  NUMA node0 CPU(s):     0-15Vulnerabilities:  Gather data sampling:  Unknown: Dependent on hypervisor status  Itlb multihit:         Not affected  L1tf:                  Not affected  Mds:                   Not affected  Meltdown:              Not affected  Mmio stale data:       Mitigation; Clear CPU buffers; SMT Host state unknown  Retbleed:              Mitigation; IBRS  Spec rstack overflow:  Not affected  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization  Spectre v2:            Mitigation; IBRS, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected  Srbds:                 Not affected  Tsx async abort:       Not affected

Fish AI Reader

Fish AI Reader

AI辅助创作,多种专业模板,深度分析,高质量内容生成。从观点提取到深度思考,FishAI为您提供全方位的创作支持。新版本引入自定义参数,让您的创作更加个性化和精准。

FishAI

FishAI

鱼阅,AI 时代的下一个智能信息助手,助你摆脱信息焦虑

联系邮箱 441953276@qq.com

相关标签

k3s Milvus Debian 12 containerd invalid ELF header
相关文章