Squid, like everything in life, is great when it works properly. But as we all know, there will always be times when things just fall down in a heap, Squid is no different. Luckily it is normally pretty easy to pick it up, dust it off, and get it serving your Internet requests again.
First and most importantly, the LOG files are there for a reason, to help you figure out what is happening. So don't be scared to check the log files when you are having problems. Squids log files normally reside in    /var/log/squid/

cd /var/log/squid/
tail -f   access.log   or
tail -f   cache.log

will point you in the right direction.


A few common problems are:

1- The Log files have become huge, and Squid cannot read or write to them anymore.This normally happens if there has been virus or worm activity on the LAN, which will fill the logs very quick. Check the size of the logs by going into the log directory and running:

[root@server ~]# cd /var/log/squid/
[root@server squid]# ls -lah
total 5.4M
drwxr-x---   2 squid squid 4.0K Dec  3 04:03 .
drwxr-xr-x  16 root  root  4.0K Dec  3 04:03 ..
-rw-r--r--   1 squid squid 602K Dec  5 16:44 access.log
-rw-r--r--   1 squid squid  14K Dec  5 16:32 cache.log
-rw-r--r--   1 squid squid 658K Dec  5 16:41 store.log


Total of just over 5MB, no problems. It would be a different story if your size reported a couple of GIG, which I have witnessed on more than one occasion.

2- The log files or configuration files have the wrong user or group permissions.
This can be fairly common, if there have been numerous changes being made to the files by admin users. Generally these sort or errors will show themselves in the log files. One can see from the above example that the log files are generally owned by the user squid and belong to the group called squid as well.
If the permissions are wrong, a simple  chown command will set things right.

chown   squid.squid  access.log

3- You have recently tried to edit the squid.conf file, not knowing 100% what you are doing. ;-)
Again, a fairly common problem, but easy enough to fix. To avoid this, remember next time to make a copy of the squid.conf file BEFORE you edit it, that way, if you run into problems, you can just copy the backup and restart Squid, and everything will be back to working order.
If you have been a real n00b, and forgot to make a copy, never fear. Check your cache.log file when you try and start Squid and it will generally tell you where in the squid.conf file you have made a mistake. Then carefully check your spelling and syntax in the squid.conf file, more than likely you have made a typo.


























Copyright, eNet Solutions 2006