Jump to content

Recommended Posts

Posted

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

Posted

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

Posted
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.

Posted
I take it squid is running transparently from the NetFilter errors? What happens if you directly proxy rather than run as an intercept?
Posted

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..

Posted
It depends if you use different ports for transparent vs non-transparent (which you should, otherwise you get those netfilter errors).
Posted

Something along the lines of:

 

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.

Posted
Something along the lines of:

 

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.

Posted (edited)

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?

Edited by Geoff
Posted

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.

Posted

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:

 

smartctl -a /dev/sda

 

Obviously change the device path for your actual disk drive. You get some output along these lines:

 

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.

Posted
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?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...