After Upgrade from 22.04 to 24.04 - Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings

Ubuntu Version:
<24.04 LTS →

Desktop Environment (if applicable):
<none - server installation →

Problem Description:

Terminal upgrade of a ubuntu 22.04 to 24.04
After upgrade the error
“Failed to connect to https://changelogs.ubuntu.com/meta-release-lts. Check your Internet connection or proxy settings”
appears and pinging, update etc does not work.
connection via ssh works.

Relevant System Information:

qnap nas - virtual machine running dokuwiki.

Screenshots or Error Messages:

What I’ve Tried:

  • restart/reboot
  • sudo apt-get reinstall ubuntu-release-upgrader-core

so far nothing i tried worked.

ssh works, so the VM’s NIC and IP are fine; what’s missing is DNS.
After the jump to 24.04 the old /etc/resolv.conf symlink often points at
now-vanished files, so everything that needs a hostname (ping, apt, the
update manager) fails while raw IP traffic still works.

Quick check

ping 1.1.1.1          # ← this should work
ping ubuntu.com       # ← this will time out
ls -l /etc/resolv.conf

If resolv.conf is not a symlink to /run/systemd/resolve/resolv.conf
(or is an empty file) you’ve found the culprit.

Fix in three commands

sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl restart systemd-resolved

Now try:

ping ubuntu.com
sudo apt update

Both should work, and do-release-upgrade / ubuntu-advantage will stop
complaining about changelogs.ubuntu.com.

(If you use a static DNS in Netplan, keep it there; systemd-resolved will
still publish those nameservers into /run/systemd/resolve/resolv.conf.)

thx a lot - that did indeed made updates/ping possible again.

Only thing is - it doesn’t seem to save the solution - after rebooting it is back to the old error message.

How exactly did you do the upgrade from 22.04 to 24.04, the whole transition from resolvconf (which is obsoltete since many years now) to systemd-resolved should be handled by do-release-upgrade properly … i.e. resolvconf should be completely removed, systemd-resolved should be installed and started and said symlink should be put in place automatically …

The behavior you see clearly indicates either a bug in the upgrader (but then many more people would have complained about it by now) or some non-standard steps in your upgrade process …

The fix vanished because something is still re-creating the old
/etc/resolv.conf at every boot. That “something” is almost always
the legacy resolvconf package, which 24.04 no longer uses.
Get rid of it once and the symlink will stay put.

# 1 – see if resolvconf is still around
dpkg -l resolvconf

# 2 – if it shows “ii” (installed), purge it
sudo apt purge resolvconf

# 3 – make sure the modern resolver is enabled
sudo systemctl enable --now systemd-resolved

# 4 – put the permanent symlink back
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

Reboot.
/etc/resolv.conf should still point at
/run/systemd/resolve/resolv.conf, DNS works, and the upgrader’s
meta-release check stops complaining.


Why did this happen at all?

A standard do-release-upgrade removes resolvconf and switches you
to systemd-resolved automatically.
If resolvconf was held back, manually re-installed, or the upgrade
was done with custom scripts, it can sneak back in and overwrite
/etc/resolv.conf on each boot.

Purging the package (or fixing whatever re-installs it) makes the fix
stick for good.

1 Like
  • apt update
  • apt upgrade
  • apt autoremove
  • reboot now
  • do-release-upgrade

as some packages were hold back and i got the message "
Please install all available updates for your release before upgrading. "
i had to

  • sudo apt full-upgrade
    after which
  • do-release-upgrade
    worked.

During update i kept local files when asked and installed grub on all available options.

Looks like everything is ok. Take care!

some packages were hold back: This is not a problem eventually they will be upgraded so you do not need to make anything else for now just make sure you are doing updates consistently.

Thanks all for your help - this did solve the connection problem.

and just for info if others have the problem (and as reminder for myself).

Dokuwiki did not load because apache did not start properly -

  • systemctl status apache2.service
    and

  • systemctl status apache2.service

showed this.
Details about the error i found by going to

  • cd /etc/apache2
    Then:

  • apache2ctl configtest

With the appearing error message i was able to find out that Apache is configured to use PHP 8.1 but i have PHP 8.3.

That can be change via:

  • sudo a2dismod php8.1
  • sudo a2enmod php8.3
  • sudo service apache2 restart

thx everyone for your help.

Please mark the relevant post as the solution.

It also helps the community when others are searching for fixes.

Thanks.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.