Yum Hangs And Results In Problems

Home » CentOS » Yum Hangs And Results In Problems
CentOS 2 Comments

My live mail server was due an update so I ran

yum update

All seemed file so I told it to proceed. HOwever it then hung for over 30
minutes.

I stopped the update and tried again. It complained about problems with the update, so I tried

yum –skip-broken -y update

which then hung at a different place. After some Googling I tried

yum-complete-transaction

and

package-cleanup –cleandupes

both of which failed. I then using my “Microsoft” head I thought I’d try rebooting to see if that fixes it. This of course was a big mistake as my server now crashes on bootup.

I have managed to get it back up and running by selecting a version of the kernel that is 3 versions old.

I have now tried

yum history yum history remove 115 (which failed)
package-cleanup –cleandupes (which failed)
yum-complete-transaction (which failed)
yum-complete-transaction –cleanup-only (which worked)

followed by

[root@ollie2 /]# package-cleanup –problems Loaded plugins: fastestmirror, langpacks Package 1:NetworkManager-glib-1.10.2-14.el7_5.x86_64 has installed conflicts NetworkManager-libnm < ('1', '1.10.2', '14.el7_5'): 1:NetworkManager-libnm-1.8.0-11.el7_4.x86_64 Package avahi-glib-0.6.31-19.el7.x86_64 has installed conflicts avahi < ('0', '0.6.31', '19.el7'): avahi-0.6.31-17.el7.x86_64 Package ipa-common-4.5.0-22.el7.CentOS.noarch has installed conflicts freeipa-common: ipa-common-4.5.4-10.el7.CentOS.1.noarch Package ipa-common-4.5.4-10.el7.CentOS.1.noarch has installed conflicts freeipa-common: ipa-common-4.5.0-22.el7.CentOS.noarch Package ipa-common-4.5.4-10.el7.CentOS.1.noarch has installed conflicts freeipa-python < ('0', '4.5.4', None): ipa-python-compat-4.5.0-22.el7.CentOS.noarch Package python2-ipalib-4.5.4-10.el7.CentOS.1.noarch has installed conflicts freeipa-python < ('0', '4.5.4', None): ipa-python-compat-4.5.0-22.el7.CentOS.noarch [root@ollie2 /]# I’m now running yum check which has also taken 30 minutes so far. Questions 1) Any ideas why my yum runs keep hanging, and what I can do to fix it? 2) How do I go about fixing the problems listed above? 3) What do I need to do to get my server back in a safe, consistant state?

2 thoughts on - Yum Hangs And Results In Problems

  • It’s likely it’s hanging in a script, so just trace it all through. yum will start other processes up, and one of those will have hung. It’ll be called
    /tmp/rpm-script.XXXX or similar, I forget.

    Killing that process doesn’t cause the world to end, and you can debug what failed there later by taking a note of the rpm that’s being updated, and looking at the script later.

    Don’t kill yum in the middle of a run if you can possibly avoid it.

    I always favour “package-cleanup –cleandupes –removenewestdupes”

    But right now, the problem is you’re part way between updated and not.

    You can be more brutal than package-cleanup or yum are willing to be.

    You can fix this with yum shell, telling it what you’re going to remove and what you’re going to add to put it back in a consistent state. That’s probably the best way of doing it.

    The more manual way is for each of those listed, use rpm to see what’s really installed. If you’ve got a duplicate, aim to remove the newest package. If it says it’s not possible, look what you need to do to make it consistent, and use –nodeps if necessary. Then do a yum upgrade when you’re done.

    Yours doesn’t look that bad.

    jh

  • Thanks for the advice John, but for some reason, the post took 18 hours to appear on the list, by which time my server was well and truely FUBAR’d.

    There followed a lovely (long) night while I built a brand new mail server –
    thankfully I had a clean CentOS7 box waiting which saved a couple of hours, but it still made for a 20 1/2 hour day by the time I’d finished.

    Much of this time was trying to fix the problem in my other post.