LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2012, 06:43 AM   #1
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Rep: Reputation: Disabled
cannot check for updates using yum in centos,gives unusual error


Hi again,

2day i tried checking for updates using the yum command in one of the name servers where centos is installed and it gave the following error:

Code:
Cannot open logfile /var/log/yum.log
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    
  File "/usr/share/yum-cli/yummain.py", line 166, in main
    
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1150, in doLock
    
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1203, in _lock
    
OSError: [Errno 30] Read-only file system: '/var/run/yum.pid'
Can anyone please tell me what has happened...i cant see anything in the logs either..

it says can't open var/log/yum.log but when i check it i can read it and even the permissions are correct and i cant evn edit the .bash_profile.

but ya the server is up and running..
 
Old 04-03-2012, 06:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
sounds like something is shafted on your disk, esp as you added you can't edit .bash_profile either. Run "dmesg", and you might see a pile of filesystem errors. Probably best to reboot the system and allow the fsck to scan the filesystem for errors, but obviously that depends *MASSIVELY* on what has actually gone on... It certainly could be very serious...
 
Old 04-03-2012, 07:18 AM   #3
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
ya it gives following message wen i go to try to use service command n all
Code:
-bash: /root/.bash_profile: Input/output error
Can you please tell me how should i go about it?i don't know much abt dmesg and fsck also. I would be really grateful.
 
Old 04-03-2012, 07:29 AM   #4
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
oh ya i ran dmesg command and it showed the following error:

Code:
end_request: I/O error, dev hda, sector 30608136
And i cant even write the error messages to a file which is usually possible with dmesg.

Can you please tell me what kind of error is that n wat should i do?
 
Old 04-03-2012, 07:40 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well, i already have. Something in that filesystem is shafted. How much, I couldn't say. Personally, *I* would reboot and hold my breath.
 
Old 04-03-2012, 08:05 AM   #6
SarahGurung
Member
 
Registered: Jul 2011
Posts: 322

Original Poster
Rep: Reputation: Disabled
Oh wow..

I rebooted the server and now it worked,i even updated it.

ya i could edit my .bash_profile also,paths were missing and i added that by copying it from other user because i still don't know what kind of system path should we b giving. If you could explain me or provide me a link to study that,i would b really glad..

N do u have any idea why did that error happen before?i'm so confused..
 
Old 04-03-2012, 08:14 AM   #7
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
2answr U in Ur language:

ur hard disk is failin.


And now seriously:
Probably your hard disk is having BAD sectors that is why you should check it if you can shutdown the server and run some diagnostics on hard drive.

good luck
 
Old 04-04-2012, 01:44 AM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,252

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
The key msg was
Code:
OSError: [Errno 30] Read-only file system: '/var/run/yum.pid'
so, obviously you can't write to a read-only partition.
You need to fsck that partition, either manually by taking it off-line or by setting it to check in /etc/fstab, especially if this is the root partition; it can't be done online.
http://linux.die.net/man/8/fsck
 
  


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
CentOS Yum Updates adiab Linux - Server 2 11-25-2010 06:45 AM
Transaction Check error installing GNOME via yum on Centos.. scratt Linux - Server 2 10-19-2009 04:28 AM
Yum Updates CentOS and Trixbox metallica1973 Linux - Server 4 02-15-2009 05:25 PM
CentOS 5 / RHEL 5 -- YUM updates through proxy. Rush_898 Red Hat 2 11-29-2008 08:44 PM
yum check-update says no updates when there are updates? MarkEHansen Linux - General 7 12-29-2006 06:16 PM


All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration