Welcome to the Linux Foundation Forum!

Lab 6.1 - Problem to start busybox due to /lib/libm.so.6: file too short error

redzi00
redzi00 Posts: 4
edited February 12 in LFS258 Class Forum

Hello,

I'm using recommended Ubuntu 20.04 LTS nodes on Oracle VM VirtualBox and so far all the lab were going smooth. Unfortunately when starting lab 6.1 I'm having issues with busybox when trying to execute below command I'm getting error as below:

student@cp:~$ kubectl run -i -t busybox --image=busybox --restart=Never
sh: error while loading shared libraries: /lib/libm.so.6: file too short
pod default/busybox terminated (Error)

I think this is not connected with my environment but busybox image which is somehow not working:(
I've tried running other busybox images like:

root@worker:/home/student# crictl images

IMAGE TAG IMAGE ID SIZE
docker.io/library/busybox glibc 3f57d9401f8d4 2.23MB
docker.io/library/busybox latest 3f57d9401f8d4 2.23MB
docker.io/library/busybox stable 3f57d9401f8d4 2.23MB

all are the same and failing the same way.

Those to can be started but those are much smaller then above one:

IMAGE TAG IMAGE ID SIZE
docker.io/library/busybox 1.28 8c811b4aec35f 728kB
docker.io/library/busybox musl 59888ccc9e651 887kB

Could you please let me know how I can overcome this problem to use proper busybox images to not have any issues in further labs?

Regards,

Piotr

Comments

  • chrispokorni
    chrispokorni Posts: 2,117

    Hi @redzi00,

    The command provided in the lab guide works as is. Its syntax follows the kubectl run command reference. The busybox container works with no issues from the default image. If none of the additional images work, it is most likely an issue related with your environment.

    What is the Kubernetes version, container runtime, and VM size? What is the source of the Ubuntu 20.04 LTS image? Is it the desktop or server image?

    Regards,
    -Chris

  • redzi00
    redzi00 Posts: 4

    Hello,

    Requested answers:

    student@cp:~$ sudo kubeadm version
    [sudo] password for student:
    kubeadm version: &version.Info{Major:"1", Minor:"28", GitVersion:"v1.28.1", GitCommit:"8dc49c4b984b897d423aab4971090e1879eb4f23", GitTreeState:"clean", BuildDate:"2023-08-24T11:21:51Z", GoVersion:"go1.20.7", Compiler:"gc", Platform:"linux/amd64"}

    student@cp:~$ kubectl get node -o wide
    NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
    cp Ready control-plane 2d6h v1.28.1 192.168.1.30 Ubuntu 20.04 LTS 5.4.0-171-generic containerd://1.6.28
    worker Ready 2d6h v1.28.1 192.168.1.31 Ubuntu 20.04 LTS 5.4.0-171-generic containerd://1.6.28

    cp node: 3vCPU, 7.5G RAM, 20GB disk
    worker node: 2vCPU, 7.5g RAM, 20 GB disk

    I have used this link: https://old-releases.ubuntu.com/releases/20.04/
    and downloaded ubuntu-20.04-live-server-amd64 (908MB) iso file.

    I'm able to proceed Lab6.x using busybox:1.28.1 image (also busybox musl works) but not sure if it will work for later labs?

    Regards,

    Piotr

  • chrispokorni
    chrispokorni Posts: 2,117

    Hi @redzi00,

    Your environment seems to meet the requirements. I am glad that you found a busybox container image that works. Oftentimes it is the hypervisor or the host machine network and firewalls (this includes proxies, ISP, VPN) that may impact how packages are being downloaded by the VMs.

    The busybox container image is used in a few places, and I would expect it to meet the requirements of later lab exercises as well.

    Regards,
    -Chris

  • redzi00
    redzi00 Posts: 4

    Hello,

    Missing library is available in different directory but I'm not sure if it is missing or it is corrupted as error message is not clear...I think it is empty but file or link exists..

    Is there any way to run busybox (container in general) to pass some argument or create a symbolic link to problematic library? I noticed that overlay disks on nodes are showing mounted content of running container filesystem...but in my case container is not starting up so I assume I cannot create symbolic ink in such a case?

    Regards,

    Piotr

  • chrispokorni
    chrispokorni Posts: 2,117

    Hi @redzi00,

    It may just be a permission issue. What are the permissions of the "student" user on the VM (assuming that is the user running all kubectl commands)? Is it an admin user, similar to the "ubuntu" user of a Ubuntu system?

    Regards,
    -Chris

  • redzi00
    redzi00 Posts: 4
    edited February 15

    Hello,

    student@cp:~$ groups
    student adm cdrom sudo dip plugdev lxd

    I've tried as root also:

    root@cp:~# kubectl run -it busybox --image=busybox --restart=Never
    sh: error while loading shared libraries: /lib/libm.so.6: file too short
    pod default/busybox terminated (Error)

    This is quite disappointing to be honest as I did exactly all it was recommended in the lab setup tutorial to not face any problems with course labs to not waste time on any troubleshooting issues coming from usage of different ubuntu version etc. :(

    Regards,

    Piotr

  • chrispokorni
    chrispokorni Posts: 2,117

    Hi @redzi00,

    The "ubuntu-20.04.5-live-server-amd64.iso" image may be a better option as it is more recent and probably the most up to date.

    Regards,
    -Chris

Categories

Upcoming Training