Time for action – creating swap directories

This error can be fixed by running the following command:

squid -z

This should be run every time we add new swap directories or modify the existing cache_dir lines in our configuration file. If we run Squid after running the previous command, everything will be fine.

What just happened?

We learned that we should run Squid with the -z option whenever we make changes to the Squid cache directories, so that Squid can create swap directories properly.

Address already in use

Another commonly encountered error is Address already in use, Cannot bind socket, or Cannot open HTTP port, shown as follows:

2010/11/10 01:04:20| commBind: Cannot bind socket FD 16 to [::]:8080: (98) Address already in use FATAL: Cannot open ...

Get Squid Proxy Server 3.1 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.