loki icon indicating copy to clipboard operation
loki copied to clipboard

GLIBC version mismatch in Promtail binary

Open iljalukin opened this issue 1 year ago • 58 comments

Describe the bug When attempting to run Promtail, the following error occurs: /usr/bin/promtail: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /usr/bin/promtail) /usr/bin/promtail: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /usr/bin/promtail)

To Reproduce Install and run promtail 3.1.0 from apt.grafana.com using instructions from https://apt.grafana.com

Expected behavior Promtail should run without GLIBC version errors.

Environment:

  • local install on Debian 11 (bullseye)

Screenshots, Promtail config, or terminal output /usr/bin/promtail: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.32' not found (required by /usr/bin/promtail) /usr/bin/promtail: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by /usr/bin/promtail)

iljalukin avatar Jul 03 '24 07:07 iljalukin

I can confirm that I am seeing the same issue with the RPM repository when installing on AlmaLinux 8.10.

mrlhansen avatar Jul 03 '24 08:07 mrlhansen

Can confirm the same on Ubuntu 20.04.6 LTS (Focal Fossa):

Jul 3 10:52:36 loki promtail[377]: /usr/bin/promtail: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /usr/bin/promtail)

A rollback/downgrade to promtail 3.0 is fixing it temporarily.

jostrasser avatar Jul 03 '24 08:07 jostrasser

Please roll back any rpm+apt repositories distributing this binary. How can something like this just be distributed to a wide audience? Is there no testing for this stuff? This just breaks log aggregation for whole companies.

Smith4545 avatar Jul 04 '24 08:07 Smith4545

I have the same problem

jytx avatar Jul 05 '24 00:07 jytx

Same with Rocky Linux 8.8

anhdowastaken avatar Jul 05 '24 07:07 anhdowastaken

the same issue on AlmaLinux release 8.9

Vitaliy155 avatar Jul 12 '24 12:07 Vitaliy155

Same issue on Amazon Linux 2

jacobamey avatar Jul 23 '24 15:07 jacobamey

same issue on Rocky8

# promtail --version
promtail: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by promtail)
promtail: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by promtail)

Aethylred avatar Jul 25 '24 02:07 Aethylred

almalinux 8.10 also :(

adamw-linadm avatar Jul 25 '24 14:07 adamw-linadm

@JStickler any updates when this will be fixed?

jostrasser avatar Aug 03 '24 18:08 jostrasser

Same issue here on Ubuntu 20

Edit: Working on Ubuntu 22 because GLIBC is version 2.35, but on Ubuntu 20, GLIBC is version 2.31

mmagdy88 avatar Aug 04 '24 21:08 mmagdy88

Good evening,

Issue is present with promtail-3.1.1-1.x86_64, so i went for an older version this package for the moment. In my case, for AlmaLinux release 8.10 (Cerulean Leopard) i have installed an older version: dnf install promtail-2.9.9-1.x86_64

bursan85 avatar Aug 13 '24 16:08 bursan85

CentOS 8 stream problem version 3.1.1 - /lib64/libc.so.6: version `GLIBC_2.32' not found

Alex4Codes avatar Aug 14 '24 08:08 Alex4Codes

3.0.1 is also affected

bpfoster avatar Aug 14 '24 12:08 bpfoster

This affects Amazon Linux 2 as well (CentOS 7 derivative + updated kernel etc.)

Amazon Linux 2023 works ok.

EDIT: Downgrading to 2.9.9 works on older OSes.

shantanugadgil avatar Aug 19 '24 07:08 shantanugadgil

Tried downgrading to 3.0.1 and 2.9.10 and finally got it working with 2.9.9 on Ubuntu 20

$ grep -i pretty /etc/os-release
PRETTY_NAME="Ubuntu 20.04.6 LTS"
$ dpkg -s promtail | grep Version
Version: 2.9.9

boite avatar Aug 19 '24 11:08 boite

I assume the fix would be to use a build container/os of a lower glibc version!

shantanugadgil avatar Aug 21 '24 18:08 shantanugadgil

Or build trully static go binary.

adamw-linadm avatar Aug 23 '24 08:08 adamw-linadm

Same here, install from binaries, downgrade from 2.9.10 to 2.9.9 as a workaround (Debian 11, x86_64).

fauust avatar Aug 23 '24 17:08 fauust

Same Issue occurs to me.

My OS is Debian 11.7 My Kernel version is 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux

Bokki-Ryu avatar Aug 27 '24 04:08 Bokki-Ryu

I check my GLIBC Version as belows.

ldd --version

My GLIBC Version is ldd (Debian GLIBC 2.31-13+deb11u6) 2.31

If you use a version of Promtail that is compatible with the GLIBC version of your OS, this may fix the problem.

Bokki-Ryu avatar Aug 27 '24 05:08 Bokki-Ryu

@iljalukin In my case, Promtail v2.9.9, It works well.

Bokki-Ryu avatar Aug 27 '24 05:08 Bokki-Ryu

@iljalukin In my case, Promtail v2.9.9, It works well.

This does not solve my problem, as I want to install the latest available version via the APT repository as described above. My workaround is to install version 3.0.0 with apt install promtail=3.0.0 and pin it with apt-mark hold promtail. Debian 11 is the current LTS version, which will be maintained until 2026 and it would be nice if promtail could be installed there in the current version.

I hope that the developers will pay attention to this issue and fix it.

iljalukin avatar Aug 27 '24 06:08 iljalukin

It's honestly a little concerning that this has not been fixed after two months. This breaks log aggregation on most enterprise Linux distributions used in production. I have decided to disabled the Grafana RPM repository completely and moved working versions of the RPMs that I need into a private repository to avoid these things affecting production. But if this is not fixed in a reasonable time, then Grafana Loki is not the right solution.

mrlhansen avatar Aug 27 '24 06:08 mrlhansen

Indeed concerning, hopefully due to holiday, meanwhile running old version. If not fix in long term, will need to look for alternative

BlackMoon2020 avatar Aug 27 '24 07:08 BlackMoon2020

I think there is no different way except updating OS which support target GLIBC library.

In production, Because It is hard to update OS version, It is better to make binary file less dependent on libraries like GLIBC closely related to the operating system.

Bokki-Ryu avatar Aug 28 '24 02:08 Bokki-Ryu

https://github.com/grafana/loki/issues/13393#issuecomment-2295819830

https://github.com/grafana/loki/issues/13393#issuecomment-2302676145

I am not a GitHub workflow expert, so I am not able to submit the relevant PR to downgrade the "build environment", but I believe that the workflow is building on the latest Ubuntu (based on a rudimentary search inside the .github/ directory) which would have a glibc >= 2.32

My use case is to support Amazon Linux 2, which uses glibc 2.26

$ cat /etc/*release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
SUPPORT_END="2025-06-30"
Amazon Linux release 2 (Karoo)

$ ldd --version
ldd (GNU libc) 2.26
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

$ rpm -qa | grep glibc-2
glibc-2.26-64.amzn2.0.2.x86_64

shantanugadgil avatar Aug 28 '24 08:08 shantanugadgil

@cyriltovena could you help with this?

shantanugadgil avatar Aug 28 '24 08:08 shantanugadgil

It would be helpful to have a web page that shows the available Promtail Binary versions for each OS version.

Bokki-Ryu avatar Aug 30 '24 02:08 Bokki-Ryu

Same with Rocky 8.9. Surprised this has not been dealt with given its severity.

digdilem avatar Sep 03 '24 12:09 digdilem