Squid3 não encontra o arquivo de LOG

1. Squid3 não encontra o arquivo de LOG

joao
joaolaureano

(usa Outra)

Enviado em 25/08/2015 - 10:43h

Oi,pessoal

Eu usei o SQUID3 e estou só para fazer um servidor de cache
Usei esse link coimo referência : http://www.hardware.com.br/livros/linux-redes/configurando-cache-paginas-arquivos.html
Copiei tudo e tal, mas acontece um erro um pouco estranho

root@debian:/etc/squid3# service squid3 status
● squid3.service - LSB: Squid HTTP Proxy version 3.x
Loaded: loaded (/etc/init.d/squid3)
Active: inactive (dead) since Ter 2015-08-25 07:24:36 BRT; 14min ago
Process: 2428 ExecStop=/etc/init.d/squid3 stop (code=exited, status=0/SUCCESS)
Process: 487 ExecStart=/etc/init.d/squid3 start (code=exited, status=0/SUCCESS)

Ago 25 07:04:12 debian squid[892]: Squid Parent: (squid-1) process 1109 exited with status 1
Ago 25 07:04:15 debian squid[892]: Squid Parent: (squid-1) process 1162 started
Ago 25 07:04:15 debian (squid-1)[1162]: Cannot open '/var/log/squid/access.log' because
the parent directory does not exist.
Please create the directory....
Ago 25 07:04:15 debian squid[892]: Squid Parent: (squid-1) process 1162 exited with status 1
Ago 25 07:04:18 debian squid[892]: Squid Parent: (squid-1) process 1188 started
Ago 25 07:04:18 debian (squid-1)[1188]: Cannot open '/var/log/squid/access.log' because
the parent directory does not exist.
Please create the directory....
Ago 25 07:04:18 debian squid[892]: Squid Parent: (squid-1) process 1188 exited with status 1
Ago 25 07:04:18 debian squid[892]: Squid Parent: (squid-1) process 1188 will not be restarted due to repeated, frequent failures
Ago 25 07:04:18 debian squid[892]: Exiting due to repeated, frequent failures
Ago 25 07:24:36 debian squid3[2428]: Stopping Squid HTTP Proxy 3.x: squid3.
Hint: Some lines were ellipsized, use -l to show in full.

PElo que entendi, ele não consegue ver o access.log,mas eu criei esse arquivo,como pode ver aqui:
root@debian:/etc/squid3# cd "/var/log"
root@debian:/var/log# cd "squid"
root@debian:/var/log/squid# ls
access.log

"OBS: o comando LS devolve todo os arquivos que estão no diretório,o nome deles..."
Alguma sugestão?


  


2. Re: Squid3 não encontra o arquivo de LOG

joao
joaolaureano

(usa Outra)

Enviado em 25/08/2015 - 10:47h

Agora me dá isso:
squid3.service - LSB: Squid HTTP Proxy version 3.x
Loaded: loaded (/etc/init.d/squid3)
Active: active (exited) since Ter 2015-08-25 07:45:55 BRT; 6s ago
Process: 2428 ExecStop=/etc/init.d/squid3 stop (code=exited, status=0/SUCCESS)
Process: 3379 ExecStart=/etc/init.d/squid3 start (code=exited, status=0/SUCCESS)

Ago 25 07:45:55 debian squid3[3382]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3386]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3392]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3398]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3404]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3379]: Starting Squid HTTP Proxy 3.x: squid3/etc/init.d/squid3: 95: cd: can't cd to squid
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| ERROR: '0.0.0.0/0.0.0.0' needs to be replaced by the term 'all'.
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| SECURITY NOTICE: Overriding config setting. Using 'all' instead.
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| WARNING: (B) '::/0' is a subnetwork of (A) '::/0'
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| WARNING: because of this '::/0' is ignored to keep splay tree sear...ictable
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| WARNING: You should probably remove '::/0' from the ACL named 'all'
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| aclParseAclLine: ACL 'manager' already exists with different type.
Ago 25 07:45:55 debian squid3[3379]: FATAL: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3379]: Squid Cache (Version 3.4.8): Terminated abnormally.
Ago 25 07:45:55 debian squid3[3379]: CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys
Ago 25 07:45:55 debian squid3[3379]: Maximum Resident Size: 37984 KB
Ago 25 07:45:55 debian squid3[3379]: Page faults with physical i/o: 0
Ago 25 07:45:55 debian squid3[3379]: failed!
Hint: Some lines were ellipsized, use -l to show in full.



3. Re: Squid3 não encontra o arquivo de LOG

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 25/08/2015 - 13:19h

joaolaureano escreveu:

Agora me dá isso:
squid3.service - LSB: Squid HTTP Proxy version 3.x
Loaded: loaded (/etc/init.d/squid3)
Active: active (exited) since Ter 2015-08-25 07:45:55 BRT; 6s ago
Process: 2428 ExecStop=/etc/init.d/squid3 stop (code=exited, status=0/SUCCESS)
Process: 3379 ExecStart=/etc/init.d/squid3 start (code=exited, status=0/SUCCESS)

Ago 25 07:45:55 debian squid3[3382]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3386]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3392]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3398]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3404]: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3379]: Starting Squid HTTP Proxy 3.x: squid3/etc/init.d/squid3: 95: cd: can't cd to squid
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| ERROR: '0.0.0.0/0.0.0.0' needs to be replaced by the term 'all'.
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| SECURITY NOTICE: Overriding config setting. Using 'all' instead.
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| WARNING: (B) '::/0' is a subnetwork of (A) '::/0'
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| WARNING: because of this '::/0' is ignored to keep splay tree sear...ictable
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| WARNING: You should probably remove '::/0' from the ACL named 'all'
Ago 25 07:45:55 debian squid3[3379]: 2015/08/25 07:45:55| aclParseAclLine: ACL 'manager' already exists with different type.
Ago 25 07:45:55 debian squid3[3379]: FATAL: Bungled /etc/squid3/squid.conf line 15: acl manager proto cache_object
Ago 25 07:45:55 debian squid3[3379]: Squid Cache (Version 3.4.8): Terminated abnormally.
Ago 25 07:45:55 debian squid3[3379]: CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys
Ago 25 07:45:55 debian squid3[3379]: Maximum Resident Size: 37984 KB
Ago 25 07:45:55 debian squid3[3379]: Page faults with physical i/o: 0
Ago 25 07:45:55 debian squid3[3379]: failed!
Hint: Some lines were ellipsized, use -l to show in full.


- Remova a linha [bacl manager proto cache_object][/b]
- Remova a linha q contiver 0.0.0.0/0.0.0.0, pois no squid 3.x a ACL 'all' não precisa ser mais declarada
- Mude o dono e grupo da pasta /var/log/squid (chown -R proxy:proxy /var/log/squid. Obs.: se o usuário proxy não existir, utilize o usuário squid

Rode novamente para v se há mais algum problema.

--
Renato Carneiro Pacheco
Certificado Linux LPIC-1
Especialista em Segurança em Redes de Computadores
Graduado em Redes de Comunicação

http://br.linkedin.com/in/renatocarneirop
http://www.facebook.com/renatocarneirop

"Não acredite no que eu digo, pois é a minha experiência e não a sua. Experimente, indague e busque." - Osho Rajneesh


4. Re: Squid3 não encontra o arquivo de LOG

joao
joaolaureano

(usa Outra)

Enviado em 26/08/2015 - 09:08h


Cannot write log file: /var/log/squid3/cache.log
/var/log/squid3/cache.log: Permission denied
messages will be sent to 'stderr'.
COnsegui isso
Já troquei várias vezes as permissões... Prá quem, afinal, a permissão vai ?


5. Re: Squid3 não encontra o arquivo de LOG

joao
joaolaureano

(usa Outra)

Enviado em 26/08/2015 - 09:09h

Aliás, tinha uma linha acl local host que eu apaguei, e a acl proto object não tinha mais..



6. Re: Squid3 não encontra o arquivo de LOG

joao
joaolaureano

(usa Outra)

Enviado em 26/08/2015 - 09:39h


Consegui resolver.
Dei permissão como usuário/grupo squid/squid pro cache.log e pra pastas squid3
root@debian:/etc/squid3# chown -R squid:squid /var/log/squid3
root@debian:/etc/squid3# chow -R squid:squid /var/log/squid3/cache.log
Parei aqui
2015/08/26 06:38:24 kid1| Creating missing swap directories
2015/08/26 06:38:24 kid1| Making directories in squid/00
2015/08/26 06:38:24 kid1| Making directories in squid/01
2015/08/26 06:38:24 kid1| Making directories in squid/02
2015/08/26 06:38:24 kid1| Making directories in squid/03
2015/08/26 06:38:24 kid1| Making directories in squid/04
2015/08/26 06:38:24 kid1| Making directories in squid/05
2015/08/26 06:38:24 kid1| Making directories in squid/06
2015/08/26 06:38:24 kid1| Making directories in squid/07
2015/08/26 06:38:24 kid1| Making directories in squid/08
2015/08/26 06:38:24 kid1| Making directories in squid/09
2015/08/26 06:38:24 kid1| Making directories in squid/0A
2015/08/26 06:38:24 kid1| Making directories in squid/0B
2015/08/26 06:38:24 kid1| Making directories in squid/0C
2015/08/26 06:38:24 kid1| Making directories in squid/0D
2015/08/26 06:38:24 kid1| Making directories in squid/0E
2015/08/26 06:38:24 kid1| Making directories in squid/0F








Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts