Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th November 2009, 16:32
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default Lost connection to session during apt-get upgrade

I know this has nothing to do with ISPConfig, but the people in here are always so helpful!

I used apt-get upgrade, but in the middle of some configuration options (a new PHP version), the power went of and i lost connection to the server. Therefor i can't do a new upgrade, because it's locked by a lock file, and the old connection still hangs.
It's a debian lenny settup.

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 27th November 2009, 11:29
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

"i can't do a new upgrade, because it's locked by a lock file, and the old connection still hangs"

can you elaborate on that?

- The power went off, so the server rebooted, did it booted the kernel and initrd completely?

- What's the name of the lock file

- What do you mean by "old connection"


If you can't login remote to the server, i'd say, start your car and have a drive to your datacenter ;-)
Reply With Quote
The Following User Says Thank You to Mark_NL For This Useful Post:
Thomas Jensen (27th November 2009)
  #3  
Old 27th November 2009, 11:33
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

The server is remote, so it didn't loose power. Only my local machine turned off.

The problem is that the apt-get install opens a lock file (i can delete this file with no problem), but what about those update which didn't finish? I was in the middle of a configuring process in a PHP update

I'am wondering if it's possible to resume the connection which i lost?

Last edited by Thomas Jensen; 27th November 2009 at 11:35.
Reply With Quote
  #4  
Old 27th November 2009, 11:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Delete the lockfile and run the update again.

Quote:
I'am wondering if it's possible to resume the connection which i lost?
No. You can resume sessions only when you use the screen command to execute all commands in a virtual shell.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
The Following User Says Thank You to till For This Useful Post:
Thomas Jensen (27th November 2009)
  #5  
Old 27th November 2009, 11:39
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

Quote:
Originally Posted by till View Post
Delete the lockfile and run the update again.



No. You can resume sessions only when you use the screen command to execute all commands in a virtual shell.
Okay, thanks a lot, i just assumed that it would cause problems, if the configuring was only "half-done".
Reply With Quote
  #6  
Old 27th November 2009, 11:43
Mark_NL Mark_NL is offline
Senior Member
 
Join Date: Sep 2008
Location: The Netherlands
Posts: 912
Thanks: 12
Thanked 100 Times in 96 Posts
Default

What till said, delete the lock file ..

the lock file is: /var/lib/dpkg/lock

furthermore, the apt process got killed, just issue the apt-get command again and it will continue.

try to get used to typing "screen -R" as soon as you log in, so you'll aslways work in a virtual shell .. if for some reason your computer crashes the apt-get would've kept on running in this case and you can (re)connect to it again ..
Reply With Quote
  #7  
Old 28th November 2009, 16:45
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

Okay, thanks.

Code:
server1:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]? y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up libapache2-mod-php5 (5.2.6.dfsg.1-1+lenny4) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing libapache2-mod-php5 (--configure):
 subprocess post-installation script returned error exit status 1
Setting up php5-cgi (5.2.6.dfsg.1-1+lenny4) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing php5-cgi (--configure):
 subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php5:
 php5 depends on libapache2-mod-php5 (>= 5.2.6.dfsg.1-1+lenny4) | libapache2-mod-php5filter (>= 5.2.6.dfsg.1-1+lenny4) | php5-cgi (>= 5.2.6.dfsg.1-1+lenny4); however:
  Package libapache2-mod-php5 is not configured yet.
  Package libapache2-mod-php5filter is not installed.
  Package php5-cgi is not configured yet.
dpkg: error processing php5 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libapache2-mod-php5
 php5-cgi
 php5
E: Sub-process /usr/bin/dpkg returned an error code (1)
server1:~#
Code:
server1:~# screen -R
-bash: screen: command not found

Last edited by Thomas Jensen; 28th November 2009 at 17:11.
Reply With Quote
  #8  
Old 29th November 2009, 11:02
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Please post the output of:

ps aux | grep apt
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 29th November 2009, 11:57
Thomas Jensen Thomas Jensen is offline
Senior Member
 
Join Date: Apr 2009
Posts: 127
Thanks: 5
Thanked 1 Time in 1 Post
Default

Code:
server1:~# ps aux | grep apt
root       451  0.0  0.0  17172  2440 ?        S    Oct03   2:15 apt-get update
root       454  0.0  0.0  22824  1932 ?        S    Oct03   0:00 /usr/lib/apt/methods/http
root       455  0.0  0.0  22824  1872 ?        S    Oct03   0:00 /usr/lib/apt/methods/http
root       456  0.0  0.0  22828  1884 ?        S    Oct03   0:00 /usr/lib/apt/methods/ftp
root       460  0.0  0.0  16520  1592 ?        S    Oct03   0:00 /usr/lib/apt/methods/gpgv
root       675  0.0  0.0  16504  1612 ?        S    Oct03   0:00 /usr/lib/apt/methods/gzip
root      5538  0.0  0.0   6316   788 pts/2    S+   11:56   0:00 grep apt
root     29254  0.0  0.1  33256 15700 ?        S    Nov26   0:03 apt-get upgrade
root     30750  0.0  0.0  17040  2352 ?        S    Sep06   3:09 apt-get update
root     30753  0.0  0.0  22824  1876 ?        S    Sep06   0:00 /usr/lib/apt/methods/http
root     30754  0.0  0.0  22824  1872 ?        S    Sep06   0:00 /usr/lib/apt/methods/http
root     30755  0.0  0.0  22828  1876 ?        S    Sep06   0:01 /usr/lib/apt/methods/ftp
root     30757  0.0  0.0  16520  1612 ?        S    Sep06   0:00 /usr/lib/apt/methods/gpgv
root     30763  0.0  0.0  16504  1608 ?        S    Sep06   0:00 /usr/lib/apt/methods/gzip
Reply With Quote
  #10  
Old 29th November 2009, 13:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
 
Default

There are still apt processes hanging that need to be killed. Either you run:

killall apt-get

or you reboot the server and then try again.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ispconfig 3 cant receive emails lishaw1968 Installation/Configuration 25 19th August 2013 10:37
squirrelmail and postfix witoszek General 12 1st December 2009 18:07
Attacks on MTA dclardy Installation/Configuration 4 29th September 2009 16:50
Mail not working epicuniversal General 5 13th June 2009 08:24
Question about Virtual Hosting With Proftpd And MySQL (Incl. Quota) On Debian Etch ikkem HOWTO-Related Questions 30 26th February 2008 19:38


All times are GMT +2. The time now is 03:17.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.