Page 1 of 1

yum update problems

Posted: 2009/09/28 22:16:22
by pelos
We're having problems with running 'yum update' on our server. The update for a bunch of packages fails and I am not sure how to fix it. In all cases, the message is

error: unpacking of archive failed on file ...: cpio: open

Does anyone has any idea how to fix this? I was thinking that maybe it will help to boot the computer from a CD and run yum update then, but I am not sure if it will work and I don't want to make the situation any worse than it is. Here's the relevant output from running yum update:
[code]
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
firstboot noarch 1.3.39-7.centos4 base 314 k
Installing for dependencies:
audit x86_64 1.0.16-4.el4 base 217 k
bash x86_64 3.0-21.el4 base 1.7 M
coreutils x86_64 5.2.1-36.el4.centos base 2.9 M
device-mapper x86_64 1.02.28-2.el4 base 640 k
e2fsprogs x86_64 1.35-12.24.el4 base 836 k
glibc x86_64 2.3.4-2.43 base 5.0 M
glibc-common x86_64 2.3.4-2.43 base 16 M
grep x86_64 2.5.1-32.4.el4 base 172 k
hotplug x86_64 3:2004_04_01-7.10 base 63 k
initscripts x86_64 7.93.34-1.centos4 base 1.3 M
iputils x86_64 20020927-22.el4 base 117 k
kudzu x86_64 1.1.95.26-1 base 309 k
libgcc x86_64 3.4.6-11 base 70 k
lvm2 x86_64 2.02.42-5.el4_8.2 update 2.4 M
mkinitrd x86_64 4.2.1.13-4 base 310 k
module-init-tools x86_64 3.1-0.pre5.3.11 base 396 k
pam x86_64 0.77-66.26 base 1.9 M
procps x86_64 3.2.3-8.17 base 203 k
rpm x86_64 4.3.3-32_nonptl base 662 k
sysklogd x86_64 1.4.1-28.el4 base 72 k
udev x86_64 039-10.29.el4 base 959 k
up2date x86_64 4.8.1-33.el4.centos.1 update 1.8 M
util-linux x86_64 2.12a-24.el4 base 1.5 M

Transaction Summary
=============================================================================
Install 23 Package(s)
Update 1 Package(s)
Remove 0 Package(s)
Total download size: 40 M
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libgcc ####################### [ 1/25]
error: unpacking of archive failed on file /usr/sbin/libgcc_post_upgrade;4ac1336a: cpio: open
Installing: glibc-common ####################### [ 2/25]
error: unpacking of archive failed on file /usr/sbin/build-locale-archive;4ac1336a: cpio: open
Installing: glibc [ 3/25]
warning: /etc/ld.so.conf created as /etc/ld.so.conf.rpmnew
Installing: glibc [ 3/25]
warning: /etc/localtime created as /etc/localtime.rpmnew
Installing: glibc ####################### [ 3/25]
error: unpacking of archive failed on file /sbin/ldconfig;4ac1336a: cpio: open
Installing: bash ####################### [ 4/25]
error: unpacking of archive failed on file /bin/bash;4ac1336a: cpio: open
Installing: grep ####################### [ 5/25]
error: unpacking of archive failed on file /bin/egrep;4ac1336a: cpio: symlink
Installing: e2fsprogs ####################### [ 6/25]
error: unpacking of archive failed on file /sbin/badblocks;4ac1336a: cpio: open
Installing: iputils ####################### [ 7/25]
error: unpacking of archive failed on file /bin/ping;4ac1336a: cpio: open
Installing: audit ####################### [ 8/25]
error: unpacking of archive failed on file /sbin/auditctl;4ac1336a: cpio: open
Installing: device-mapper ####################### [ 9/25]
error: unpacking of archive failed on file /sbin/dmeventd;4ac1336a: cpio: open
Installing: lvm2 ####################### [10/25]
error: unpacking of archive failed on file /sbin/lvm;4ac1336a: cpio: symlink
Installing: coreutils ####################### [11/25]
error: unpacking of archive failed on file /bin/basename;4ac1336a: cpio: open
Installing: pam ####################### [12/25]
error: unpacking of archive failed on file /sbin/pam_console_apply;4ac1336a: cpio: open
Installing: module-init-tools ####################### [13/25]
error: unpacking of archive failed on file /sbin/depmod;4ac1336a: cpio: open
Installing: util-linux ####################### [14/25]
error: unpacking of archive failed on file /bin/arch;4ac1336a: cpio: open
Installing: kudzu ####################### [15/25]
error: unpacking of archive failed on file /usr/sbin/fix-mouse-psaux;4ac1336a: cpio: open
Installing: procps ####################### [16/25]
error: unpacking of archive failed on file /bin/ps;4ac1336a: cpio: open
Installing: rpm ####################### [17/25]
error: unpacking of archive failed on file /bin/rpm;4ac1336a: cpio: open
Installing: sysklogd [18/25
]warning: /etc/syslog.conf created as /etc/syslog.conf.rpmnew
Installing: sysklogd ####################### [18/25]
error: unpacking of archive failed on file /sbin/klogd;4ac1336a: cpio: open
Installing: hotplug ################ [19/25]
warning: /etc/hotplug/usb.usermap created as /etc/hotplug/usb.usermap.rpmnew
Installing: hotplug ####################### [19/25]
error: unpacking of archive failed on file /sbin/fxload;4ac1336a: cpio: open
Installing: udev ####################### [20/25]
error: unpacking of archive failed on file /sbin/pam_console_setowner;4ac1336a: cpio: open
Installing: mkinitrd ####################### [21/25]
error: unpacking of archive failed on file /sbin/grubby;4ac1336a: cpio: open
Installing: up2date [22/25]
warning: /etc/sysconfig/rhn/up2date created as /etc/sysconfig/rhn/up2date.rpmnew
Installing: up2date [22/25]
warning: /etc/sysconfig/rhn/up2date-uuid created as /etc/sysconfig/rhn/up2date-uuid.rpmnew
Installing: up2date ####################### [22/25]
error: unpacking of archive failed on file /usr/sbin/rhn_check;4ac1336a: cpio: open
Installing: initscripts ####################### [23/25]
error: unpacking of archive failed on file /bin/doexec;4ac1336a: cpio: open
Updating : firstboot ####################### [24/25]
error: unpacking of archive failed on file /usr/sbin/firstboot;4ac1336a: cpio: open

Dependency Installed: audit.x86_64 0:1.0.16-4.el4 bash.x86_64 0:3.0-21.el4
coreutils.x86_64 0:5.2.1-36.el4.centos device-mapper.x86_64 0:1.02.28-2.el4
e2fsprogs.x86_64 0:1.35-12.24.el4 glibc.x86_64 0:2.3.4-2.43 glibc-common.x86_64
0:2.3.4-2.43 grep.x86_64 0:2.5.1-32.4.el4 hotplug.x86_64 3:2004_04_01-7.10
initscripts.x86_64 0:7.93.34-1.centos4 iputils.x86_64 0:20020927-22.el4
kudzu.x86_64 0:1.1.95.26-1 libgcc.x86_64 0:3.4.6-11 lvm2.x86_64 0:2.02.42-5.el4_8.2
mkinitrd.x86_64 0:4.2.1.13-4 module-init-tools.x86_64 0:3.1-0.pre5.3.11
pam.x86_64 0:0.77-66.26 procps.x86_64 0:3.2.3-8.17 rpm.x86_64 0:4.3.3-32_nonptl
sysklogd.x86_64 0:1.4.1-28.el4 udev.x86_64 0:039-10.29.el4 up2date.x86_64
0:4.8.1-33.el4.centos.1 util-linux.x86_64 0:2.12a-24.el4
Updated: firstboot.noarch 0:1.3.39-7.centos4
Complete!
[/code]

Re: yum update problems

Posted: 2009/09/29 03:11:29
by pschaff
My guess it the the problem was the glibc update. Usually best to "yum update glibc\*" first. Not sure whats best to do now, but I'd probably reboot and force reinstall of the packages that got errors. Or - could just see if things work and ignore it if so. Not very pretty in either case. Perhaps someone else can suggest a better approach.

In any case, doing another "yum update" from CD or otherwise probably won't help as yum seems to think the installs went OK.

Re: yum update problems

Posted: 2009/09/29 18:03:29
by pelos
Thanks for your response.

The problem is that the things are not running smoothly. For example, "top" doesn't work because of some missing version of libncurses library. There is a problem when dealing with big files. All happened quite suddenly, and it seems that it is related to the updates. I thought that the CD would help since it is possible that yum has problems overwriting some files since they are used (otherwise I really don't know what may cause it).

I can try to force the updates, are there any risks associated with that?

Re: yum update problems

Posted: 2009/09/29 18:10:46
by pelos
Also, yum realizes that the installs were not completed, because it proposes the same updates every time I run `yum update`. Anyway, very strange, never got this problem and I've been running CentOS for quite some time.

Re: yum update problems

Posted: 2009/09/29 21:23:36
by pschaff
[quote]
pelos wrote:
...
I can try to force the updates, are there any risks associated with that?[/quote]
Yes, there are risks, but given that your system is already broken I'd say some pretty heavy-handed actions may be necessary to repair it by forcing re-installation of broken packages. The cleanest approach would be to back up user data and do a fresh install. Anyone with a better idea, please chime in.

[quote]
Also, yum realizes that the installs were not completed, because it proposes the same updates every time I run `yum update`.[/quote]
OK - so you may need to clean and regenerate the RPM database.[code]
rm /var/lib/rpm/__db.00*
rpm --rebuilddb
[/code]

[quote]
Anyway, very strange, never got this problem and I've been running CentOS for quite some time.[/quote]
Yes. Hard to isolate the underlying problem at this stage. Hopefully it can be repaired and allow you to move on.

Re: yum update problems

Posted: 2009/10/08 00:37:15
by pelos
Newest update:
I received reports that someone attempted to brute-force attack sshd and there is some evidence of weird network activity. That's why I think that this whole issue may be related to some hackers who attacked the server and possibly compromised some files. I doubt that during the ssh attacks they could get through the firewall of the network where the server is located (all ssh accesses are disallowed from outside the network), but they definitely did some damage to system integrity.

Solution: Fresh install of 5.3 distribution, fortunately I have done a backup of home directories few days ago (although I am not 100% sure if it was not compromised as well).

Re: yum update problems

Posted: 2009/10/08 12:20:03
by pschaff
ssh is not the only way to get in. Are you running rkhunter or chkrootkit? See some other "hacked" threads for details:
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=20673&forum=27&post_id=78517#forumpost78517
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=20165&forum=37&post_id=76190#forumpost76190
https://www.centos.org/modules/newbb/viewtopic.php?topic_id=19941&forum=37&post_id=75285#forumpost75285

Good luck!