|
||||
|
file lock on /etc/yum.conf
Hi,
I've been getting this error in my log for /scripts/upcp cannot get file lock on /etc/yum.conf: Bad file descriptor at /scripts/SafeFile.pm line 88. checkyum version 20.0 I've done a bit of searching around here, and had a look at the files in question, but am not able to understand what it means. Is there anybody here who can shed some light on it? WHM 9.9.9 cPanel 9.9.9-S15** CentOS 3.3 i686 - WHM X v3.1.0 I don't know if it's related or not, that CentOS has not updated to 3.4. From what I understand of reading http://www.centos.org/modules/news/a...php?storyid=34 it should have auto-updated. Following is the contents of my yum.conf Code:
[main] cachedir=/var/cache/yum debuglevel=2 logfile=/var/log/yum.log pkgpolicy=newest distroverpkg=redhat-release installonlypkgs=kernel kernel-smp kernel-hugemem kernel-enterprise kernel-debug kernel-unsupported kernel-smp-unsupported kernel-hugemem-unsupported tolerant=1 exactarch=1 gpgcheck=1 exclude=kernel* httpd* apache* exim* qmail* mod_* php* perl mysql* perl-suidperl perl-CPAN perl-CGI [base] name=CentOS-$releasever - Base baseurl=http://mirror.trouble-free.net/centos/$releasever/os/$basearch/ #released updates [update] name=CentOS-$releasever - Updates baseurl=http://mirror.trouble-free.net/centos/$releasever/updates/$basearch/ #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=http://mirror.trouble-free.net/centos/$releasever/addons/$basearch/ #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=http://mirror.trouble-free.net/centos/$releasever/extras/$basearch/ #packages in testing #[testing] #name=CentOS-$releasever - Testing #baseurl=http://mirror.trouble-free.net/centos/$releasever/testing/$basearch/ [tf] name=$releasever tf updates baseurl=http://mirror.trouble-free.net/tf/$releasever/ TIA for any tips or advice and please excuse my ignorance ![]() Best regards, verdon |
|
||||
|
Two things. Check that there isn't a lock oustanding on the file using:
lsof | grep yum.conf If not, you could try copying /etc/centos-yum.conf to /etc/yum.conf (though there may just be a symlink from yum.conf to that file anyway). If you want to upgrade to v3.4 just follow the instructions on the CentOS website in the release.
__________________
Jonathan Michaelson cPanel Forum Moderator Need your cPanel servers secured and tuned? cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf http://www.configserver.com |
|
||||
|
No reason at all not to go up to 3.4 - works fine. This is the exclude list I currently use in yum:
exclude=php* httpd* perl* mysql* mod_ssl* imap* squirrelmail* spamassassin* caching-nameserver*
__________________
Jonathan Michaelson cPanel Forum Moderator Need your cPanel servers secured and tuned? cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf http://www.configserver.com |
|
||||
|
hmm... looking at your exclude list and the one in mine explains why you had to manually install some perl mods a while ago when you were helping me troubleshoot your exim dictionary attack ACLs, a little while back.
I think I'll tweak my yum.conf and then do a manual update to CentOS 3.4 in the next little while. That might solve the error in /scripts/upcp in the process. Thanks for the advice and bye for now, verdon |
|
||||
|
hmm... I seem to be unable to write to yum.conf
-rw-r--r-- 1 root root 1214 Nov 11 08:42 yum.conf root@host [/etc]# lsof | grep yum.conf root@host [/etc]# root@host [/etc]# cp centos-base-yum.conf yum.conf cp: overwrite `yum.conf', overriding mode 0644? yes cp: cannot create regular file `yum.conf': Permission denied root@host [/etc]# rm yum.conf rm: remove write-protected regular file `yum.conf'? yes rm: cannot remove `yum.conf': Operation not permitted root@ host [/etc]# chmod 777 yum.conf chmod: changing permissions of `yum.conf': Operation not permitted Any suggestions? Thanks |
|
||||
|
Make sure that you haven't inadvertently added any chattr attributes:
What do you get for: lsattr /etc/yum.conf If you get an i in the output: chattr -i /etc/yum.conf If you get an a in the output: chattr -a /etc/yum.conf
__________________
Jonathan Michaelson cPanel Forum Moderator Need your cPanel servers secured and tuned? cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf http://www.configserver.com |
|
||||
|
Thanks. I thought it might be something like that. I understand that chattr locks and protects files, but not knowing much more than that, I didn't do it !
![]() I get both... ----ia------- /etc/yum.conf So, I'll take your advice. Should I chattr this file again when I'm done? I suppose it was done when my NOC did the initial setup on my box, and likely to prevent inadvertent overwriting. It does seem likely though to be the culprit in my initial file lock problems on yum when upcp runs. |
|
||||
|
I would leave it as it is after you remove the chattr attributes (i.e. without them on).
__________________
Jonathan Michaelson cPanel Forum Moderator Need your cPanel servers secured and tuned? cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf http://www.configserver.com |
![]() |
| Thread Tools | |
| Display Modes | |
|
|