LinuxQuestions.org
Register a domain and help support LQ
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 12-03-2010, 12:14 PM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
Lost connection while yum'ing, can't yum now


I was using yum to update a server, then my putty session to the server dropped.

I reconnected, and now when i try to do a yum list updates, i get the following message:

Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 42 M RSS ( 53 MB VSZ)
Started: Fri Dec 3 12:05:30 2010 - 06:55 ago
State : Sleeping, pid: 21762

Does that mean its still installing the updates i asked it to, and i just need to wait for that to finish so i can see what updates are left? or am i really in a bad spot now?
 
Old 12-03-2010, 12:20 PM   #2
reed9
Member
 
Registered: Jan 2009
Location: Boston, MA
Distribution: Arch Linux
Posts: 653

Rep: Reputation: 142Reputation: 142
No, it just means the lock file didn't get removed properly.

You can check if there's some yum process still going
Code:
ps aux | grep yum
If so kill it.

Code:
kill -9 <pid>
You'll get the pid # from the ps aux command above.

If not remove the yum pid file. As root
Code:
rm -f /var/run/yum.pid
 
1 members found this post helpful.
Old 12-03-2010, 12:21 PM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Thanks. So how do i know its not still installing the updates i told it to before i got disconnected, because its in a "sleeping" state?
 
Old 12-03-2010, 12:21 PM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by rjo98 View Post
State : Sleeping, pid: 21762
Nope. Since it is sleeping it's not instally anything. Indeed it was interrupted (actually it received a SIGHUP signal) from the broken connection. However the lock file of the running application is still there (check /var/run/yum.pid). You can kill the yum process whose PID is 21762 and remove the lock file /var/run/yum.pid if still there.

Edit: ooops... too late, reed9 gave the same answer before I actually did.

Last edited by colucix; 12-03-2010 at 12:23 PM.
 
1 members found this post helpful.
Old 12-03-2010, 12:23 PM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Thanks guys. I killed the process like you both said, there was no pid file in that location, and now i can yum list updates. I was VERY scared for a while, thanks for the help you two.
 
  


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
ssh: connection to host port: 22: Connection timed out lost connection cucolin@ Linux - Server 4 11-22-2011 07:15 AM
Help! Lost yum and package manager zoomzilla Linux - Newbie 1 12-11-2009 11:38 PM
FC8 - YUM gets lost MrUmunhum Fedora 4 11-01-2008 05:57 PM
Lost Yum? Frank Soranno Fedora 1 06-20-2006 06:30 PM
Lost files in yum.repos.d mickeyboa Fedora 1 09-17-2005 10:58 PM


All times are GMT -5. The time now is 01:58 PM.

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