Squid não reinicia/para/inicia [RESOLVIDO]

1. Squid não reinicia/para/inicia [RESOLVIDO]

Marco Aurelio
turboforce

(usa Linux Mint)

Enviado em 12/04/2011 - 14:56h

Prezados colaboradores, boa tarde.
Tenho tido problemas na hora reiniciar, parar ou iniciar o squid.

Se utilizo # /etc.init.d/squid restart
retorna:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid restart

Se uso o # service squid restart
Hora retorna:
restart: Job failed to restart
Ou retorna:
restart é serviço desconhecido.

Uso o Ubuntu server 10.10.


  


2. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 12/04/2011 - 15:02h

Vamos depurar o problema?

# squid -NCd1

E veja qual é a msg q ele vai dar... poste aki!


3. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Marco Aurelio
turboforce

(usa Linux Mint)

Enviado em 12/04/2011 - 16:09h

Ele diz que o Squid já está rodando. (already running)


4. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 12/04/2011 - 16:20h

Se tá rodando, tá rodando... faça um teste para saber se o problema é no script ou no squid:

- Mate o processo do squid
# killall -9 squid

- Execute o comando q t passei
- Veja se ele executa com perfeição

Caso ele funcione normalmente, o problema é no script.


5. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Marco Aurelio
turboforce

(usa Linux Mint)

Enviado em 12/04/2011 - 16:48h

Retornou tudo isso e parou de funcionar. Só voltou depois de um # service squid start.

2011/04/12 16:44:46| Starting Squid Cache version 2.7.STABLE7 for i386-debian-linux-gnu...
2011/04/12 16:44:46| Process ID 2388
2011/04/12 16:44:46| With 1024 file descriptors available
2011/04/12 16:44:46| Using epoll for the IO loop
2011/04/12 16:44:46| Performing DNS Tests...
2011/04/12 16:44:46| Successful DNS name lookup tests...
2011/04/12 16:44:46| DNS Socket created at 0.0.0.0, port 45240, FD 6
2011/04/12 16:44:46| Adding nameserver 201.6.2.40 from /etc/resolv.conf
2011/04/12 16:44:46| Adding nameserver 201.6.2.160 from /etc/resolv.conf
2011/04/12 16:44:46| User-Agent logging is disabled.
2011/04/12 16:44:46| Referer logging is disabled.
2011/04/12 16:44:46| logfileOpen: opening log /var/log/squid/access.log
2011/04/12 16:44:46| Unlinkd pipe opened on FD 11
2011/04/12 16:44:46| Swap maxSize 2097152 + 262144 KB, estimated 181484 objects
2011/04/12 16:44:46| Target number of buckets: 9074
2011/04/12 16:44:46| Using 16384 Store buckets
2011/04/12 16:44:46| Max Mem size: 262144 KB
2011/04/12 16:44:46| Max Swap size: 2097152 KB
2011/04/12 16:44:46| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/12 16:44:46| logfileOpen: opening log /var/log/squid/store.log
2011/04/12 16:44:46| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/12 16:44:46| Using Least Load store dir selection
2011/04/12 16:44:46| Current Directory is /home/ubuntu
2011/04/12 16:44:46| Loaded Icons.
2011/04/12 16:44:46| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3129, FD 13.
2011/04/12 16:44:46| Accepting ICP messages at 0.0.0.0, port 3130, FD 14.
2011/04/12 16:44:46| HTCP Disabled.
2011/04/12 16:44:46| WCCP Disabled.
2011/04/12 16:44:46| Ready to serve requests.
2011/04/12 16:44:46| Store rebuilding is 5.6% complete
2011/04/12 16:44:46| Done reading /var/spool/squid swaplog (73124 entries)
2011/04/12 16:44:46| Finished rebuilding storage from disk.
2011/04/12 16:44:46| 72605 Entries scanned
2011/04/12 16:44:46| 0 Invalid entries.
2011/04/12 16:44:46| 0 With invalid flags.
2011/04/12 16:44:46| 72605 Objects loaded.
2011/04/12 16:44:46| 0 Objects expired.
2011/04/12 16:44:46| 517 Objects cancelled.
2011/04/12 16:44:46| 0 Duplicate URLs purged.
2011/04/12 16:44:46| 0 Swapfile clashes avoided.
2011/04/12 16:44:46| Took 0.8 seconds (85675.9 objects/sec).
2011/04/12 16:44:46| Beginning Validation Procedure
2011/04/12 16:44:46| Completed Validation Procedure
2011/04/12 16:44:46| Validated 72088 Entries
2011/04/12 16:44:46| store_swap_size = 1838044k
2011/04/12 16:44:47| storeLateRelease: released 0 objects



6. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 12/04/2011 - 17:07h

Veja q o squid está rodando blzinha. Aperte Ctrl+C para cancelar o squid (e liberar o shell) e ponha o conteúdo do seu script ae:

# cat /etc/init.d/squid


7. Squid ou squid3

Thiago Ramos
trsvirtual

(usa Ubuntu)

Enviado em 12/04/2011 - 17:13h

Amigo vc instalou o squid ou squid3?


8. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Marco Aurelio
turboforce

(usa Linux Mint)

Enviado em 12/04/2011 - 17:15h


#!/bin/sh -e
# upstart-job
#
# Symlink target for initscripts that have been converted to Upstart.

set -e

INITSCRIPT="$(basename "$0")"
JOB="${INITSCRIPT%.sh}"

if [ "$JOB" = "upstart-job" ]; then
if [ -z "$1" ]; then
echo "Usage: upstart-job JOB COMMAND" 1>&2
exit 1
fi

JOB="$1"
INITSCRIPT="$1"
shift
else
if [ -z "$1" ]; then
echo "Usage: $0 COMMAND" 1>&2
exit 1
fi
fi

COMMAND="$1"
shift


if [ -z "$DPKG_MAINTSCRIPT_PACKAGE" ]; then
ECHO=echo
else
ECHO=:
fi

$ECHO "Rather than invoking init scripts through /etc/init.d, use the service(8)"
$ECHO "utility, e.g. service $INITSCRIPT $COMMAND"

case $COMMAND in
status)
$ECHO
$ECHO "Since the script you are attempting to invoke has been converted to an"
$ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
$COMMAND "$JOB"
;;
start|stop|restart)
$ECHO
$ECHO "Since the script you are attempting to invoke has been converted to an"
$ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
PID=$(status "$JOB" 2>/dev/null | awk '/[0-9]$/ { print $NF }')
if [ -z "$PID" ] && [ "$COMMAND" = "stop" ]; then
exit 0
elif [ -n "$PID" ] && [ "$COMMAND" = "start" ]; then
exit 0
elif [ -z "$PID" ] && [ "$COMMAND" = "restart" ]; then
start "$JOB"
exit 0
fi
$COMMAND "$JOB"
;;
reload|force-reload)
$ECHO
$ECHO "Since the script you are attempting to invoke has been converted to an"
$ECHO "Upstart job, you may also use the $COMMAND(8) utility, e.g. $COMMAND $JOB"
reload "$JOB"
;;
*)
$ECHO
$ECHO "The script you are attempting to invoke has been converted to an Upstart" 1>&2
$ECHO "job, but $COMMAND is not supported for Upstart jobs." 1>&2
exit 1
esac



9. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 12/04/2011 - 17:28h

Tente executá-lo assim:

# /etc/init.d/squid start

E veja o q ocorre. Fale ae.


10. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Marco Aurelio
turboforce

(usa Linux Mint)

Enviado em 12/04/2011 - 17:31h

Manda usar o # service squid start

# /etc/init.d/squid start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid start


11. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Renato Carneiro Pacheco
renato_pacheco

(usa Debian)

Enviado em 12/04/2011 - 17:38h

Mas o squid é executado?

# ps aux | grep squid


12. Re: Squid não reinicia/para/inicia [RESOLVIDO]

Marco Aurelio
turboforce

(usa Linux Mint)

Enviado em 12/04/2011 - 17:55h


# ps aux | grep squid
root 2513 0.0 0.0 5140 532 ? Ss 16:49 0:00 /usr/sbin/squid
proxy 2515 0.2 2.7 59496 56884 ? S 16:49 0:08 (squid)
root 2975 0.0 0.0 3340 832 pts/0 S+ 17:56 0:00 grep --color=auto squid




01 02



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts