標題: squid3.0代理配置故障 [打印本頁] 作者: bigbigsh 時間: 2009-01-05 08:53 標題: squid3.0代理配置故障 [root@hwt ~]# /usr/local/squid/sbin/squid -N -d1
2009/01/06 05:43:44| Warning: empty ACL: acl name url_regex -i
2009/01/06 05:43:44| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2009/01/06 05:43:44| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2009/01/06 05:43:44| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
WARNING: Cannot write log file: none
none: Permission denied
messages will be sent to 'stderr'.
2009/01/06 05:43:44| Squid is already running! Process ID 2690作者: bigbigsh 時間: 2009-01-05 09:05
日志里報錯,不知道什么愿因
Jan 6 05:57:43 hwt squid[20100]: storeLateRelease: released 0 objects
Jan 6 05:57:45 hwt squid: Warning: empty ACL: acl name url_regex -i
Jan 6 05:57:45 hwt squid: WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
Jan 6 05:57:45 hwt squid: WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
Jan 6 05:57:45 hwt squid: WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
Jan 6 05:57:45 hwt squid[20108]: Squid is already running! Process ID 20100
[root@hwt log]#作者: liang3391 時間: 2009-01-05 09:08
你這些報錯前面只是warning
none: Permission denied
messages will be sent to 'stderr'.(很明顯是權限問題導致的 從你提供的報錯信息我不能準確判斷是什么對方權限導致的,貌似是log文件。作者: bigbigsh 時間: 2009-01-05 09:47
[root@hwt logs]# /usr/local/squid/sbin/squid -N -d1
2009/01/06 06:39:23| Warning: empty ACL: acl name url_regex -i
2009/01/06 06:39:23| WARNING: '0.0.0.0/0.0.0.0' is a subnetwork of '0.0.0.0/0.0.0.0'
2009/01/06 06:39:23| WARNING: because of this '0.0.0.0/0.0.0.0' is ignored to keep splay tree searching predictable
2009/01/06 06:39:23| WARNING: You should probably remove '0.0.0.0/0.0.0.0' from the ACL named 'all'
2009/01/06 06:39:23| Starting Squid Cache version 3.0.STABLE1 for x86_64-unknown-linux-gnu...
2009/01/06 06:39:23| Process ID 20138
2009/01/06 06:39:23| With 1024 file descriptors available
2009/01/06 06:39:23| Performing DNS Tests...
2009/01/06 06:39:24| Successful DNS name lookup tests...
2009/01/06 06:39:24| helperOpenServers: Starting 5 'dnsserver' processes
2009/01/06 06:39:24| Unlinkd pipe opened on FD 13
2009/01/06 06:39:24| Store logging disabled
2009/01/06 06:39:24| Swap maxSize 10240000 KB, estimated 787692 objects
2009/01/06 06:39:24| Target number of buckets: 39384
2009/01/06 06:39:24| Using 65536 Store buckets
2009/01/06 06:39:24| Max Mem size: 1048576 KB
2009/01/06 06:39:24| Max Swap size: 10240000 KB
2009/01/06 06:39:24| Version 1 of swap file without LFS support detected...
2009/01/06 06:39:24| Rebuilding storage in /usr/local/squid/cache (DIRTY)
2009/01/06 06:39:24| Version 1 of swap file without LFS support detected...
2009/01/06 06:39:24| Rebuilding storage in /home/cache (DIRTY)
2009/01/06 06:39:24| Using Least Load store dir selection
2009/01/06 06:39:24| Current Directory is /usr/local/squid/var/log作者: bigbigsh 時間: 2009-01-05 09:58
我把我的SQUID.CONF帖出來大家?guī)臀铱纯丛虺鲈谀抢?br />
http_port 3128 transparent
cache_mem 1 GB
maximum_object_size 9000 KB
maximum_object_size_in_memory 6128 KB
dns_nameservers 196.196.0.252
cache_dir ufs /usr/local/squid/cache 5000 32 512
cache_dir ufs /home/cache 5000 32 512
error_directory /usr/local/squid/share/errors/Simplify_Chinese
acl nocache urlpath_regex cookie.*\.php *\.jsp *\.asp *\.pl *\.cgi
no_cache deny nocache
acl audio urlpath_regex -i .torrent$ .avi$ .mp3$ .mp4$
http_access deny audio
acl name url_regex -i
http_access deny name
cache_access_log none
cache_log none
cache_store_log none
acl localhost src 196.196.0.0/24
http_access allow localhost
acl all src 0.0.0.0/0.0.0.0
http_access deny all
acl safe port 80 21 443 3128
http_access allow safe
cache_effective_user squid
cache_effective_group squid
cache_mgr worldrestart@yahoo.com.cn
acl conncount maxconn 5
visible_hostname LinuxProxyServer
icon_directory /usr/local/squid/share/icons
ipcache_size 2024
ipcache_low 90
ipcache_high 95
fqdncache_size 2024作者: liuhanzhao 時間: 2009-01-05 15:11
acl all src 0.0.0.0/0.0.0.0
這個在3.0以上版本是不需要了
默認3.0中就已經(jīng)把all定義了,所以只需要后面使用就行了作者: bigbigsh 時間: 2009-01-05 20:47
謝謝liuhanzhao 兄 的回復. 我現(xiàn)在還有一點點小問題,下面的規(guī)則問題出在那里
[root@hwt ~]# /sbin/iptables -A OUTPUT -d 0/0 -p ALL --dport 53 -j ACCEPT
iptables v1.3.5: Unknown arg `--dport'
Try `iptables -h' or 'iptables --help' for more information.
[root@hwt ~]#作者: bigbigsh 時間: 2009-01-06 12:59
請問大家我這樣參數(shù)合理嗎?
[root@hwt ~]# /usr/local/squid/sbin/squid -N -d1
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 58 unrecognized: 'broken_vary_encoding allow apache'
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 60 unrecognized: 'header_access header allow all'
2009/01/08 06:12:50| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| Squid is already running! Process ID 21532
[root@hwt ~]#
[root@hwt squid]# /usr/local/squid/sbin/squid -N -dl
2009/01/08 12:46:53| parseConfigFile: 'squid.conf' line 47 unrecognized: 'broken_vary_encoding allow apache'
2009/01/08 12:46:53| parseConfigFile: 'squid.conf' line 49 unrecognized: 'header_access header allow all'
2009/01/08 12:46:53| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
2009/01/08 12:46:53| Squid is already running! Process ID 24049
[root@hwt squid]#作者: liuhanzhao 時間: 2009-01-07 15:58
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 58 unrecognized: 'broken_vary_encoding allow apache'
2009/01/08 06:12:50| parseConfigFile: 'squid.conf' line 60 unrecognized: 'header_access header allow all'
這兩個報錯都是squid不識別的配置
broken_vary在3.0中已經(jīng)默認就帶了,所以根本不用寫這條了
后面那個我沒用過
2009/01/08 06:12:50| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP
剩下這些只是警告,不是報錯,就是說用這4個參數(shù)會打破http的規(guī)則,不算報錯作者: bigbigsh 時間: 2009-01-08 11:00
liuhanzhao兄能跟你交個朋友嗎?我的QQ是499387551,那我什么樣才能讓它不warning呢?還有一個問題我如何關掉土豆網(wǎng)上的視頻..我想把網(wǎng)頁上的視頻播放器關了.不讓它顯示出...這樣就能關掉所有的在線視頻了..
2009/01/08 06:12:50| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2009/01/08 06:12:50| WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP作者: bigbigsh 時間: 2009-01-08 15:18
誰幫我看看我這命中是不是有問題
[root@hwt ~]# /usr/local/squid/bin/squidclient -p 3128 -h 196.196.0.8 mgr:info
HTTP/1.0 200 OK
Server: squid/3.0.STABLE1
Mime-Version: 1.0
Date: Fri, 09 Jan 2009 04:11:36 GMT
Content-Type: text/plain
Expires: Fri, 09 Jan 2009 04:11:36 GMT
Last-Modified: Fri, 09 Jan 2009 04:11:36 GMT
X-Cache: MISS from 196.196.0.8
Via: 1.0 196.196.0.8 (squid/3.0.STABLE1)
Proxy-Connection: close
Squid Object Cache: Version 3.0.STABLE1
Start Time: Fri, 09 Jan 2009 02:47:19 GMT
Current Time: Fri, 09 Jan 2009 04:11:36 GMT
Connection information for squid:
Number of clients accessing cache: 37
Number of HTTP requests received: 14124
Number of ICP messages received: 0
Number of ICP messages sent: 0
Number of queued ICP replies: 0
Number of HTCP messages received: 0
Number of HTCP messages sent: 0
Request failure ratio: 0.00
Average HTTP requests per minute since start: 167.6
Average ICP messages per minute since start: 0.0
Select loop called: 1497646 times, 3.376 ms avg
Cache information for squid:
Hits as % of all requests: 5min: 7.4%, 60min: 10.6%
Hits as % of bytes sent: 5min: 6.6%, 60min: 9.1%
Memory hits as % of hit requests: 5min: 6.6%, 60min: 7.6%
Disk hits as % of hit requests: 5min: 14.5%, 60min: 21.3%
Storage Swap size: 244880 KB
Storage Swap capacity: 2.4% used, 97.6% free
Storage Mem size: -23480 KB
Storage Mem capacity: 29.0% used, 71.0% free
Mean Object Size: 15.90 KB
Requests given to unlinkd: 95
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.10857 0.10281
Cache Misses: 0.12783 0.12106
Cache Hits: 0.00000 0.00000
Near Hits: 0.04277 0.05331
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.01609 0.01464
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 5056.657 seconds
CPU Time: 12.215 seconds
CPU Usage: 0.24%
CPU Usage, 5 minute avg: 0.36%
CPU Usage, 60 minute avg: 0.23%
Process Data Segment Size via sbrk(): 15912 KB
Maximum Resident Size: 0 KB
Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
Total space in arena: 16184 KB
Ordinary blocks: 16061 KB 12 blks
Small blocks: 0 KB 0 blks
Holding blocks: 83948 KB 603 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 122 KB
Total in use: 100009 KB 100%
Total free: 122 KB 0%
Total size: 100132 KB
Memory accounted for:
Total accounted: 89385 KB 89%
memPool accounted: 89385 KB 89%
memPool unaccounted: 10746 KB 11%
memPoolAlloc calls: 3728310
memPoolFree calls: 3537558
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 255
Number of file desc currently in use: 201
Files queued for open: 0
Available number of file descriptors: 823
Reserved number of file descriptors: 100
Store Disk files open: 0
Internal Data Structures:
15528 StoreEntries
3767 StoreEntries with MemObjects
3766 Hot Object Cache Items
15402 on-disk objects
[root@hwt ~]#