Squid3 no Fedora12

1. Squid3 no Fedora12

Wellington Maciel de Souza
cabralwms

(usa Debian)

Enviado em 15/03/2012 - 05:43h

Galera tenho experiência em Linux alguns anos já mais me deparei com um problema que não consigo achar solução.

Tenho um Squid3.1.8 em um Servidor Fedora12 tava tudo normal, até aparecer um erro que não consigo solução se alguem puder me ajudar.
Inicio o squid e tudo funciona depois de algum tempo ele para e dá uma mensagem dizendo que no tem espaço para cache.
O estranho que a partição nao está lotada, já verifiquei HD tem 11G livres, abaixo o erro que aparece no arquivo cache.log

2012/03/12 19:01:06| (28) No space left on device
2012/03/12 19:01:06| DiskThreadsDiskFile::openDone: (28) No space left on device
2012/03/12 19:01:06| /var/spool/squid/00/47/00004726
2012/03/12 19:01:06| storeSwapOutFileClosed: dirno 0, swapfile 00004726, errflag=FFFFFFFF
2012/03/12 19:01:06| (28) No space left on device
2012/03/12 19:01:06| DiskThreadsDiskFile::openDone: (28) No space left on device
2012/03/12 19:01:06| /var/spool/squid/00/47/00004727
2012/03/12 19:01:06| storeSwapOutFileClosed: dirno 0, swapfile 00004727, errflag=FFFFFFFF
2012/03/12 19:01:06| (28) No space left on device
2012/03/12 19:03:09| DiskThreadsDiskFile::openDone: (28) No space left on device
2012/03/12 19:03:09| /var/spool/squid/00/47/00004729
2012/03/12 19:03:09| storeSwapOutFileClosed: dirno 0, swapfile 00004729, errflag=FFFFFFFF
2012/03/12 19:03:09| (28) No space left on device
2012/03/12 19:06:25| DiskThreadsDiskFile::openDone: (28) No space left on device
2012/03/12 19:06:25| /var/spool/squid/00/47/0000472B
2012/03/12 19:06:25| storeSwapOutFileClosed: dirno 0, swapfile 0000472B, errflag=FFFFFFFF
2012/03/12 19:06:25| (28) No space left on device
2012/03/12 19:11:32| Preparing for shutdown after 163903 requests
2012/03/12 19:11:32| Waiting 30 seconds for active connections to finish
2012/03/12 19:11:32| FD 11 Closing HTTP connection
2012/03/12 19:12:03| Shutting down...
2012/03/12 19:12:03| basic/auth_basic.cc(97) done: Basic authentication Shutdown.
2012/03/12 19:12:03| Closing unlinkd pipe on FD 13
2012/03/12 19:12:03| storeDirWriteCleanLogs: Starting...
2012/03/12 19:12:03| Finished. Wrote 17355 entries.
2012/03/12 19:12:03| Took 0.02 seconds (855136.73 entries/sec).
CPU Usage: 199.831 seconds = 112.269 user + 87.562 sys
Maximum Resident Size: 587360 KB
Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
total space in arena: 140588 KB
Ordinary blocks: 139943 KB 2512 blks
Small blocks: 0 KB 1 blks
Holding blocks: 1144 KB 5 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 644 KB
Total in use: 141087 KB 100%
Total free: 644 KB 0%
2012/03/12 19:12:03| Open FD UNSTARTED 8 DNS Socket IPv6
2012/03/12 19:12:03| Open FD READ/WRITE 9 DNS Socket IPv4
2012/03/12 19:12:03| Squid Cache (Version 3.1.8): Exiting normally.

Quando eu apago todas as pastas de /var/spool/squid/ e aplico squid -z, squid -k reconfigure e service squid start volta a funcionar mais depois de um tempo para de novo.
Alguem poderia me ajudar?


  


2. segue meu squid.conf

Wellington Maciel de Souza
cabralwms

(usa Debian)

Enviado em 15/03/2012 - 09:27h

#
# Recommended minimum configuration:
#
#http_port 192.168.0.1:3123 transparent
http_port 192.168.0.1:3123 intercept
hierarchy_stoplist cgi-bin ?
#acl QUERY urlpath_regex cgi-bin \?
#no_cache deny QUERY
#
#Configuracao nova
cache_mem 128 MB # Se seu servidor for dedicado, coloque neste valor a metade de sua memó RAM, do contráo use apenas 25%
#dns_nameservers 192.168.0.1
maximum_object_size_in_memory 512 KB
maximum_object_size 4096 KB
cache_swap_low 90
cache_swap_high 95
cache_dir ufs /var/spool/squid 6000 16 256
#cache_dir ufs /var/spool/squid2 2000 16 256
#cache_dir ufs /var/spool/squid3 2000 16 256
cache_access_log /var/log/squid/access.log squid
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
pid_filename /var/log/squid/squid.pid
#debug_options ALL,1
#
logfile_rotate 2
cache_replacement_policy lru
memory_replacement_policy lru
# We recommend you to use at least the following line.
#
#Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
cache_effective_user squid
cache_effective_group squid
# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid/
#coredump_dir none
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 465 # SMTP
acl Safe_ports port 587 # SMTP
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 10060 # Mysql comunicacao
acl Safe_ports port 10061 # Mysql comunicacao
acl Safe_ports port 3306 # Mysql server
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
acl nivel01 src 192.168.0.4 # Marcelo
acl nivel01 src 192.168.0.24 # Marcelo
acl nivel01 src 192.168.0.49 # Cris
acl nivel01 src 192.168.0.16 # Re
acl nivel01 src 192.168.0.17 # Re android
acl nivel01 src 192.168.0.12 # Ricardo
acl nivel01 src 192.168.0.6 # Nelson

acl nivel02 src 192.168.0.159 # note
acl nivel01 src 192.168.0.5 #Eduardo
acl nivel02 src 192.168.0.41 # Claudio
acl nivel02 src 192.168.0.44 #Ryu
acl nivel02 src 192.168.0.32 #Kleiton Html1
acl nivel02 src 192.168.0.48 #Henrique Html3
acl nivel02 src 192.168.0.47 #Guilherme Html2

acl nivel03 src 192.168.0.40 #Recepcao
acl nivel03 src 192.168.0.240 #Antonio
acl nivel03 src 192.168.0.39 #Mauro
acl nivel03 src 192.168.0.9 #Denise
acl nivel03 src 192.168.0.27 #Kessya
#

#nivel04 todos ips que não detalhados a cima

acl semnet src 192.168.0.30
acl semnet src 192.168.0.29
#acl semnet src 192.168.0.159
# IPs para msn
acl somsn src 192.168.0.5 #
acl somsn src 192.168.0.6 #
acl somsn src 192.168.0.39 #
acl somsn src 192.168.0.40 #
acl somsn src 192.168.0.41 #
acl somsn src 192.168.0.44 #
acl somsn src 192.168.0.32 #
acl somsn src 192.168.0.48 #
acl somsn src 192.168.0.47 #
acl somsn src 192.168.0.27 #
acl somsn src 192.168.0.159 #
#
#acl lista_livre url_regex -i "/etc/squid/livre.dstdomain.acl"

#acl blkdstdomain dstdomain -i "/etc/squid/block.dstdomain.acl"
#acl blkurlregex url_regex "/etc/squid/block.url-regex.acl"

#acl internet_domain dstdomain -i "/etc/squid/internet.domain.acl"
#acl internet_palavras url_regex -i "/etc/squid/internet.palavras.acl"
#
# Livre para almoco menos downloads e proibidos
acl almoco time 12:20-13:00
acl cafe1 time 9:00-9:15
acl cafe2 time 15:30-15:45


# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
#acl livre src "/etc/squid/conf/livre"
acl palavras2 url_regex -i "/etc/squid/conf/palavras2"
acl palavras3 url_regex -i "/etc/squid/conf/palavras3"
acl palavras4 url_regex -i "/etc/squid/conf/palavras4"
acl exceto_palavras url_regex -i "/etc/squid/conf/exceto_palavras"
acl exceto_dominio dstdomain -i "/etc/squid/conf/exceto_dominio"
#acl domains dstdomain -i "/etc/squid/domains"
acl dominio2 dstdomain -i "/etc/squid/conf/dominio2"
acl dominio3 dstdomain -i "/etc/squid/conf/dominio3"
acl down urlpath_regex -i "/etc/squid/conf/down" #extensoes
acl almoco_palavras url_regex -i "/etc/squid/conf/almoco_palavras"
acl msn url_regex -i /gateway/gateway.dll

# # vale para todos independente do IP
http_access allow nivel01
http_access allow exceto_palavras
http_access allow exceto_dominio
http_access deny almoco_palavras
http_access deny msn !somsn
http_access deny semnet
http_access deny palavras2
http_access deny dominio2
http_access allow nivel02 !palavras2 !dominio2
http_access deny palavras3
http_access deny dominio3
http_access allow nivel03 !palavras3 !dominio3 !palavras2 !dominio2

http_access deny palavras4 !nivel01 !nivel02 !nivel03


#http_access deny palavras4 # palavras proibidas, só libera no almoço

http_access deny down
#
#
##http_access deny blkdstdomain
#http_access deny internet_palavras
http_access allow localnet
http_access allow localhost
#http_access allow lista_livre
http_access allow almoco !down !almoco_palavras
http_access allow cafe1 !down !almoco_palavras
http_access allow cafe2 !down !almoco_palavras
# And finally deny all other access to this proxy
http_access deny all







Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts