Uninstall proftd and exim before leapp-upgrade

tveenker

Verified User
Joined
Mar 5, 2023
Messages
21
Hi,

In trying to upgrade my CentOS 7 system (VPS) to AlmaLinux 8 via the Elevate project. My first attempts failed however. Apparently it stumbles over some conflict with proftpd and exim.

From leapp-upgrade.log:
Error: Transaction test error:
file /etc/proftpd.conf from install of proftpd-1.3.6e-7.el8.x86_64 conflicts with file from package proftpd-standalone-1.3.5-1.x86_64

Command ['systemd-nspawn', '--register=no', '--quiet', '-D', u'/var/lib/leapp/el8userspace', <snip>
External command has finished: <snip>['systemd-nspawn', '--register=no', '--quiet', '-D', u'/var/li <snip>
Cannot calculate, check, test, or perform the upgrade transaction.

I don't use any ftp services so I have disabled them in DA. It is not listed when I run ./build list_removals. If I nevertheless run ./build remove_proftpd I get this:

Disabling proftpd in services.status
Failed to stop proftpd.service: Unit proftpd.service not loaded.
Disabling proftpd in systemd...
Failed to execute operation: No such file or directory
ProFTPd has been successfully removed

However it is still installed:
yum list installed | grep proftpd
proftpd.x86_64 1.3.5-1 installed
proftpd-standalone.x86_64 1.3.5-1 installed

Does this mean it was installed outside DA?

Doing yum remove proftpd fails partly. proftpd.x86_64 0:1.3.5-1 gets removed, but the removal of proftpd-standalone.x86_64 0:1.3.5-1 fails:

error reading information on service proftpd: No such file or directory
error: %preun(proftpd-standalone-1.3.5-1.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package proftpd-standalone-1.3.5-1.x86_64
error: proftpd-standalone-1.3.5-1.x86_64: erase failed

I'm getting a similar error when I try to remove da_exim (which also appeared to be a bottleneck for the upgrade process.

yum remove da_exim:
error reading information on service exim: No such file or directory
error: %preun(da_exim-4.83-1.x86_64) scriptlet failed, exit status 1
Error in PREUN scriptlet in rpm package da_exim-4.83-1.x86_64

What would this mean? As far as I know both exim and proftpd where installed by DA. How can can I uninstall da_exim and proftpd?

Thanks,
Theo
 
I can assure you that Elevate dont conflict with exim and proftpd (migrated many servers with Elevate script)
Your default DA setup is not configured properly I assume, you must be able to install and remove those services with DA but you cant i see

However did you execute ./build all after upgrade ? did you followed the migration steps mentioned here : https://forum.directadmin.com/threads/how-to-inplace-upgrade-from-centos-7-to-almalinux-8-5.64994/
Good to know it should just work. I'm also pretty sure there's something wrong on my system regarding proftpd and exim, although DA never complains and I always keep everything updated.

It did look at the thread you refer to, thanks! I followed instructions from my provider (in dutch: https://transip.nl/knowledgebase/5284-centos-7-upgraden-naar-almalinux?utm_source=knowledge base). The first part up to the point where you reinstall DA stuff is basically the same.

The leapp upgrade process fails if I don't remove proftpd. Uninstalling proftpd fails partly as I described above, but then the leapp upgrade process finishes, so I can do the reboot to complete the upgrade process. But unfortunately then after a while it chokes on da_exim similarly as it failed initially on proftpd.

From leapp-upgrade.log:
Running scriptlet: da_exim-4.83-1.x86_64 1106/1970
error reading information on service exim: No such file or directory
error: %preun(da_exim-4.83-1.x86_64) scriptlet failed, exit status 1

Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp-upgrade-el7toel8 leapp python2-leapp
Error in PREUN scriptlet in rpm package da_exim

and further down in leapp-upgrade.log:

Failed:
da_exim-4.83-1.x86_64

Command ['systemd-nspawn', '--register=no', '--quiet', <snip>
External command has finished: ['systemd-nspawn', '--regist<snip>
Cannot calculate, check, test, or perform the upgrade transaction.

The update process then enters an emergency shell, so the update process is not completely finished. If I reboot the system I can login, but the repo list then is mixure of old CentOS 7 repos and AlmaLinux 8 repos.

My guess is that for both for proftpd and da_exim I (nor the leapp upgrade process) can't uninstall them because both packages are somehow missing a pre-uninstall script (assuming that's what "preun" refers to). Does that make sense?
 
I managed to uninstall proftpd and da_exim like this:
yum --setopt=tsflags=noscripts remove proftpd
yum --setopt=tsflags=noscripts remove da_exim

Now the leapp preupgrade process and leapp upgrade process ran without fatal errors. And I could succesfully run the build commands as in
https://forum.directadmin.com/threads/how-to-inplace-upgrade-from-centos-7-to-almalinux-8-5.64994/

I still do see some CentOS 7 references in the repolist. Is that to be expected?
# dnf repolist
repo id repo name
appstream AlmaLinux 8 - AppStream
baseos AlmaLinux 8 - BaseOS
centos-sclo-rh CentOS-7 - SCLo rh
centos-sclo-sclo CentOS-7 - SCLo sclo
elevate ELevate
epel Extra Packages for Enterprise Linux 7 - x86_64
extras AlmaLinux 8 - Extras
powertools AlmaLinux 8 - PowerTools
 
I guess the repolist (listed above) I got after upgrading fro CentOS 7 to AlmaLinux 8 is not correct.

When running dnf update I get this:
Last metadata expiration check: 0:14:30 ago on Sat 31 Aug 2024 05:09:37 PM CEST.
Error:
Problem 1: cannot install the best update candidate for package libidn2-2.2.0-1.el8.x86_64
- nothing provides libunistring.so.0()(64bit) needed by libidn2-2.3.7-1.el7.x86_64 from epel
Problem 2: cannot install the best update candidate for package perl-Devel-Size-0.81-2.el8.x86_64
- nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-Devel-Size-0.83-1.el7.x86_64 from epel
Problem 3: cannot install the best update candidate for package perl-Text-Template-1.51-1.el8.noarch
- nothing provides perl(:MODULE_COMPAT_5.16.3) needed by perl-Text-Template-1.59-2.el7.noarch from epel
Problem 4: libzstd-1.4.4-1.el8.i686 from @System does not belong to a distupgrade repository
- cannot install both libzstd-1.5.5-1.el7.x86_64 from epel and libzstd-1.4.4-1.el8.x86_64 from @System
- cannot install both libzstd-1.5.5-1.el7.x86_64 from epel and libzstd-1.4.4-1.el8.x86_64 from baseos
- cannot install the best update candidate for package libzstd-1.4.4-1.el8.i686
- cannot install the best update candidate for package libzstd-1.4.4-1.el8.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
So it is clearly confused by el7 vs el8 stuff. Hm...
 
try
dnf clean all
dnf update --allowerasing

This link can help to remove any centos 7 leftovers:
Thanks. I tried that. With the --allowerasing flag the update command tells me that the command would result in removing systemd.

I took a closer look at the 9 packages the package manager wants to update. All of those are installed and come from the @System repository and have release *.el8. And also for all of these packages it wants to install a later version of the same application from the epel repository going back to el7. So the problem apparently is the presence of the old epel repository.

I did:
dnf config-manager --set-disabled epel

and tried dnf update again:
# dnf update
Last metadata expiration check: 1:50:23 ago on Mon 02 Sep 2024 06:23:13 AM CEST.
Dependencies resolved.
Nothing to do.
Complete!
Yay!

I don't understand why my old repo list partly survived the upgrade. I still see some CentOS stuff in my repo list:

# dnf repolist
repo id repo name
appstream AlmaLinux 8 - AppStream
baseos AlmaLinux 8 - BaseOS
centos-sclo-rh CentOS-7 - SCLo rh
centos-sclo-sclo CentOS-7 - SCLo sclo
elevate ELevate
extras AlmaLinux 8 - Extras
powertools AlmaLinux 8 - PowerTools
Should I also disable centos-sclo-rh and centos-sclo-sclo? ATM nothing is installed from them.
 
Back
Top