DNS resolver not functioning after elevate from centos 7 to almalinux 8

Elevate failed on stage 4
the problem seem to be that cannot connect with repos, so after a while I noticed that even i can ping to IP addresses, I can’t ping to urls, /etc/resolv.conf is correct:
nameserver 8.8.8.8
nameserver 8.8.4.4

I tried all, reconfigured the network several times and did everything even with the help of my server provider and simply didn’t worked,

Anyone has any Idea of what I’m missing? what else can i check?

This is the error on the log:

  • 2024-06-14 23:08:35 (6126) [ERROR] The command ‘leapp upgrade’ did not complete successfully. Please investigate and resolve the issue.
    Once resolved, you can continue the upgrade by running the following commands:
    touch /var/cpanel/elevate_leap_fail_continue
    /scripts/elevate-cpanel --continue
    The following log files may help in your investigation.
    /var/log/leapp/leapp-upgrade.log
    /var/log/leapp/leapp-report.txt
  • 2024-06-14 23:08:35 (6512) [INFO] Sending notification: Failed to update to AlmaLinux 8
  • 2024-06-14 23:08:35 (6517) [ERROR] The elevation process failed during stage 4.
  • 2024-06-14 23:08:35 (6517) [ERROR]
  • 2024-06-14 23:08:35 (6517) [ERROR] You can continue the process after fixing the errors by running:
  • 2024-06-14 23:08:35 (6517) [ERROR]
  • 2024-06-14 23:08:35 (6517) [ERROR] /usr/local/cpanel/scripts/elevate-cpanel --continue
  • 2024-06-14 23:08:35 (6517) [ERROR]
  • 2024-06-14 23:08:35 (6517) [ERROR] You can check the error log by running:
  • 2024-06-14 23:08:35 (6517) [ERROR]
  • 2024-06-14 23:08:35 (6517) [ERROR] /usr/local/cpanel/scripts/elevate-cpanel
  • 2024-06-14 23:08:35 (6517) [ERROR]
  • 2024-06-14 23:08:35 (6517) [ERROR] Last Error:
  • 2024-06-14 23:08:35 (6517) [ERROR]
  • 2024-06-14 23:08:35 (6517) [ERROR] The LEAPP upgrade process did not succeed
  • 2024-06-14 23:08:35 (6517) [ERROR] Review the log at /var/log/elevate-cpanel.log for more details
  • 2024-06-14 23:08:35 (8092) [FATAL] The LEAPP upgrade process did not succeed
    Review the log at /var/log/elevate-cpanel.log for more details

On /var/log/elevate-cpanel.log i found this:

  • 08-00:24:35 (3085) [ERROR] There are unfinished yum transactions remaining. Please address these before upgrading. The tool yum-complete-transaction
    may help you with this task.
  • 08-00:24:35 (2504) [WARN] *** Elevation Blocker detected: ***
    yum is not stable
  • 08-00:24:35 (2925) [INFO] Checking if your system is up to date:
  • 08-00:24:35 (3361) [INFO] Running: /usr/bin/yum clean all
  • 08-00:24:35 (3362) [INFO]
  • 08-00:24:35 (3372) [INFO] Loaded plugins: fastestmirror, universal-hooks
  • 08-00:24:35 (3372) [INFO] Cleaning repos: EA4 cpanel-addons-production-feed cpanel-plugins MariaDB103 base
  • 08-00:24:35 (3372) [INFO] : extras updates
  • 08-00:24:35 (3372) [INFO] Cleaning up list of fastest mirrors
  • 08-00:24:35 (3382) [INFO]
  • 08-00:24:35 (3361) [INFO] Running: /usr/bin/yum check-update
  • 08-00:24:35 (3362) [INFO]
  • 08-00:24:36 (3372) [INFO] Loaded plugins: fastestmirror, universal-hooks
  • 08-00:24:36 (3372) [INFO] Determining fastest mirrors
  • 08-00:24:39 (3372) [INFO] * EA4: 208.74.123.62
  • 08-00:24:39 (3372) [INFO] * cpanel-addons-production-feed: 208.74.123.62
  • 08-00:24:39 (3372) [INFO] * cpanel-plugins: 208.74.123.62
  • 08-00:24:39 (3372) [INFO] * base: mirrors.ocf.berkeley.edu
  • 08-00:24:39 (3372) [INFO] * extras: mirror.keystealth org
  • 08-00:24:39 (3372) [INFO] * updates: mirrors.raystedman org
  • 08-00:24:53 (3372) [INFO]
  • 08-00:24:53 (3372) [INFO] kernel.x86_64 3.10.0-1160.76.1.el7 updates
  • 08-00:24:53 (3382) [INFO]
  • 08-00:24:53 (2928) [WARN] Your system is not up to date please run: /usr/bin/yum update
  • 08-00:24:53 (2504) [WARN] *** Elevation Blocker detected: ***
    System is not up to date
  • 08-00:24:53 (2804) [INFO] Checking EasyApache profile compatibility with Almalinux 8.
  • 08-00:24:53 (1448) [INFO] Running: /usr/local/bin/ea_current_to_profile --target-os=AlmaLinux_8
  • 08-00:24:54 (1469) [INFO] Backed up EA4 profile to /etc/cpanel/ea4/profiles/custom/current_state_at_2022-09-08_00:24:54_modified_for_AlmaLinux_8.json
  • 08-00:24:54 (570) [WARN] Please fix the detected issues before performing the elevation process.

So I tried to /usr/bin/yum check-update and go this:

Could not retrieve mirrorlist http:// httpupdate.cpanel net/ea4-c7-x86_64-mirrorlist error was
14: curl#6 - “Could not resolve host: httpupdate.cpanel net; Name or service not known”

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

  1. Contact the upstream for the repository and get them to fix the problem.
  1. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).
  1. Run the command with the repository temporarily disabled
    yum --disablerepo= …
  1. Disable the repository permanently, so yum won’t use it by default. Yum
    will then just ignore the repository until you permanently enable it
    again or use --enablerepo for temporary usage:
    yum-config-manager --disable <repoid>
   or
       subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
 Note that yum will try to contact the repo. when it runs most commands,
 so will have to try and fail each time (and thus. yum will be be much
 slower). If it is a very temporary problem though, this is often a nice
 compromise:
    yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot find a valid baseurl for repo: EA4/7/x86_64

So I check if I was connected to the internet with ping:

[23:58] [server1 ~] # ping google.com
ping: google.com: Name or service not known
[23:58] [server1 ~] # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=118 time=10.9 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=10.9 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=10.7 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=11.4 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=118 time=10.5 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=118 time=12.7 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=118 time=11.8 ms
^C
— 8.8.8.8 ping statistics —
7 packets transmitted, 7 received, 0% packet loss, time 6009ms
rtt min/avg/max/mdev = 10.593/11.333/12.773/0.716 ms

So now I know why can’t connect with repos, and like I said on the 1st msg on this post, I tried all, reconfigured the network several times and did everything even with the help of my server provider and simply didn’t worked

Hey greatmenj,

You should not edit /etc/resolv.conf manually as it is generated by NetworkManager service, it is likely to get overridden at any given time.

I’d recommend using something like this:

nmcli con mod <connection-name> ipv4.dns "8.8.8.8 8.8.4.4"

You can get the connection name by using “nmcli con”.


Also, I’d check if port 53 is open in the TCP and UDP outbound firewall configuration:

nc -vz 8.8.8.8 53

If you get something along the lines of “Ncat: Connection refused.” you are blocking outbound port 53 connections.

If you aren’t blocking outbound port 53 connections, to further investigate, you can try and use something like this:

dig almalinux.org @8.8.8.8

To check if you get a response as it should only rely on the availability of the DNS server and not a service of sorts.


If dig with a specific DNS server works and you are not blocking the connection the issue probably relays in the DNS configuration.

I hope this helps :grin:.