LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Allthough squid has 1 object, it still asks object to http server (https://www.linuxquestions.org/questions/linux-server-73/allthough-squid-has-1-object-it-still-asks-object-to-http-server-590298/)

markraem 10-08-2007 11:40 AM

Allthough squid has 1 object, it still asks object to http server
 
All,

I have 3 linux (RHEL) servers
1. one has curl running on it
2. one is running squid
3. one is running apache (=10.10.10.3)

STEP 1 : On the squid machine I clean WC cache
STEP 2 : at startup of squid (squid -d 9) I see :

Accepting HTTP connections at 0.0.0.0, port 80, FD 11.
2007/10/08 18:03:24| Accepting ICP messages at 0.0.0.0, port 3130, FD 12.
2007/10/08 18:03:24| WCCP Disabled.
2007/10/08 18:03:24| Configuring Parent 10.10.10.3/80/0
2007/10/08 18:03:24| Ready to serve requests.
2007/10/08 18:03:24| Done reading /var/spool/squid swaplog (0 entries)
2007/10/08 18:03:24| Finished rebuilding storage from disk.
2007/10/08 18:03:24| 0 Entries scanned
2007/10/08 18:03:24| 0 Invalid entries.
2007/10/08 18:03:24| 0 With invalid flags.
2007/10/08 18:03:24| 0 Objects loaded.
2007/10/08 18:03:24| 0 Objects expired.
2007/10/08 18:03:24| 0 Objects cancelled.
2007/10/08 18:03:24| 0 Duplicate URLs purged.
2007/10/08 18:03:24| 0 Swapfile clashes avoided.
2007/10/08 18:03:24| Took 0.3 seconds ( 0.0 objects/sec).
2007/10/08 18:03:24| Beginning Validation Procedure
2007/10/08 18:03:24| Completed Validation Procedure
2007/10/08 18:03:24| Validated 0 Entries
2007/10/08 18:03:24| store_swap_size = 0k
2007/10/08 18:03:25| storeLateRelease: released 0 objects

which is as I expect (0 Entires scanned, 0 objects loaded) bcs I have started with a clean WC
STEP 3 : Now on curl machine I type : curl http://omp.wc.be/an.html (about 4 times)
The curl machine gets 4/4 times the webpage.


However, I noticed on the apache server (via tcpdump) that for each request I do on the curl-machine, the servermachine gets the request, meaning that the WC is NOT caching.

STEP 4 : now I stop (squid -k shutdown) the squid and I see :

Preparing for shutdown after 4 requests
2007/10/08 18:04:15| Waiting 30 seconds for active connections to finish
2007/10/08 18:04:15| FD 11 Closing HTTP connection
2007/10/08 18:04:16| Shutting down...
2007/10/08 18:04:16| FD 12 Closing ICP connection
2007/10/08 18:04:16| Closing unlinkd pipe on FD 9
2007/10/08 18:04:16| storeDirWriteCleanLogs: Starting...
2007/10/08 18:04:16| Finished. Wrote 1 entries.
2007/10/08 18:04:16| Took 0.0 seconds (8000.0 entries/sec).
2007/10/08 18:04:16| Squid Cache (Version 2.5.STABLE6): Exiting normally.

STEP 5 : and then I restart it : (squid -d 9)
now I see :
...
2007/10/08 18:04:49| Accepting HTTP connections at 0.0.0.0, port 80, FD 11.
2007/10/08 18:04:49| Accepting ICP messages at 0.0.0.0, port 3130, FD 12.
2007/10/08 18:04:49| WCCP Disabled.
2007/10/08 18:04:49| Configuring Parent 10.10.10.3/80/0
2007/10/08 18:04:49| Ready to serve requests.
2007/10/08 18:04:49| Done reading /var/spool/squid swaplog (1 entries)
2007/10/08 18:04:49| Finished rebuilding storage from disk.
2007/10/08 18:04:49| 1 Entries scanned
2007/10/08 18:04:49| 0 Invalid entries.
2007/10/08 18:04:49| 0 With invalid flags.
2007/10/08 18:04:49| 1 Objects loaded
2007/10/08 18:04:49| 0 Objects expired.
2007/10/08 18:04:49| 0 Objects cancelled.
2007/10/08 18:04:49| 0 Duplicate URLs purged.
2007/10/08 18:04:49| 0 Swapfile clashes avoided.
2007/10/08 18:04:49| Took 0.3 seconds ( 3.8 objects/sec).
2007/10/08 18:04:49| Beginning Validation Procedure
2007/10/08 18:04:49| Completed Validation Procedure
2007/10/08 18:04:49| Validated 1 Entries
2007/10/08 18:04:49| store_swap_size = 4k
2007/10/08 18:04:50| storeLateRelease: released 0 objects


now it says : 1 Objects loaded.


this means that 1 object (=an.html) is in WC, but the squid WC does not function. It still contacts the http server

What can be the reason for this ?

PS : cat /etc/squid/squid.conf | grep -v "#" says :

http_port 80
cache_peer 10.10.10.3 parent 80 0 no-query
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log

acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl Safe_ports port 80
acl SSL_ports port 443 563
acl HTML url_regex .html$ cache allow HTML

http_access allow all
http_reply_access allow all
visible_hostname omp.wc.be
httpd_accel_host 10.10.10.3
httpd_accel_port 80
httpd_accel_single_host on
httpd_accel_with_proxy on
dns_testnames omp.wc.be
coredump_dir /var/spool/squid


thanx in advance.


All times are GMT -5. The time now is 05:12 AM.