Saturday, December 10, 2011

Error message: apt-mirror is already running

I'm setting up a private mirror of Debian "wheezy" ("testing") and, in a fit of numb-wittedness, I didn't change the location of the /var/spool/apt-mirror directory - so it was in a partition with insufficient free disk space. After a short time of mirroring, the partition filled up and apt-mirror failed with a "disk full" error.

After moving the partial mirror over to a larger partition and doing "ln -si" to create a symbolic link, I tried running the apt-mirror command again. It failed with the following message:
# su - apt-mirror -c apt-mirror
apt-mirror is already running
Now, of course, this was not true; apt-mirror was not running. After some digging, I found the answer over at Ubuntu Forums: http://ubuntuforums.org/showthread.php?p=8701199

Quoting Stephen Lilley's contribution to that thread:
Bug #424462 this bug is already discussed at https://bugs.launchpad.net/ubuntu/+s...or/+bug/424462

it has given the following solution
"the case for this error message is that file:
/var/spool/apt-mirror/var/apt-mirror.lock
was not deleted on apt-mirror exit.
If you delete apt-mirror.lock file, then apt-mirror will run OK"
I note that Bug #424462 referred to the lock file not getting deleted upon the user terminating the mirroring operation with CTRL-C. In the version of apt-mirror I'm using (0.4.8-4), that bug has been corrected. However, the same bug raises its head when the apt-mirror script aborts due to the disk filling up.

1 comment:

  1. Easily Increase Your ClickBank Banner Traffic And Commissions

    Bannerizer made it easy for you to promote ClickBank products using banners, simply go to Bannerizer, and grab the banner codes for your favorite ClickBank products or use the Universal ClickBank Banner Rotator Tool to promote all of the available ClickBank products.

    ReplyDelete