Re: [CentOS] yum hangs and results in problems

2018-05-29 Thread Gary Stainburn


On Friday 25 May 2018 07:57:16 John Hodrien wrote:
> On Thu, 24 May 2018, Gary Stainburn wrote:
> > Questions
> >
> > 1) Any ideas why my yum runs keep hanging, and what I can do to fix it?
>
> 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. 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.
>
> > 2) How do I go about fixing the problems listed above?
>
> 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.
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] yum hangs and results in problems

2018-05-25 Thread John Hodrien

On Thu, 24 May 2018, Gary Stainburn wrote:


Questions

1) Any ideas why my yum runs keep hanging, and what I can do to fix it?


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. 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.


2) How do I go about fixing the problems listed above?


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
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] yum hangs and results in problems

2018-05-25 Thread Gary Stainburn
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?
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos