Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glibc 2.28 requirement breaks compatibility with Ubuntu 18.04 LTS #1420

Closed
amadeuspzs opened this issue Sep 3, 2022 · 22 comments
Closed

glibc 2.28 requirement breaks compatibility with Ubuntu 18.04 LTS #1420

amadeuspzs opened this issue Sep 3, 2022 · 22 comments

Comments

@amadeuspzs
Copy link

Versions

  • Pi-hole: 5.12
  • AdminLTE: 5.14.1
  • FTL: 5.17

Platform

  • OS and version: Ubuntu 18.04.6 LTS (GNU/Linux 4.15.0-122-generic x86_64)
  • Platform: Intel NUC

Expected behavior

FTL loads.

Actual behavior / bug

FTL crashes on load:

pihole-FTL: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by pihole-FTL)

Steps to reproduce

Steps to reproduce the behavior:

  1. Attempt to start: sudo service pihole-FTL start
  2. Check systemctl status pihole-FTL.service:
   Loaded: loaded (/etc/init.d/pihole-FTL; generated)
   Active: failed (Result: exit-code) since Sat 2022-09-03 08:42:31 UTC; 19s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3601 ExecStart=/etc/init.d/pihole-FTL start (code=exited, status=1/FAILURE)

Sep 03 08:42:31 nuc systemd[1]: Starting LSB: pihole-FTL daemon...
Sep 03 08:42:31 nuc pihole-FTL[3601]: Not running
Sep 03 08:42:31 nuc su[3637]: Successful su for pihole by root
Sep 03 08:42:31 nuc su[3637]: + ??? root:pihole
Sep 03 08:42:31 nuc su[3637]: pam_unix(su:session): session opened for user pihole by (uid=0)
Sep 03 08:42:31 nuc pihole-FTL[3601]: /usr/bin/pihole-FTL: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (r
Sep 03 08:42:31 nuc su[3637]: pam_unix(su:session): session closed for user pihole
Sep 03 08:42:31 nuc systemd[1]: pihole-FTL.service: Control process exited, code=exited status=1
Sep 03 08:42:31 nuc systemd[1]: pihole-FTL.service: Failed with result 'exit-code'.
Sep 03 08:42:31 nuc systemd[1]: Failed to start LSB: pihole-FTL daemon.

Debug Token

Additional context

It looks like the update to glibc 2.28 breaks compatibility with Ubuntu 18.04 LTS (EOL 2028).

ldd --version:

ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27
Copyright (C) 2018 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.

I have read that I need to do a full upgrade to fix this, but this may cause breaking changes with other services on this server.

@yubiuser
Copy link
Member

yubiuser commented Sep 3, 2022

@yubiuser yubiuser added the Bug label Sep 3, 2022
@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/lib-x86-64-linux-gnu-libc-so-6-version-glibc-2-28-not-found/57506/8

@DL6ER
Copy link
Member

DL6ER commented Sep 3, 2022

Please run

pihole checkout ftl v5.16.3

until we have found a permanent solution.

edit Updated the version, sorry for the typo.

@folti
Copy link

folti commented Sep 3, 2022

Please run

pihole checkout ftl 5.16.3

until we have found a permanent solution.

Hi,

at least for me, that command gives the following output:

 # pihole checkout ftl  5.16.3                                                                                                                                           
 Please note that changing branches severely alters your Pi-hole subsystems                                                                                                                   
 Features that work on the master branch, may not on a development branch
 This feature is NOT supported unless a Pi-hole developer explicitly asks!                                                                                                                  
 Have you read and understood this? [y/N] y                                                                                                                                                 
                                                                                                                                                                                             
pihole-FTL: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by pihole-FTL)             

The problem is in the /opt/pihole/piholeCheckOut.sh at line 171: oldbranch="$(pihole-FTL -b)"

If I replace it with: oldbranch="$(pihole-FTL -b || echo master)"

the response will change to this:

 pihole checkout ftl 5.16.3       
  Please note that changing branches severely alters your Pi-hole subsystems
  Features that work on the master branch, may not on a development branch
  This feature is NOT supported unless a Pi-hole developer explicitly asks!
  Have you read and understood this? [y/N] y

/opt/pihole/piholeCheckout.sh: line 171: pihole-FTL: command not found
  [✗] Requested branch "5.16.3" is not available
  [i] Available branches for FTL are:
      - adlist_message_table
      - development
      - fix/dhcp_netid_free
      - fix/dnssec-retry
      - fix/mysterious_crash
      - master
      - new/GeoIP
      - new/devcontainers-tweakbuildscript
      - new/dnsmasq_server_hostnames
      - new/god
      - new/http
      - revert-1395-newbuildcontainers
      - special/CI_development
      - surely_not
      - test/e2e
      - tweak/adam-pass-smoke
      - tweak/debug_for_refused
      - tweak/dot_empty_domain_database
      - tweak/gravity
      - tweak/round-robin
      - tweak/sqlite3_optimize
      - tweak/white_regex_id
      - update/dnsmasq

@DL6ER
Copy link
Member

DL6ER commented Sep 3, 2022

@folti Sorry, I edited a missing v into my post above but I have been too slow for you. Could you try again with the v and your modification to the update script?

@folti
Copy link

folti commented Sep 3, 2022

@DL6ER Yes, now it works, thank you.

@DL6ER DL6ER added Breaking change and removed Bug labels Sep 3, 2022
@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/psa-dropping-support-for-ubuntu-18-04/57523/1

@rar0ch
Copy link

rar0ch commented Sep 3, 2022

I had the same problem, the steps I had to take were:

Temporarily change system's DNS resolver in /etc/resolv.conf from nameserver 127.0.0.1 to nameserver 1.1.1.1

Change line 171 in /opt/pihole/piholeCheckOut.sh from
oldbranch="$(pihole-FTL -b)" to oldbranch="$(pihole-FTL -b || echo master)" like @folti described.

Downgrade FTL with the command pihole checkout ftl v5.16.3

Change system's DNS resolver back to nameserver 127.0.0.1

@MrHappy
Copy link

MrHappy commented Sep 3, 2022

Please run

pihole checkout ftl v5.16.3

until we have found a permanent solution.

edit Updated the version, sorry for the typo.

I first did this and later updated my machine to ubuntu 20.
After that I ran pihole -up and after it is nagging Warning: You are using FTL from a custom branch (v5.16.3) and might be missing future releases.
How do I undo the setting?

--- nvm... found it..
pihole checkout ftl master

@yubiuser
Copy link
Member

yubiuser commented Sep 3, 2022

pihole checkout master

@amadeuspzs
Copy link
Author

Can confirm running:

pihole checkout ftl v5.16.3 yields the following error:

pihole-FTL: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by pihole-FTL)

The fix mentioned above by @rar0ch works:

Change line 171 in /opt/pihole/piholeCheckOut.sh from
oldbranch="$(pihole-FTL -b)" to oldbranch="$(pihole-FTL -b || echo master)" like @folti described.

and re-running

pihole checkout ftl v5.16.3

works.

I will disable automatic updates as I imagine that will pull back to master/latest update each time?

@yubiuser
Copy link
Member

yubiuser commented Sep 3, 2022

I will disable automatic updates

This is a wise decision, as it is not recommended in any way to auto-update an essential network service without reading the release notes first.

@helmar74

This comment was marked as off-topic.

@emilioramirez

This comment was marked as off-topic.

@rdwebdesign

This comment was marked as off-topic.

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

@hennyhoeven
Copy link

The advise doesn't work.

pihole checkout ftl v5.16.3
Please note that changing branches severely alters your Pi-hole subsystems
Features that work on the master branch, may not on a development branch
This feature is NOT supported unless a Pi-hole developer explicitly asks!
Have you read and understood this? [y/N] y

pihole-FTL: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.28' not found (required by pihole-FTL)

Which makes sense.. pihole-FTL can't start due to missing GLIB ..

And piholeCheckout.sh tries to run pihole-FTL to get some old-branch version.

oldbranch="$(pihole-FTL -b)" actually needs to run the binary :)

Just comment it out then it works.

oldbranch="$(pihole-FTL -b) || echo master)"

@ZizzyZizzy
Copy link

This is now completely broken and extremely difficult to fix with the given work around.

The reason is because the files for all old versions previously hosted at ftl.pi-hole.net are now missing:
https://ftl.pi-hole.net/v5.16.3/

I had to hack my way around it by downloading the files from https://github.com/pi-hole/FTL/releases/tag/v5.16.3 into my local web server, setup an SSL VirtualHost to spoof that domain locally, and then modify basic-install.sh so every curl to the hard-coded ftl.pi-hole-net site used the -k option to ignore the invalid certificate.

In hindsight, I should have probably just changed basic-install.sh to look for the requested version in the github releases instead, but I didn't realize that until after I got it working this way.

Don't forget to create /var/log/pihole and chown it to pihole:pihole. For some reason after installing the older version, that folder was gone and pihole-FTP was silently failing because it couldn't write to its log file.

@mrdc
Copy link

mrdc commented Jun 22, 2023

@ZizzyZizzy I've played with basic-install.sh and ended up with a semi working pi-hole: ftl is 5.16.3, --gravity command stopped working etc. That's quite annoying as I've already spent 2 hours fixing.
And there is no official way to install older version in case something goes wrong.

  Current Pi-hole version is v5.17.1
  Current AdminLTE version is v5.20.1
  Current FTL version is v5.16.3

@github-actions github-actions bot removed the stale label Jun 22, 2023
@DL6ER
Copy link
Member

DL6ER commented Jun 22, 2023

As long as your are on x86, you could use the musl binary that is fully-static and completely independent of the installed glibc version. In the currently ongoing v6 development, we are looking at compiling the binaries for all of the major supported architectures batteries-included so glibc incompatibility should not happen again.

@theY4Kman
Copy link

theY4Kman commented Aug 23, 2023

I was able to swap out the download site from ftl.pihole.net to github by changing two lines in /etc/.pihole/automated install/basic-install.sh — one line in check_download_exists() to verify the artifact is available, and one in FTLinstall() performing the actual download of the artifact (and its checksum file).

Full patch file
diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh
index 1f3002e..010661c 100755
--- a/automated install/basic-install.sh        
+++ b/automated install/basic-install.sh        
@@ -2090,7 +2090,7 @@ update_dialogs() {
 }
 
 check_download_exists() {
-    status=$(curl --head --silent "https://ftl.pi-hole.net/${1}" | head -n 1)
+    status=$(curl --head --silent "https://github.com/pi-hole/FTL/releases/download/${1}" | head -n 1)
     if grep -q "404" <<< "$status"; then
         return 1
     else
@@ -2230,7 +2230,7 @@ FTLinstall() {
     if [[ "${ftlBranch}" == "master" ]];then
         url="https://github.com/pi-hole/ftl/releases/latest/download"
     else
-        url="https://ftl.pi-hole.net/${ftlBranch}"
+        url="https://github.com/pi-hole/FTL/releases/download/${ftlBranch}"
     fi
 
     if curl -sSL --fail "${url}/${binary}" -o "${binary}"; then

check_download_exists

Around line 2090, change this line

status=$(curl --head --silent "https://ftl.pi-hole.net/${1}" | head -n 1)

To reference github releases:

status=$(curl --head --silent "https://github.com/pi-hole/FTL/releases/download/${1}" | head -n 1)

FTLinstall

Around line 2230, change this line

url="https://ftl.pi-hole.net/${ftlBranch}"

To reference github releases:

url="https://github.com/pi-hole/FTL/releases/download/${ftlBranch}"

After making these changes, I was able to run pihole checkout ftl v5.16.3 successfully.

@gtsboys
Copy link

gtsboys commented Dec 18, 2023

Beginner question... How to I edit the piholeCheckout.sh?
I prefer to open it in a text editor rather than in terminal.

All things linux are new to me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests