Previous | Contents | Next

Chapter 8: Troubleshooting

8.1 Problem: non-interactive expiration action reproducibly aborts

A quick investigation of action logs should help identifying the problem. A typical one is a mirror listed somewhere which is not reachable when expiration runs.

Unfortunately there is no simple and safe way to solve this. One method is setting the ExAbortOnProblems configuration variable, but this can destroy the whole cache if a bigger problem with index file occurs and this state remains unnoticed for many days until ExTreshold period (see configuration) is over.

Another way is listing the index files of the faulty mirrors to a special file. It needs to be stored as "ignore_list" in the configuration directory and store one path name per line with paths relative to the cache directory, as seen in the error messages.

8.2 Problem: apt-get freezes when downloading files

Solution: First, check:

If nothing helps then you may have hit a spooky problem which is hard to track down. If you like, help the author on problem identification. To do that, do:

  su -
  # enter root password
  cd /tmp
  apt-get source apt-cacher-ng
  apt-get build-dep apt-cacher-ng
  cd apt-cacher-ng-*
  make acng DEBUG=1
  /etc/init.d/apt-cacher-ng stop
  ./apt-cacher-ng -c /etc/apt-cacher-ng logdir=/tmp foreground=1 debug=6
  # (let apt-get run now, on timeouts just wait >> 20 seconds)
  # stop the daemon with Ctrl-C
  /etc/init.d/apt-cacher-ng start
  # compress /tmp/apt-cacher.err and send it to author
  chown -R apt-cacher-ng:apt-cacher-ng /var/cache/apt-cacher-ng

The value of debug can be varied to have different verbosity (see section 7.5 for more information about Debug levels). 11 is recommended for really weird problems.

8.3 apt-get reports corrupted bzip2 data

Symptoms: apt-get fails to run through "update" no matter what you do. And you may have get a message like this one.

99% [6 Packages bzip2 0] [Waiting for headers] [Waiting for headers]
bzip2: Data integrity error when decompressing.
        Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

Err http://debian.netcologne.de unstable/main Packages              
  Sub-process bzip2 returned an error code (2)

8.4 Problem: APT client receives a "Cache storage error"

Examine the last entries in the apt-cacher.err file in the log directory. Most likely it's caused by wrong permissions of some directory in the cache folder where new files/directories need to be created, or by insufficient disk space.

8.5 Problem: apt-cacher-ng refuses to start with "Address already in use"

Another service is already listening on the port which apt-cacher-ng is configured to use. This might be the apt-cacher daemon which used the same port number by default. To identify the daemon behind that process, use the fuser utility, executing it as root for IPv4 and IPv6 protocol versions. Example:

fuser -4 -v -n tcp 3142
fuser -6 -v -n tcp 3142
                    USER        PID ACCESS COMMAND
3142/tcp:           xwwwfsd   17914 F....  xwwwfsd

(where 3142 is the port number from the apt-cacher-ng configuration file). To resolve the collision, reconfigure the other daemon or apt-cacher-ng to use another free port (and reconfigure the clients to use the new apt-cacher-ng port).


Comments to blade@debian.org
[Eduard Bloch, Tue, 20 Nov 2007 00:03:24 +0100]