kiwix / kiwix-tools

Command line Kiwix tools: kiwix-serve, kiwix-manage, ...
https://download.kiwix.org/release/kiwix-tools/
GNU General Public License v3.0
407 stars 79 forks source link

GLIBC Not found, Docker kiwix-serve #677

Closed mikepaxton closed 1 month ago

mikepaxton commented 1 month ago

When running docker compose up using the sample compose file i'm getting the following error:

failed to register layer: exit status 1: /usr/bin/unpigz: /lib/aarch64-linux-gnu/libc.so.6: version GLIBC_2.33 not found (required by /usr/bin/unpigz)

This is being run on a Raspberry Pi Zero 2 W running a 64bit version of Debian Bullseye.

kelson42 commented 1 month ago

@mikepaxton Please share the whole command line and execution log.

mikepaxton commented 1 month ago

Just running: docker compose up

Here is the log output:

May 20 16:28:49 MiniVault dockerd[553]: time="2024-05-20T16:28:49.878923794-07:00" level=info msg="Attempting next endpoint for pull after error: failed to register layer: exit status 1: /usr/bin/unpigz: /lib/aarch64-linux-gnu/libc.so.6: version "GLIBC_2.33" not found (required by /usr/bin/unpigz)\n" spanID=e15afb8782adc214 traceID=321ca379c96e1533f0b629100e48fe59
May 20 16:34:52 MiniVault dockerd[553]: 2024/05/20 16:34:52 http: superfluous response.WriteHeader call from go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*respWriterWrapper).WriteHeader (wrap.go:98)
May 20 16:35:52 MiniVault dockerd[553]: time="2024-05-20T16:35:52.980842240-07:00" level=info msg="Attempting next endpoint for pull after error: failed to register layer: exit status 1: /usr/bin/unpigz: /lib/aarch64-linux-gnu/libc.so.6: version "GLIBC_2.33" not found (required by /usr/bin/unpigz)\n" spanID=6a7dd850854d9c9d traceID=d8f4361ca51db98b6b83dc6148324e74

Copy of the screen output:

[+] Running 4/5
 ⠸ kiwix-serve 4 layers [⣿⣿⣿⣿]      0B/0B      Pulling                                                                                                                                6.3s 
   ✔ c6b39de5b339 Download complete                                                                                                                                                   1.5s 
   ✔ d5425f0ed073 Download complete                                                                                                                                                   4.0s 
   ✔ a3d1c4407c7a Download complete                                                                                                                                                   0.9s 
   ✔ 9925ce48eb27 Download complete                                                                                                                                                   1.7s 
failed to register layer: exit status 1: /usr/bin/unpigz: /lib/aarch64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /usr/bin/unpigz)

And the docker-compose.yml:

services:
  kiwix-serve:
      container_name: kiwix-serve
      ports:
        - 8200:8080
      image: ghcr.io/kiwix/kiwix-serve:latest
      # uncomment next 4 lines to use it with local zim file in /tmp/zim
      volumes:
        - /data/kiwix_library:/data
      command:
        - '*.zim'

If I missed anything let me know.

kelson42 commented 1 month ago

@rgaudin Do we have some kind of bug with our images and the RPI2?

rgaudin commented 1 month ago

This looks completely unrelated:

@mikepaxton I'd look at your docker setup. Have you tried to run other images?

mikepaxton commented 1 month ago

This looks completely unrelated:

  • output clearly says the offending binary is unpigz which is used by docker
  • our docker images uses the static binaries that exists mostly to avoid such situations
  • our docker images uses Alpine which does not uses glibc

@mikepaxton I'd look at your docker setup. Have you tried to run other images?

This is only happening on my Raspberry Pi 2 W. Using the same docker-compose.yml on a Pi 5 works great. I've listed my docker-compose.yml file above, it's pretty simple and straightforward yet throughs this error message every time. If Alpine doesn't support glibc, is this not the problem?

rgaudin commented 1 month ago

If Alpine doesn't support glibc, is this not the problem?

No.

This is only happening on my Raspberry Pi 2 W. Using the same docker-compose.yml on a Pi 5 works great.

Are you using the same SD-card on both the PiZero2W and the Pi5?

rgaudin commented 1 month ago

@mikepaxton you did not answer my above question asking if you tried to run another image on that docker setup.

From the information you've given, your docker setup looks broken and the issue you're facing is unrelated to kiwix-serve. I am this closing this issue on our end. If you find anything suggesting it is indeed kiwix-serve related, please reopen.

If I were you, I'd look at how you installed docker. Maybe you installed the docker apt repository for the wrong version of debian (since you're on Debian 11 on the Zero2W)

mikepaxton commented 1 month ago

@mikepaxton you did not answer my above question asking if you tried to run another image on that docker setup.

From the information you've given, your docker setup looks broken and the issue you're facing is unrelated to kiwix-serve. I am this closing this issue on our end. If you find anything suggesting it is indeed kiwix-serve related, please reopen.

If I were you, I'd look at how you installed docker. Maybe you installed the docker apt repository for the wrong version of debian (since you're on Debian 11 on the Zero2W)

@rgaudin Sorry, missed that question. Yes, had several other docker containers up and running on the Pi Zero 2 W. No issues with them.

I installed docker using "curl -sSL https://get.docker.com | sh". I was running Bullseye on the Pi and double checked the shell script, it does check for bullseye and installs accordingly.

Anyway, I ended up upgrading to Bookworm on the Pi Zero. After that docker-compose.yml file works great now. Looks like an issue with Bullseye and glibc. Just did a count of containers running under bullseye, nine with no compose issues.

rgaudin commented 1 month ago

Glad to read!