Network Troublshooting > Linux Proxy Server Support

Squid Cache won't cache

(1/3) > >>

jwaterbury:
I have been having a problem for some time now and have not found a resolution for it anywhere. My squid is working great with content filtering but it will not cache any of the web sites visited. I have checked over and over the config file and all looks good from what I see. I have also designated a user and group in the config file and ensured that the same info was in the directory permissions for the cache folder and the log folder. I have stopped and restarted the cache and no change. I check the swap.state file and even after days have passed it is still empty as well are the folders in the cache folder. Where am I going wrong? Please Help!!!!

Thanks :?

Ricky:
Kindly give me more details.. Give me last 20 lines of your cache.log,
Also look in your cache directory and go little deep to see if all directory are created or not. ie there should be directories inside the dirctories.. Also see if all the directories can be written by squid user ie under the user you are running squid!

or you can delete your cache directories then make a fresh one then give it permission to be written by squid user and then initialize it using -z directive.

jwaterbury:
These are the lines created when squid first starts...

2004/12/20 22:54:37| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2004/12/20 22:54:37| Process ID 28747
2004/12/20 22:54:37| With 1024 file descriptors available
2004/12/20 22:54:37| Performing DNS Tests...
2004/12/20 22:54:37| Starting Squid Cache version 2.5.STABLE6 for i686-pc-linux-gnu...
2004/12/20 22:54:37| Process ID 28749
2004/12/20 22:54:37| With 1024 file descriptors available
2004/12/20 22:54:37| Performing DNS Tests...
2004/12/20 22:54:37| Successful DNS name lookup tests...
2004/12/20 22:54:37| DNS Socket created at 0.0.0.0, port 32810, FD 4
2004/12/20 22:54:37| Adding nameserver 64.69.96.35 from /etc/resolv.conf
2004/12/20 22:54:37| Adding nameserver 205.205.1.5 from /etc/resolv.conf
2004/12/20 22:54:37| Successful DNS name lookup tests...
2004/12/20 22:54:37| DNS Socket created at 0.0.0.0, port 32811, FD 4
2004/12/20 22:54:37| Adding nameserver 64.69.96.35 from /etc/resolv.conf
2004/12/20 22:54:37| Adding nameserver 205.205.1.5 from /etc/resolv.conf
2004/12/20 22:54:37| Unlinkd pipe opened on FD 9
2004/12/20 22:54:37| Swap maxSize 8388608 KB, estimated 645277 objects
2004/12/20 22:54:37| Target number of buckets: 32263
2004/12/20 22:54:37| Using 32768 Store buckets
2004/12/20 22:54:37| Max Mem  size: 16384 KB
2004/12/20 22:54:37| Max Swap size: 8388608 KB
2004/12/20 22:54:37| Rebuilding storage in /usr/local/squid/var/cache (DIRTY)
2004/12/20 22:54:37| Using Least Load store dir selection
2004/12/20 22:54:37| Set Current Directory to /usr/local/squid/var/cache
2004/12/20 22:54:37| Unlinkd pipe opened on FD 9
2004/12/20 22:54:37| Swap maxSize 8388608 KB, estimated 645277 objects
2004/12/20 22:54:37| Target number of buckets: 32263
2004/12/20 22:54:37| Using 32768 Store buckets
2004/12/20 22:54:37| Max Mem  size: 16384 KB
2004/12/20 22:54:37| Max Swap size: 8388608 KB
2004/12/20 22:54:37| Rebuilding storage in /usr/local/squid/var/cache (DIRTY)
2004/12/20 22:54:37| Using Least Load store dir selection
2004/12/20 22:54:37| Set Current Directory to /usr/local/squid/var/cache
2004/12/20 22:54:37| Loaded Icons.
2004/12/20 22:54:37| Accepting HTTP connections at 0.0.0.0, port 3128, FD 10.
2004/12/20 22:54:37| Accepting ICP messages at 0.0.0.0, port 3130, FD 11.
2004/12/20 22:54:37| WCCP Disabled.
2004/12/20 22:54:37| Ready to serve requests.
2004/12/20 22:54:37| Loaded Icons.
2004/12/20 22:54:37| commBind: Cannot bind socket FD 10 to *:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.5.STABLE6): Terminated abnormally.
CPU Usage: 0.530 seconds = 0.500 user + 0.030 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 453
Memory usage for squid via mallinfo():
   total space in arena:    2308 KB
   Ordinary blocks:         2296 KB      3 blks
   Small blocks:               0 KB      1 blks
   Holding blocks:           332 KB      2 blks
   Free Small blocks:          0 KB
   Free Ordinary blocks:      12 KB
   Total in use:            2628 KB 114%
   Total free:                12 KB 1%
2004/12/20 22:54:41| Done scanning /usr/local/squid/var/cache swaplog (0 entries)
2004/12/20 22:54:41| Finished rebuilding storage from disk.
2004/12/20 22:54:41|         0 Entries scanned
2004/12/20 22:54:41|         0 Invalid entries.
2004/12/20 22:54:41|         0 With invalid flags.
2004/12/20 22:54:41|         0 Objects loaded.
2004/12/20 22:54:41|         0 Objects expired.
2004/12/20 22:54:41|         0 Objects cancelled.
2004/12/20 22:54:41|         0 Duplicate URLs purged.
2004/12/20 22:54:41|         0 Swapfile clashes avoided.
2004/12/20 22:54:41|   Took 3.6 seconds (   0.0 objects/sec).
2004/12/20 22:54:41| Beginning Validation Procedure
2004/12/20 22:54:41|   Completed Validation Procedure
2004/12/20 22:54:41|   Validated 0 Entries
2004/12/20 22:54:41|   store_swap_size = 0k
2004/12/20 22:54:41| storeLateRelease: released 0 objects

I had the proxt server going for the the first time correctly on friday. I checked the swap.state file and it began getting larger. I also checked the folder the informatiion should be stored in and sure enough there were files being created. This ended and has not come back since a -k reconfigure I had to do after making a change to the content filter settings. I have checked over and over the access rights to the folders and have not made any changes to the configuration since it was working on friday. I am completely stumped!

Ricky:
Your squid configuration is seems to be right but still it is not starting, your log says that your squid is terminated.
The problem is that the port 3128 which is used by squid is already in use , may be by other application.

So to resolve this problem you have to either free that port by closing that application or make squid to use another port , say port 8000

Ok then to change port you have to do following ie have to edit squid.conf
in squid.conf look for following lines..

--- Code: ---http_port 3128
--- End code ---
and replace those with

--- Code: ---http_port 8000
--- End code ---

After doing that you have to change all reference to port 3128 to port 8000 in browser etc.. I hope you can do that.

jwaterbury:
Thanks I will give that a shot. The funny thing is tht squid is starting just not caching. It is serving all requests for the web sites. When I shutdown squid any workstation that was pointing to it as a proxy server will no longer be able to browse the web. That's what's so confsing. Why would squid start say it terminated but still serve requests? There was only one time like I said before that it worked correctly starting up and caching. Everything looked good.

 :x   :?

Navigation

[0] Message Index

[#] Next page

Go to full version