+ Post New Thread
Results 1 to 15 of 15
Internet Related/Filtering/Firewall Thread, Squid/Dansguardian - pages not loading correctly? in Technical; Got a bizarre problem as of this morning whereby no page will load correctly 90% of the time (if you ...
  1. #1
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36

    Squid/Dansguardian - pages not loading correctly?

    Got a bizarre problem as of this morning whereby no page will load correctly 90% of the time (if you constantly refresh, it may load it fine); the extent of this is practically no formatting, most images do not load and on Yahoo's home page, the result is shown below (as an example).

    Have rebooted the server and read something about sometimes the cache needing to be cleared, but I can't find where this is on our server (not in /var/lib).. this may not even be the issue though.

    Any ideas?

    squid_dg_issue.png

  2. #2
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    795
    Thank Post
    81
    Thanked 130 Times in 113 Posts
    Blog Entries
    8
    Rep Power
    31
    Check the cache log first for errors. If you're out of space it'll tell you. Default location is:

    Code:
    /var/log/squid3/cache.log

  3. #3
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    Thanks for the reply, but unfortunately the cache log file does not show anything before today and even then the messages I am not sure about.

    I have attached a screenshot of it below.. if it makes any sense!

    squid_cachelog_061212.png

  4. #4

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Have you ruled out issues with your internet connectivity?

  5. #5
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    Quote Originally Posted by Geoff View Post
    Have you ruled out issues with your internet connectivity?
    Internet is fine when not going via the squid/dg.. it'd be a bit embarrasing to have not checked that before making the post Staff don't go via this filtering box and have no issues whatsoever; when we flicked students over to the backup filtering (NED box), they then have fine internet too.

  6. #6

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    I take it squid is running transparently from the NetFilter errors? What happens if you directly proxy rather than run as an intercept?

  7. #7
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    Student proxy settings are configured to the squid/dg explicitly although I can't recall if the box initially was set up in this way or transparently (even though regardless of this, it had worked fine for the last ~6 weeks since I finally got it working in mid October).

    I also read if set up transparently it's very hard to then change it to explicit or vice-versa, if configured undesirably initially..

  8. #8

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    It depends if you use different ports for transparent vs non-transparent (which you should, otherwise you get those netfilter errors).

  9. #9
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    But it's been set up the same way for a while now and not had anything like this issue. Plus I still can't find how to clear the cache(!)

  10. #10

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    Something along the lines of:

    Code:
    service squid stop
    rm -fr /var/lib/squid/cache/*
    squid -r
    service squid start
    Basic idea is to stop squid, delete the entire cache, tell squid to recreate it's cache then start squid up again.

  11. #11
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    Quote Originally Posted by Geoff View Post
    Something along the lines of:

    Code:
    service squid stop
    rm -fr /var/lib/squid/cache/*
    squid -r
    service squid start
    Basic idea is to stop squid, delete the entire cache, tell squid to recreate it's cache then start squid up again.
    I know you have prob just copied that from google, but I noted on the opening post there is no such dir in the /var/lib area which is strange I thought.

  12. #12

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    That's the 'default' location for squids cache. If it's been put somewhere else by your distros install then you will have to look at the squid config to find out where. Check what the 'cache_dir' parameter says in 'squid.conf'

    squid : cache_dir configuration directive

    It also occurs to me there may be an underlying hardware issue causing all of this. Are your hard drives ok?
    Last edited by Geoff; 6th December 2012 at 11:23 AM.

  13. #13
    dgsmith's Avatar
    Join Date
    Nov 2007
    Location
    Merseyside, England
    Posts
    1,104
    Thank Post
    118
    Thanked 90 Times in 78 Posts
    Rep Power
    36
    cache_dir is commented out (unconfigured).. not sure if this can cause issues or not? Would it suggest there is no cache to clear then?

    I never thought about the HDD, but funny how it started "all of a sudden" rather than a gradual process. I wouldn't even know what process to use on linux anyway to test for HDD health.

  14. #14

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,803
    Thank Post
    110
    Thanked 583 Times in 504 Posts
    Blog Entries
    1
    Rep Power
    224
    If the cache_dir is commented out then it's not using the disk for caching. If you want to check if your disks are ok the best thing to use is to install (assuming these are IDE/SATA disks?) smartmontools (that's the package name in Debian based distros anyway) and run:

    Code:
    smartctl -a /dev/sda
    Obviously change the device path for your actual disk drive. You get some output along these lines:

    Code:
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-3.2.0-33-generic] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF INFORMATION SECTION ===
    Model Family:     Seagate Barracuda XT
    Device Model:     ST32000641AS
    Serial Number:    9WM4LA84
    LU WWN Device Id: 5 000c50 02e2255f5
    Firmware Version: CC13
    User Capacity:    2,000,398,934,016 bytes [2.00 TB]
    Sector Size:      512 bytes logical/physical
    Device is:        In smartctl database [for details use: -P show]
    ATA Version is:   8
    ATA Standard is:  ATA-8-ACS revision 4
    Local Time is:    Thu Dec  6 12:54:26 2012 GMT
    SMART support is: Available - device has SMART capability.
    SMART support is: Enabled
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    
    General SMART Values:
    Offline data collection status:  (0x82)	Offline data collection activity
    					was completed without error.
    					Auto Offline Data Collection: Enabled.
    Self-test execution status:      (   0)	The previous self-test routine completed
    					without error or no self-test has ever 
    					been run.
    Total time to complete Offline 
    data collection: 		(  609) seconds.
    Offline data collection
    capabilities: 			 (0x7b) SMART execute Offline immediate.
    					Auto Offline data collection on/off support.
    					Suspend Offline collection upon new
    					command.
    					Offline surface scan supported.
    					Self-test supported.
    					Conveyance Self-test supported.
    					Selective Self-test supported.
    SMART capabilities:            (0x0003)	Saves SMART data before entering
    					power-saving mode.
    					Supports SMART auto save timer.
    Error logging capability:        (0x01)	Error logging supported.
    					General Purpose Logging supported.
    Short self-test routine 
    recommended polling time: 	 (   1) minutes.
    Extended self-test routine
    recommended polling time: 	 ( 255) minutes.
    Conveyance self-test routine
    recommended polling time: 	 (   2) minutes.
    
    SMART Attributes Data Structure revision number: 10
    Vendor Specific SMART Attributes with Thresholds:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
      1 Raw_Read_Error_Rate     0x000f   117   099   006    Pre-fail  Always       -       126542344
      3 Spin_Up_Time            0x0003   100   100   000    Pre-fail  Always       -       0
      4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       51
      5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
      7 Seek_Error_Rate         0x000f   076   060   030    Pre-fail  Always       -       47586240
      9 Power_On_Hours          0x0032   089   089   000    Old_age   Always       -       10135
     10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
     12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       31
    183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
    184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
    187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
    188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       13
    189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
    190 Airflow_Temperature_Cel 0x0022   061   047   045    Old_age   Always       -       39 (Min/Max 35/48)
    191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
    192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       23
    193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       53
    194 Temperature_Celsius     0x0022   039   053   000    Old_age   Always       -       39 (0 19 0 0)
    195 Hardware_ECC_Recovered  0x001a   032   015   000    Old_age   Always       -       126542344
    197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
    198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
    199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
    240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       128063039875029
    241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       2275397588
    242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       4182057288
    
    SMART Error Log Version: 1
    No Errors Logged
    
    SMART Self-test log structure revision number 1
    No self-tests have been logged.  [To run self-tests, use: smartctl -t]
    
    
    SMART Selective self-test log data structure revision number 1
     SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
        1        0        0  Not_testing
        2        0        0  Not_testing
        3        0        0  Not_testing
        4        0        0  Not_testing
        5        0        0  Not_testing
    Selective self-test flags (0x0):
      After scanning selected spans, do NOT read-scan remainder of disk.
    If Selective self-test is pending on power-up, resume after 0 minute delay.
    There's also a daemon called 'smartd' you can have running from system startup. It will log to the syslog about bad sectors/etc and also email you if so configured.

  15. #15
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    795
    Thank Post
    81
    Thanked 130 Times in 113 Posts
    Blog Entries
    8
    Rep Power
    31
    Quote Originally Posted by Geoff View Post
    If the cache_dir is commented out then it's not using the disk for caching.
    It depends on the version of Squid he is running. For 3.1 and above this holds true, but for 3.0 and below not defining the disk cache will create it in it's default location. I'm guessing you have Squid running on port 3128 and DG on 8080? What happens if point a client directly to Squid on 3128? Are you getting list updates for DG?

SHARE:
+ Post New Thread

Similar Threads

  1. [CLOSED] Layout Issue: mobile theme not loading correctly
    By glennda in forum EduGeek.net Site Problems
    Replies: 5
    Last Post: 15th November 2011, 07:36 AM
  2. IE - Not loading External Page first time :(
    By Zenden in forum Internet Related/Filtering/Firewall
    Replies: 7
    Last Post: 10th November 2009, 05:56 PM
  3. Moodle - Site Admin Pages not loading
    By barney in forum Virtual Learning Platforms
    Replies: 12
    Last Post: 4th February 2009, 01:42 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •