LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices

Reply
 
Search this Thread
Old 04-17-2013, 07:45 AM   #1
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Rep: Reputation: Disabled
What might cause this yum error?


We've got a minimal-ish CentOS 6.4 based VM that is having issues running yum. We get the error

CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf

even if all we do is enter "yum" and hit enter. The file yum.conf is present and readable by root. Our CentOS based hypervisor, which is also a pretty minimal OS but not quite as bare as our VM OS, does not have any issues running yum. I've run strace on the two system against yum and everything looks largely the same right up until the end. In the working case I see:

Code:
stat("/etc/yum/yum.conf", 0x7fffa787b150) = -1 ENOENT (No such file or directory)
open("/etc/yum.conf", O_RDONLY)         = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=969, ...}) = 0
read(3, "[main]\ncachedir=/var/cache/yum/$"..., 969) = 969
whereas in the failure case I see:

Code:
stat("/etc/yum/yum.conf", 0x7fff0f280ee0) = -1 ENOENT (No such file or directory)
brk(0x2857000)                          = 0x2857000
gettimeofday({1366150922, 106213}, NULL) = 0
clock_gettime(CLOCK_MONOTONIC, {356667, 770092285}) = 0
gettimeofday({1366150922, 106544}, NULL) = 0
write(2, "CRITICAL:yum.cli:Config Error: E"..., 84CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/yum.conf
So you can see here in the success case it first tries to open /etc/yum/yum.conf, which fails, and then opens /etc/yum.conf, which succeeds, and it proceeds from there to read the file. In the failure case, it tries to open /etc/yum/yum.conf, which fails, and then it follows shortly after with it displaying the error. The failure to open /etc/yum/yum.conf is correct, since in fact the config file is /etc/yum.conf. For some reason though it doesn't try the second location. Even if I copy /etc/yum.conf to /etc/yum/yum.conf, the commands in exactly the same way.

Any one have a clue what yum is complaining about? I did a search and came across some references to this error but nothing seemed to be relevant to my case.
 
Old 04-17-2013, 11:23 AM   #2
jnielsen7
LQ Newbie
 
Registered: Feb 2013
Posts: 23

Rep: Reputation: Disabled
Presuming this is a new VM setup and that yum hasn't worked previously on that machine, I'm going to throw out a wild guess and ask whether selinux is enabled and is in some way interfering (the file:// file access "protocol" makes me curious). You can check by typing "getenforce" and can temporarily disable it with "setenforce 0" if it is enabled.

If selinux has nothing to do with it, could you try to chmod /etc/yum.conf to 777 (only temporarily) and see if it is some really whacky file permission issue?

Permission and access issues aside, I have actually had other issues with yum out-of-the-box in Centos 6.3 being unable to parse its own database and I had to download a fresh RPM of yum from online and had to reinstall it.

My steps for reinstalling yum are basically:
If you skip the removal of the database record step the last step "rpm -iv" will not let you install the binary to override it.

Those are just some initial guesses/suggestions. Hopefully my buckshot will hit something today.

Last edited by jnielsen7; 04-17-2013 at 11:27 AM.
 
Old 04-17-2013, 11:35 AM   #3
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
selinux is disabled on our VMs (and I did check to confirm it), and setting permissions to 777 had no impact. The curious thing is that the strace shows it never even gets to the point where it checks if /etc/yum.conf exists. If fails after checking /etc/yum/yum.conf, an alternate location that's apparently used for yum.conf. If it's not there, it's supposed to check /etc/yum.conf, but it fails before it even makes that check.

I'm assuming that something is missing in our minimal VM config so I'm going to work from that basis. I could try installing the yum rpm, but I need to resolve the issue with yum not working out-of-the-box in the newly created VM.
 
Old 04-17-2013, 11:38 AM   #4
jnielsen7
LQ Newbie
 
Registered: Feb 2013
Posts: 23

Rep: Reputation: Disabled
Quote:
Originally Posted by PeterSteele View Post
selinux is disabled on our VMs (and I did check to confirm it), and setting permissions to 777 had no impact. The curious thing is that the strace shows it never even gets to the point where it checks if /etc/yum.conf exists. If fails after checking /etc/yum/yum.conf, an alternate location that's apparently used for yum.conf. If it's not there, it's supposed to check /etc/yum.conf, but it fails before it even makes that check.

I'm assuming that something is missing in our minimal VM config so I'm going to work from that basis. I could try installing the yum rpm, but I need to resolve the issue with yum not working out-of-the-box in the newly created VM.
This is not really a solution, more of a test, but I wonder what would happen if you created a symlink named /etc/yum/yum.conf pointing to /etc/yum.conf (or create a copy of it there).

But you may be right that it's something in your minimal config.

Last edited by jnielsen7; 04-17-2013 at 11:40 AM.
 
Old 04-17-2013, 11:40 AM   #5
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
I meant to mention that I did in fact copy yum.conf to /etc/yum/yum.conf, but alas no joy...
 
Old 04-17-2013, 11:52 AM   #6
cryptoboats
LQ Newbie
 
Registered: Jul 2010
Location: Virginia
Distribution: Fedora 18, CentOS 6.4
Posts: 2

Rep: Reputation: 0
Are you running 64 bit or 32 bit? I am getting the same error in my 64 bit VM but not my 32. I am currently comparing settings of the two to see what I can find. I will let you know if I find anything.
 
Old 04-17-2013, 01:13 PM   #7
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
I am using 64 bit VMs. I don't think it is related to this since we have other VMs with different package sets and these run without problems.
 
Old 04-17-2013, 01:15 PM   #8
John VV
Guru
 
Registered: Aug 2005
Posts: 13,285

Rep: Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775
how are you connection to the internet ?
What is the VM ?
and what version is it ?
assuming that this ( in both cases) that windows7 is running the current version of whatever this VM is )

are you both using
fiber
cable
dsl
dial up
wireless

also SELinux will NOT repeat NOT cause a yum issue
as long as you did in fact install the current definitions ( or only have what is on the current CentOS 5.9 dvd if this was never updated )


if you are behind a router ( the vm adds more complexity to this) you must configure yum to use the router )
see the red hat documentation
-- centos uses the red hat docs --
https://access.redhat.com/site/docum...erprise_Linux/
see the man page for yum.conf
Code:
man yum.conf

Last edited by John VV; 04-17-2013 at 01:27 PM.
 
Old 04-17-2013, 01:54 PM   #9
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
As I indicated in my first post, my VM is CentOS 6.4 and my hypervisor is also CentOS 6.4 (using KVM). The type of internet connection being used isn't relevant to this particular issue; yum panics before it even gets that far...
 
Old 04-19-2013, 11:45 AM   #10
jnielsen7
LQ Newbie
 
Registered: Feb 2013
Posts: 23

Rep: Reputation: Disabled
Did you ever figure out what was causing that issue?
 
Old 04-19-2013, 12:46 PM   #11
PeterSteele
Member
 
Registered: Jun 2012
Posts: 218

Original Poster
Rep: Reputation: Disabled
Not exactly. I've been working on our VM management framework and in the latest VMs we're deploying the issue with yum has disappeared. I didn't remove any specific packages, although some of the kickstart logic has been changed. Nothing that would explain why yum is now working though. So, I suspect the root cause for this issue may never be determined.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] YUM Error - "CRITICAL:yum.cli:Config Error" vikas027 Linux - Server 4 05-03-2012 09:17 AM
CRITICAL:yum.cli Config Error yum.conf in RHEL 6.0 chunrima Linux - Software 2 12-09-2010 07:19 PM
Yum not working at all due to /usr/bin/yum syntax error aheusdens Linux - General 1 04-09-2010 05:15 PM
yum config error parsing file failed - yum won't run emuub Linux - Software 9 11-04-2008 06:48 AM
Yum on FC6. 'yum update' error. mufy Fedora 8 06-14-2007 03:03 AM


All times are GMT -5. The time now is 03:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration