Erro ao iniciar squid 3.x

1. Erro ao iniciar squid 3.x

alan iancio da silva
alanbraw

(usa Ubuntu)

Enviado em 30/10/2014 - 11:08h

Srs. Bom dia.
Estou montando um servidor cache.
Cenário link adsl 2mb isso mesmo 2 mb infelizmente não temos outra opção de link, Divido a internet com 11 pessoas a ideia não é fazer bloqueios por enquanto rs mas sim aumentar a performance da internet o servidor já esta em produção.

Porem esta gerando erros sempre que inicio o serviço do squid

oot@SRV-CACHE:~# service squid3 restart
Restarting Squid HTTP Proxy 3.x: squid3 Waiting.....................done.
Creating Squid HTTP Proxy 3.x cache structure ... (warning).
2014/10/29 21:41:18| Creating Swap Directories
2014/10/29 21:41:18| /var/cache/squid3 exists
2014/10/29 21:41:18| /var/cache/squid3/00 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/00
2014/10/29 21:41:18| /var/cache/squid3/01 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/01
2014/10/29 21:41:18| /var/cache/squid3/02 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/02
2014/10/29 21:41:18| /var/cache/squid3/03 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/03
2014/10/29 21:41:18| /var/cache/squid3/04 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/04
2014/10/29 21:41:18| /var/cache/squid3/05 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/05
2014/10/29 21:41:18| /var/cache/squid3/06 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/06
2014/10/29 21:41:18| /var/cache/squid3/07 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/07
2014/10/29 21:41:18| /var/cache/squid3/08 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/08
2014/10/29 21:41:18| /var/cache/squid3/09 exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/09
2014/10/29 21:41:18| /var/cache/squid3/0A exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/0A
2014/10/29 21:41:18| /var/cache/squid3/0B exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/0B
2014/10/29 21:41:18| /var/cache/squid3/0C exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/0C
2014/10/29 21:41:18| /var/cache/squid3/0D exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/0D
2014/10/29 21:41:18| /var/cache/squid3/0E exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/0E
2014/10/29 21:41:18| /var/cache/squid3/0F exists
2014/10/29 21:41:18| Making directories in /var/cache/squid3/0F


root@SRV-CACHE:~# squid3 -k parse
2014/10/29 21:39:49| Processing Configuration File: /etc/squid3/squid.conf (depth 0)
2014/10/29 21:39:49| Starting Authentication on port [::]:3128
2014/10/29 21:39:49| Disabling Authentication on port [::]:3128 (interception enabled)
2014/10/29 21:39:49| Disabling IPv6 on port [::]:3128 (interception enabled)
2014/10/29 21:39:49| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2014/10/29 21:39:49| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2014/10/29 21:39:49| WARNING: use of 'ignore-no-cache' in 'refresh_pattern' violates HTTP
2014/10/29 21:39:49| WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP
root@SRV-CACHE:~#

Parece que toda vez que inicio o equid3 ele tenta recriar a estrutura de diretórios será que o valor do cache_dir esta errado?

cache_dir aufs /var/cache/squid3 240000 16 256

Minha configuração.

Hardware modesto apenas para testes.
Intel i3
Memoria 2gb
Hd 320gb
SO. Debian 6
Squid 3.X


#PORTA DO PROXY
http_port 3128 transparent
always_direct allow all

# Nome do servidor - contato
visible_hostname SRV-CACHE
cache_mgr alan.inacio@yahoo.com.br

# CONFIGURACAO DOS LOGS ERROS
access_log /var/log/squid3/access.log
access_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
error_directory /usr/share/squid3/errors/Portuguese
coredump_dir /var/spool/squid

# DIRETORIO DO CACHE LIBERADO 240GB NO HD DE 320GB
cache_dir aufs /var/cache/squid3 240000 16 256

# MEMORIA TOTAL DO SRV 2GB DDR3 1066
cache_mem 1024 MB
memory_pools off

# Requisições de downloads abortadas
maximum_object_size_in_memory 512 KB
maximum_object_size 1024 MB
minimum_object_size 0 KB

memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

# Requisicoes de downloads abortadas
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95%

#LIMPEZA DO CACHE
cache_swap_low 95
cache_swap_high 98
ipcache_size 1024
ipcache_low 98
ipcache_high 95
fqdncache_size 1024

detect_broken_pconn on

# ACL
# acl all src 0.0.0.0/0.0.0.0 #### DESATIVADO ESTA COM ERRO
acl manager proto cache_object
acl localhost src 127.0.0.1/32

acl SSL_ports port 443 563 873 # https, snews
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 973 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # portas altas
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 3389 # acesso remoto windows
acl CONNECT method CONNECT

# PERMICOES DE ACESSO
http_access allow manager localhost
http_access allow manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow all

# DNS GOOGLE
dns_nameservers 8.8.8.8
dns_nameservers 8.8.4.4

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 45 40% 4320

# Atualizacoes do cache
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist html ?
#
refresh_pattern -i \.jpg$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.gif$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.png$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.jpeg$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.bmp$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.tif$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.tiff$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.swf$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.exe$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.php$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.html$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.htm$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.shtml$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.shtm$ 0 20% 1440 reload-into-ims

# Videos
refresh_pattern -i \.(mp3|mp4|m4a|ogg|mov|avi|wmv|flv)$ 10080 90% 999999 ignore-no-cache override-expire ignore-private

# Widows UPDATE
refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf) 4320 80% 43200 reload-into-ims
refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf) 4320 80% 43200 reload-into-ims
refresh_pattern -i update.microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i c2r.microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i download.windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims

# Antivirus
refresh_pattern guru.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern bguru.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern af.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern mbam-cdn.malwarebytes.org/.*\.(exe) 4320 100% 43200 reload-into-ims
refresh_pattern data-cdn.mbamupdates.com/.*\.(ref) 4320 100% 43200 reload-into-ims
refresh_pattern avast.com/.*\.(vpu|cab|stamp|exe) 10080 100% 43200 reload-into-ims
refresh_pattern personal.avira-update.com/.*\.(cab|exe|dll|msi|gz) 10080 100% 43200 reload-into-ims

Montei o script acima com base em pesquisa em alguns sites e gostaria de sugestões para melhorar o meu a minha conf pois estou aprendendo ainda e acho que esse é uma boa oportunidade para me desenvolver.



  


2. Re: Erro ao iniciar squid 3.x

3. Re: Erro ao iniciar squid 3.x

alan iancio da silva
alanbraw

(usa Ubuntu)

Enviado em 30/10/2014 - 14:13h




Legal a dica vou fazer algumas alterações

no cache_dir

Obrigado.


4. Re: Erro ao iniciar squid 3.x

alan iancio da silva
alanbraw

(usa Ubuntu)

Enviado em 31/10/2014 - 09:05h


Bom Dia!

Apaguei a pasta do var/cache/squid3/ apague os arquivos cache.log access.log iniciei o serviço mas mesmo assim ele continua tentando recriar as pastas
Mudei a estrutura dos diretório conforme abaixo sem novidade mesmo problema
Engraçado parece não esta impactando em nada por o cache esta sendo feito perfeitamente conforme log abaixo será que pode ser a ordem das regras no squid.conf?

cache_dir aufs /var/cache/squid3/1/ 50000 16 256
cache_dir aufs /var/cache/squid3/2/ 50000 16 256
cache_dir aufs /var/cache/squid3/3/ 50000 16 256
cache_dir aufs /var/cache/squid3/4/ 50000 16 256

Restarting Squid HTTP Proxy 3.x: squid3 Waiting.....................done.
Creating Squid HTTP Proxy 3.x cache structure ... (warning).
2014/10/31 08:55:40| Creating Swap Directories
2014/10/31 08:55:40| /var/cache/squid3/1/ exists
2014/10/31 08:55:40| /var/cache/squid3/1//00 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//00
2014/10/31 08:55:40| /var/cache/squid3/1//01 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//01
2014/10/31 08:55:40| /var/cache/squid3/1//02 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//02
2014/10/31 08:55:40| /var/cache/squid3/1//03 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//03
2014/10/31 08:55:40| /var/cache/squid3/1//04 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//04
2014/10/31 08:55:40| /var/cache/squid3/1//05 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//05
2014/10/31 08:55:40| /var/cache/squid3/1//06 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//06
2014/10/31 08:55:40| /var/cache/squid3/1//07 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//07
2014/10/31 08:55:40| /var/cache/squid3/1//08 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//08
2014/10/31 08:55:40| /var/cache/squid3/1//09 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//09
2014/10/31 08:55:40| /var/cache/squid3/1//0A exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//0A
2014/10/31 08:55:40| /var/cache/squid3/1//0B exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//0B
2014/10/31 08:55:40| /var/cache/squid3/1//0C exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//0C
2014/10/31 08:55:40| /var/cache/squid3/1//0D exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//0D
2014/10/31 08:55:40| /var/cache/squid3/1//0E exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//0E
2014/10/31 08:55:40| /var/cache/squid3/1//0F exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/1//0F
2014/10/31 08:55:40| /var/cache/squid3/2/ exists
2014/10/31 08:55:40| /var/cache/squid3/2//00 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//00
2014/10/31 08:55:40| /var/cache/squid3/2//01 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//01
2014/10/31 08:55:40| /var/cache/squid3/2//02 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//02
2014/10/31 08:55:40| /var/cache/squid3/2//03 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//03
2014/10/31 08:55:40| /var/cache/squid3/2//04 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//04
2014/10/31 08:55:40| /var/cache/squid3/2//05 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//05
2014/10/31 08:55:40| /var/cache/squid3/2//06 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//06
2014/10/31 08:55:40| /var/cache/squid3/2//07 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//07
2014/10/31 08:55:40| /var/cache/squid3/2//08 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//08
2014/10/31 08:55:40| /var/cache/squid3/2//09 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//09
2014/10/31 08:55:40| /var/cache/squid3/2//0A exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//0A
2014/10/31 08:55:40| /var/cache/squid3/2//0B exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//0B
2014/10/31 08:55:40| /var/cache/squid3/2//0C exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//0C
2014/10/31 08:55:40| /var/cache/squid3/2//0D exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//0D
2014/10/31 08:55:40| /var/cache/squid3/2//0E exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//0E
2014/10/31 08:55:40| /var/cache/squid3/2//0F exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/2//0F
2014/10/31 08:55:40| /var/cache/squid3/3/ exists
2014/10/31 08:55:40| /var/cache/squid3/3//00 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//00
2014/10/31 08:55:40| /var/cache/squid3/3//01 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//01
2014/10/31 08:55:40| /var/cache/squid3/3//02 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//02
2014/10/31 08:55:40| /var/cache/squid3/3//03 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//03
2014/10/31 08:55:40| /var/cache/squid3/3//04 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//04
2014/10/31 08:55:40| /var/cache/squid3/3//05 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//05
2014/10/31 08:55:40| /var/cache/squid3/3//06 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//06
2014/10/31 08:55:40| /var/cache/squid3/3//07 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//07
2014/10/31 08:55:40| /var/cache/squid3/3//08 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//08
2014/10/31 08:55:40| /var/cache/squid3/3//09 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//09
2014/10/31 08:55:40| /var/cache/squid3/3//0A exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//0A
2014/10/31 08:55:40| /var/cache/squid3/3//0B exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//0B
2014/10/31 08:55:40| /var/cache/squid3/3//0C exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//0C
2014/10/31 08:55:40| /var/cache/squid3/3//0D exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//0D
2014/10/31 08:55:40| /var/cache/squid3/3//0E exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//0E
2014/10/31 08:55:40| /var/cache/squid3/3//0F exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/3//0F
2014/10/31 08:55:40| /var/cache/squid3/4/ exists
2014/10/31 08:55:40| /var/cache/squid3/4//00 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//00
2014/10/31 08:55:40| /var/cache/squid3/4//01 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//01
2014/10/31 08:55:40| /var/cache/squid3/4//02 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//02
2014/10/31 08:55:40| /var/cache/squid3/4//03 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//03
2014/10/31 08:55:40| /var/cache/squid3/4//04 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//04
2014/10/31 08:55:40| /var/cache/squid3/4//05 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//05
2014/10/31 08:55:40| /var/cache/squid3/4//06 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//06
2014/10/31 08:55:40| /var/cache/squid3/4//07 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//07
2014/10/31 08:55:40| /var/cache/squid3/4//08 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//08
2014/10/31 08:55:40| /var/cache/squid3/4//09 exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//09
2014/10/31 08:55:40| /var/cache/squid3/4//0A exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//0A
2014/10/31 08:55:40| /var/cache/squid3/4//0B exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//0B
2014/10/31 08:55:40| /var/cache/squid3/4//0C exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//0C
2014/10/31 08:55:40| /var/cache/squid3/4//0D exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//0D
2014/10/31 08:55:40| /var/cache/squid3/4//0E exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//0E
2014/10/31 08:55:40| /var/cache/squid3/4//0F exists
2014/10/31 08:55:40| Making directories in /var/cache/squid3/4//0F



root@SRV-CACHE:~# squid3 -k parse
2014/10/31 08:44:16| Processing Configuration File: /etc/squid3/squid.conf (depth 0)
2014/10/31 08:44:16| Starting Authentication on port [::]:3128
2014/10/31 08:44:16| Disabling Authentication on port [::]:3128 (interception enabled)
2014/10/31 08:44:16| Disabling IPv6 on port [::]:3128 (interception enabled)
2014/10/31 08:44:16| WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP
2014/10/31 08:44:16| WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP
2014/10/31 08:44:16| WARNING: use of 'ignore-no-cache' in 'refresh_pattern' violates HTTP
2014/10/31 08:44:16| WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP
root@SRV-CACHE:~#

LOGS
414727059.684 38 192.168.2.122 TCP_HIT/200 1897 GET http://s.ytimg.com/yts/jsbin/www-scheduler-vflV8nwAd/www-scheduler.js - NONE/- text/javascript
1414727059.707 61 192.168.2.122 TCP_HIT/200 21636 GET http://s.ytimg.com/yts/cssbin/www-player-webp-vflfSAPut.css - NONE/- text/css
1414727059.709 64 192.168.2.122 TCP_HIT/200 30872 GET http://s.ytimg.com/yts/cssbin/www-core-webp-vfl7XKw68.css - NONE/- text/css
1414727059.848 16 192.168.2.122 TCP_HIT/200 11075 GET http://s.ytimg.com/yts/jsbin/spf-vflxLbQzG/spf.js - NONE/- text/javascript
1414727059.869 36 192.168.2.122 TCP_HIT/200 26921 GET http://s.ytimg.com/yts/jsbin/www-en_US-vflSU60OC/base.js - NONE/- text/javascript
1414727059.875 228 192.168.2.122 TCP_HIT/200 318381 GET http://s.ytimg.com/yts/jsbin/html5player-pt_BR-vflfLX_3x/html5player.js - NONE/- text/javascript
1414727059.876 823 192.168.2.122 TCP_MISS/200 34601 GET http://www.youtube.com/watch? - DIRECT/173.194.118.73 text/html
1414727060.174 28 192.168.2.122 TCP_HIT/200 30200 GET http://s.ytimg.com/yts/imgbin/player-common-vflDtscSi.webp - NONE/- image/webp





5. Re: Erro ao iniciar squid 3.x

Perfil removido
removido

(usa Nenhuma)

Enviado em 31/10/2014 - 18:07h

Não está criando? Provavelmente é falta de permissão no "/var/cache/squid3".

# chown proxy.proxy /var/cache/squid3; chmod 775 /var/cache/squid3 


Se não existe estrutura ela será criada normalmente. No próximo stop/start não criará novamente.

* Em relação aos AVISOS:

http://www.vivaolinux.com.br/topico/Squid-Iptables/ERRO-use-of-reloadintoims-in-refresh_pattern-viol...


6. Re: Erro ao iniciar squid 3.x

alan iancio da silva
alanbraw

(usa Ubuntu)

Enviado em 01/11/2014 - 08:49h

Bom dia.

Dei as permissões conforme orientado porém sem sucesso ainda continua rentando recriar


7. Re: Erro ao iniciar squid 3.x

Perfil removido
removido

(usa Nenhuma)

Enviado em 01/11/2014 - 19:04h

Testei seu squid.conf com um cache_dir pequeno e está funcional.

cache_dir aufs /var/cache/squid3  5000 16 256 


root@debian:~# lsb_release -a; squid3 -v
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 7.7 (wheezy)
Release: 7.7
Codename: wheezy
Squid Cache: Version 3.1.20
configure options: '--build=i486-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--libexecdir=${prefix}/lib/squid3' '--srcdir=.' '--disable-maintainer-mode' '--disable-dependency-tracking' '--disable-silent-rules' '--datadir=/usr/share/squid3' '--sysconfdir=/etc/squid3' '--mandir=/usr/share/man' '--with-cppunit-basedir=/usr' '--enable-inline' '--enable-async-io=8' '--enable-storeio=ufs,aufs,diskd' '--enable-removal-policies=lru,heap' '--enable-delay-pools' '--enable-cache-digests' '--enable-underscores' '--enable-icap-client' '--enable-follow-x-forwarded-for' '--enable-auth=basic,digest,ntlm,negotiate' '--enable-basic-auth-helpers=LDAP,MSNT,NCSA,PAM,SASL,SMB,YP,DB,POP3,getpwnam,squid_radius_auth,multi-domain-NTLM' '--enable-ntlm-auth-helpers=smb_lm,' '--enable-digest-auth-helpers=ldap,password' '--enable-negotiate-auth-helpers=squid_kerb_auth' '--enable-external-acl-helpers=ip_user,ldap_group,session,unix_group,wbinfo_group' '--enable-arp-acl' '--enable-esi' '--enable-zph-qos' '--enable-wccpv2' '--disable-translation' '--with-logdir=/var/log/squid3' '--with-pidfile=/var/run/squid3.pid' '--with-filedescriptors=65536' '--with-large-files' '--with-default-user=proxy' '--enable-linux-netfilter' 'build_alias=i486-linux-gnu' 'CFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall' 'LDFLAGS=-fPIE -pie -Wl,-z,relro -Wl,-z,now' 'CPPFLAGS=-D_FORTIFY_SOURCE=2' 'CXXFLAGS=-g -O2 -fPIE -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security' --with-squid=/build/squid3-tMZN4r/squid3-3.1.20



root@debian:~# ls -l /var/cache/squid3/
total 124
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 00
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 01
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 02
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 03
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 04
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 05
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 06
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 07
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 08
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 09
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 0A
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 0B
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 0C
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 0D
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 0E
drwxr-x--- 258 proxy proxy 4096 Out 31 18:08 0F
-rw-r----- 1 proxy proxy 60320 Out 31 23:37 swap.state


TCP_HIT => Uma cópia válida do objeto pedido estava no cache.
TCP_MISS => O objeto pedido não estava no cache.
TCP_REFRESH_HIT => O objeto estava no cache, mas era antigo. Foi verificado e ele não foi alterado.
TCP_REF_FAIL_HIT => O objeto estava no cache, mas era antigo. O pedido para validar o objeto falhou, o objeto antigo foi retornado.'
TCP_REFRESH_MISS = O objeto estava no cache, mas era antigo. Foi descarregado a cópia nova do objeto.'
TCP_CLIENT_REFRESH => Foi uma requisisão com a meta tag "no-cache".'
TCP_CLIENT_REFRESH_MISS => O browser forçou o proxy a verificar para ver se há uma versão nova do objeto.'
TCP_IMS_HIT => O browser ja tinha uma cópia válida do objeto.'
TCP_IMS_MISS => Foi feita um requisisão para verificar se um objeto antigo tinha uma nova cópia.
TCP_SWAPFAIL => Era para o objeto estar no cache, mas não estava.
TCP_DENIED => A requisição foi negada.


root@debian:~# tail -1000 /var/log/squid3/access.log | grep TCP_HIT
1414805082.849 1 192.168.0.15 TCP_HIT/200 4296 GET http://s2.glbimg.com/E5kBdX807VDsvuxwmAzkQbg7hWk=/filters:quality(10):strip_icc()/s2.glbimg.com/_9xX... - NONE/- image/jpeg
1414805082.849 0 192.168.0.15 TCP_HIT/200 1505 GET http://s2.glbimg.com/h2EE71EUmY80TYJ_BCEuTQvaZI0=/filters:quality(10):strip_icc()/s2.glbimg.com/lOIY... - NONE/- image/jpeg
1414805082.850 0 192.168.0.15 TCP_HIT/200 1373 GET http://s2.glbimg.com/6CZ8ZB3GzPndL9lX9MHTpHwiZL0=/filters:quality(10):strip_icc()/s2.glbimg.com/SYUS... - NONE/- image/jpeg
1414805085.250 1 192.168.0.15 TCP_HIT/200 4823 GET http://s.glbimg.com/bu/rt/js/glb-rt-min.js - NONE/- application/x-javascript
1414805085.339 0 192.168.0.15 TCP_HIT/200 4006 GET http://s01.video.glbimg.com/180x101/3732839.jpg - NONE/- image/jpeg
1414805085.340 0 192.168.0.15 TCP_HIT/200 4303 GET http://s01.video.glbimg.com/180x101/3732807.jpg - NONE/- image/jpeg
1414805087.713 0 192.168.0.15 TCP_HIT/200 3899 GET http://fast.globo.demdex.net/dest3.html? - NONE/- text/html
1414805288.395 1 192.168.0.15 TCP_HIT/200 3900 GET http://fast.globo.demdex.net/dest3.html? - NONE/- text/html
1414805295.183 1 192.168.0.15 TCP_HIT/200 3900 GET http://fast.globo.demdex.net/dest3.html? - NONE/- text/html
1414805300.361 2 192.168.0.15 TCP_HIT/200 3900 GET http://fast.globo.demdex.net/dest3.html? - NONE/- text/html
1414805370.356 1 192.168.0.15 TCP_HIT/200 1505 GET http://s2.glbimg.com/h2EE71EUmY80TYJ_BCEuTQvaZI0=/filters:quality(10):strip_icc()/s2.glbimg.com/lOIY... - NONE/- image/jpeg
1414805370.356 2 192.168.0.15 TCP_HIT/200 4296 GET http://s2.glbimg.com/E5kBdX807VDsvuxwmAzkQbg7hWk=/filters:quality(10):strip_icc()/s2.glbimg.com/_9xX... - NONE/- image/jpeg
1414805370.357 0 192.168.0.15 TCP_HIT/200 1373 GET http://s2.glbimg.com/6CZ8ZB3GzPndL9lX9MHTpHwiZL0=/filters:quality(10):strip_icc()/s2.glbimg.com/SYUS... - NONE/- image/jpeg
1414805371.941 7 192.168.0.15 TCP_HIT/200 4006 GET http://s01.video.glbimg.com/180x101/3732839.jpg - NONE/- image/jpeg
1414805371.942 8 192.168.0.15 TCP_HIT/200 4823 GET http://s.glbimg.com/bu/rt/js/glb-rt-min.js - NONE/- application/x-javascript
1414805371.942 8 192.168.0.15 TCP_HIT/200 4303 GET http://s01.video.glbimg.com/180x101/3732807.jpg - NONE/- image/jpeg
1414805383.843 1 192.168.0.15 TCP_HIT/200 3900 GET http://fast.globo.demdex.net/dest3.html? - NONE/- text/html
1414805389.879 2 192.168.0.15 TCP_HIT/200 3900 GET http://fast.globo.demdex.net/dest3.html? - NONE/- text/html










8. Re: Erro ao iniciar squid 3.x

alan iancio da silva
alanbraw

(usa Ubuntu)

Enviado em 03/11/2014 - 15:52h

Cara já fiz de tudo..

apaguei a pasta squid3 dei permissão 775 comentei todas as linhas e nada..

Segue o meu squid.conf caso alguém queira testar.

#PORTA DO PROXY
http_port 3128 transparent

# Nome do servidor - contato
visible_hostname SRV-CACHE
cache_mgr alan.inacio@yahoo.com.br

# CONFIGURACAO DOS LOGS ERROS
access_log /var/log/squid3/access.log
access_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log
error_directory /usr/share/squid3/errors/Portuguese
coredump_dir /var/spool/squid3

# MEMORIA TOTAL DO SRV 2GB DDR3 1066
cache_mem 1032 MB
memory_pools off

# POLITICA DE CACHE EM MEMORIA E HD
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA

# TAMANHO MAXIMO E MINIMO DOS ARQUIVOS EM MEMORIA
maximum_object_size_in_memory 512 KB
maximum_object_size 1024 MB
minimum_object_size 0 KB

# REQUISICOES DOWNLOADS ABORTADOS
quick_abort_min 16 KB
quick_abort_max 16 KB
quick_abort_pct 95%

# LIMPEZA DO CACHE
cache_swap_low 95
cache_swap_high 98
ipcache_size 1024
ipcache_low 98
ipcache_high 95
fqdncache_size 1024
detect_broken_pconn on

# DIRETORIO DO CACHE LIBERADO 200GB NO HD DE 320GB
cache_dir aufs /var/cache/squid3/ 50000 64 256

# ACL
acl all src
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl SSL_ports port 443 563 873
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563 973
acl Safe_ports port 70
acl Safe_ports port 210
acl Safe_ports port 1025-65535
acl Safe_ports port 280
acl Safe_ports port 488
acl Safe_ports port 591
acl Safe_ports port 777
acl Safe_ports port 3389
acl CONNECT method CONNECT

# PERMICOES DE ACESSO
http_access allow manager localhost
http_access allow manager
http_access allow !Safe_ports
http_access allow CONNECT !SSL_ports
http_access allow all

# DNS VIVOSPEEDY
dns_nameservers 200.204.0.10
dns_nameservers 200.204.0.138

# DNS GOOGLE
dns_nameservers 8.8.8.8
dns_nameservers 8.8.4.4

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
half_closed_clients off

# Atualizacoes do cache
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist html ?

# CACHE | FOTOS | VIDEOS | UPDATES | ANTIVIRUS
refresh_pattern -i \.jpg$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.gif$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.png$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.jpeg$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.bmp$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.tif$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.tiff$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.swf$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.exe$ 0 50% 21600 reload-into-ims
refresh_pattern -i \.php$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.html$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.htm$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.shtml$ 0 20% 1440 reload-into-ims
refresh_pattern -i \.shtm$ 0 20% 1440 reload-into-ims

# Videos
refresh_pattern -i \.(mp3|mp4|m4a|ogg|mov|avi|wmv|flv)$ 10080 90% 999999 ignore-no-cache override-expire ignore-private

# Widows UPDATE
refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf) 4320 80% 43200 reload-into-ims
refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|psf) 4320 80% 43200 reload-into-ims
refresh_pattern -i update.microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i windows.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i c2r.microsoft.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims
refresh_pattern -i download.windowsupdate.com/.*\.(cab|exe|ms[i|u|f]|asf|wm[v|a]|dat|zip|dsft) 4320 80% 432000 reload-into-ims

# Antivirus
refresh_pattern guru.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern bguru.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern af.avg.com/.*\.(bin) 4320 100% 43200 reload-into-ims
refresh_pattern mbam-cdn.malwarebytes.org/.*\.(exe) 4320 100% 43200 reload-into-ims
refresh_pattern data-cdn.mbamupdates.com/.*\.(ref) 4320 100% 43200 reload-into-ims
refresh_pattern avast.com/.*\.(vpu|cab|stamp|exe) 10080 100% 43200 reload-into-ims
refresh_pattern personal.avira-update.com/.*\.(cab|exe|dll|msi|gz) 10080 100% 43200 reload-into-ims









Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts