[ASK] squid-2.7.STABLE9 init script

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

[ASK] squid-2.7.STABLE9 init script

Postby bellec » 29 Apr 2013, 02:46

selamat pagi semua :)
bagaimana cara stop squid di proxy selain dengan cara :
sudo /etc/inid.d/squid stop
squid stop
service squid stop
saya sudah coba perintah diatas tetapi tidak bisa
yang keluar seperti ini
[spoiler]root@Proxy:/home/abau# /etc/init.d/squid stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop squid
root@Proxy:/home/abau#[/spoiler]
mohon bantuannya semua !!
salam :ubuntu:
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 29 Apr 2013, 03:46

Tidak masalah dengan /etc/init.d/squid stop maupun dengan service squid stop. Untuk melihat hasilnya, jalankan ps aux | grep squid
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 30 Apr 2013, 09:47

Tidak masalah dengan /etc/init.d/squid stop maupun dengan service squid stop. Untuk melihat hasilnya, jalankan ps aux | grep squid
sudah saya coba mas ini yang keluar
[spoiler]root@Proxy:/home/abau# ps aux|grep squid
root 2369 0.0 0.0 23800 4520 ? Ss Apr28 0:00 squid star
proxy 4128 3.1 2.6 242780 189780 ? Sl Apr29 45:21 (squid) star
proxy 4787 0.5 0.0 21620 3352 ? S 08:14 0:29 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4788 0.0 0.0 21620 3352 ? S 08:14 0:02 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4789 0.0 0.0 21620 3088 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4790 0.0 0.0 21620 3084 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4791 0.0 0.0 21620 3088 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 4812 0.0 0.0 7972 888 pts/0 S+ 09:43 0:00 grep --color=auto squid
root@Proxy:/home/abau# ps aux|grep squid
root 2369 0.0 0.0 23800 4520 ? Ss Apr28 0:00 squid star
proxy 4128 3.1 2.6 242780 189780 ? Sl Apr29 45:21 (squid) star
proxy 4787 0.5 0.0 21620 3352 ? S 08:14 0:29 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4788 0.0 0.0 21620 3352 ? S 08:14 0:02 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4789 0.0 0.0 21620 3088 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4790 0.0 0.0 21620 3084 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4791 0.0 0.0 21620 3088 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 4814 0.0 0.0 7972 884 pts/0 S+ 09:43 0:00 grep --color=auto squid
root@Proxy:/home/abau# /etc/init.d/squid stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop squid
root@Proxy:/home/abau# ps aux|grep squid
root 2369 0.0 0.0 23800 4520 ? Ss Apr28 0:00 squid star
proxy 4128 3.1 2.6 242780 189780 ? Sl Apr29 45:21 (squid) star
proxy 4787 0.5 0.0 21620 3352 ? S 08:14 0:29 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4788 0.0 0.0 21620 3352 ? S 08:14 0:02 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4789 0.0 0.0 21620 3088 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4790 0.0 0.0 21620 3084 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4791 0.0 0.0 21620 3088 ? S 08:14 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 4820 0.0 0.0 7972 888 pts/0 S+ 09:43 0:00 grep --color=auto squid
root@Proxy:/home/abau#[/spoiler]
sepertinya tidak stop mas
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 30 Apr 2013, 10:19

Iya, squid-nya masih hidup. Mungkin, file init tsb belum di set permission-nya. Coba yang ini dulu =

Code: Select all

# chmod 755 /etc/init.d/squid # update-rc.d squid defaults # service squid stop # ps aux | grep squid
Jika masih tetap hidup, anda kopas di sini file init tsb :)
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 30 Apr 2013, 11:01

[spoiler]root@Proxy:/home/abau# chmod 755 /etc/init.d/squid
root@Proxy:/home/abau# update-rc.d squid defaults
update-rc.d: warning: /etc/init.d/squid missing LSB information
update-rc.d: see
Adding system startup for /etc/init.d/squid ...
/etc/rc0.d/K20squid -> ../init.d/squid
/etc/rc1.d/K20squid -> ../init.d/squid
/etc/rc6.d/K20squid -> ../init.d/squid
/etc/rc2.d/S20squid -> ../init.d/squid
/etc/rc3.d/S20squid -> ../init.d/squid
/etc/rc4.d/S20squid -> ../init.d/squid
/etc/rc5.d/S20squid -> ../init.d/squid
root@Proxy:/home/abau# service squid stop
stop: Unknown instance:
root@Proxy:/home/abau# ps aux | grep squid
root 2369 0.0 0.0 23800 4520 ? Ss Apr28 0:00 squid star
proxy 4128 3.1 2.6 242780 189808 ? Sl Apr29 47:02 (squid) star
proxy 4980 0.0 0.0 21620 3088 ? S 10:47 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4981 0.0 0.0 21620 3088 ? S 10:47 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4982 0.0 0.0 21620 3084 ? S 10:47 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4983 0.0 0.0 21620 3084 ? S 10:47 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4984 0.0 0.0 21620 3084 ? S 10:47 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 4994 0.0 0.0 7972 888 pts/0 S+ 10:51 0:00 grep --color=auto squid[/spoiler]
sepertinya juga tidak ada perubahan mas ?
dan warningnya ini sepertinya mas Pragola_Pati
update-rc.d: warning: /etc/init.d/squid missing LSB information

[spoiler]Jika masih tetap hidup, anda kopas di sini file init tsb[/spoiler]
giamana cara ambil file itu mas ?
apakah dengan perintah "nano /etc/init.d.squid" ???
mohon bantuan mas :)
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 30 Apr 2013, 15:17

Ini pakai squid yang mana ?
Missing LSB information karena dalam skrip tsb tdk ada baris2 yang memberi keterangan singkat ttg program ybs. Dalam kasus anda mungkin tdk ada yang seperti ini =

Code: Select all

### BEGIN INIT INFO # Provides: squid # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Should-Start: $named # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Squid HTTP Proxy ### END INIT INFO
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 30 Apr 2013, 18:17

Squid Cache: Version 2.7.STABLE9
ini versi squid mas. :)
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 30 Apr 2013, 18:32

Coba pakai init script squid-2.7.STABLE9 ini =

Code: Select all

#! /bin/sh # # squid Startup script for the SQUID HTTP proxy-cache. # # Version: @(#)squid.rc 2.20 01-Oct-2001 miquels@cistron.nl # ### BEGIN INIT INFO # Provides: squid # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Should-Start: $named # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Squid HTTP Proxy ### END INIT INFO NAME=squid DAEMON=/usr/sbin/squid LIB=/usr/lib/squid PIDFILE=/var/run/$NAME.pid SQUID_ARGS="-D -YC" [ ! -f /etc/default/squid ] || . /etc/default/squid . /lib/lsb/init-functions PATH=/bin:/usr/bin:/sbin:/usr/sbin [ -x $DAEMON ] || exit 0 grepconf () { w=" " # space tab sq=/etc/squid/squid.conf # sed is cool. res=`sed -ne ' s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p; t end; d; :end q' < $sq` [ -n "$res" ] || res=$2 echo "$res" } grepconf2 () { w=" " # space tab sq=/etc/squid/$NAME.conf # sed is cool. res=`sed -ne ' s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p; t end; d; :end q' < $sq` [ -n "$res" ] || res=$2 echo "$res" } # # Try to increase the # of filedescriptors we can open. # maxfds () { [ -n "$SQUID_MAXFD" ] || return [ -f /proc/sys/fs/file-max ] || return 0 global_file_max=`cat /proc/sys/fs/file-max` minimal_file_max=$(($SQUID_MAXFD + 4096)) if [ "$global_file_max" -lt $minimal_file_max ] then echo $minimal_file_max > /proc/sys/fs/file-max fi ulimit -n $SQUID_MAXFD } start () { cdr=`grepconf2 cache_dir /var/spool/$NAME` ctp=`grepconf cache_dir ufs` case "$cdr" in [0-9]*) log_failure_msg "squid: squid.conf contains 2.2.5 syntax - not starting!" log_end_msg 1 exit 1 ;; esac # # Create spool dirs if they don't exist. # if [ -d "$cdr" -a ! -d "$cdr/00" ] || [ "$ctp" = "coss" -a ! -w "$cdr" ] then log_warning_msg "Creating squid cache structure" $DAEMON $SQUID_ARGS -z fi if [ "$CHUID" = "" ]; then CHUID=root fi start-stop-daemon --quiet --start \ --pidfile $PIDFILE \ --chuid $CHUID \ --exec $DAEMON -- $SQUID_ARGS < /dev/null return $? } stop () { PID=`cat $PIDFILE 2>/dev/null` start-stop-daemon --stop --quiet --pidfile $PIDFILE --name squid # # Now we have to wait until squid has _really_ stopped. # sleep 2 if test -n "$PID" && kill -0 $PID 2>/dev/null then log_action_begin_msg "Waiting" cnt=0 while kill -0 $PID 2>/dev/null do cnt=`expr $cnt + 1` if [ $cnt -gt 24 ] then log_action_end_msg 1 return 1 fi sleep 5 log_action_cont_msg "" done log_action_end_msg 0 return 0 else return 0 fi } case "$1" in start) log_daemon_msg "Starting squid-2.7.STABLE9" if start ; then log_end_msg $? else log_end_msg $? fi ;; stop) log_daemon_msg "Stopping squid-2.7.STABLE9" if stop ; then log_end_msg $? else log_end_msg $? fi ;; reload|force-reload) log_action_msg "Reloading squid-2.7.STABLE9 configuration files" $DAEMON -k reconfigure log_action_end_msg 0 ;; restart) log_daemon_msg "Restarting squid-2.7.STABLE9" stop if start ; then log_end_msg $? else log_end_msg $? fi ;; status) status_of_proc -p "$PIDFILE" "$DAEMON" squid && exit 0 || exit $? ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}" exit 3 ;; esac exit 0
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 30 Apr 2013, 20:57

Coba pakai init script squid-2.7.STABLE9 ini =

Code: Select all

#! /bin/sh # # squid Startup script for the SQUID HTTP proxy-cache. # # Version: @(#)squid.rc 2.20 01-Oct-2001 miquels@cistron.nl # ### BEGIN INIT INFO # Provides: squid # Required-Start: $local_fs $network # Required-Stop: $local_fs $network # Should-Start: $named # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Squid HTTP Proxy ### END INIT INFO NAME=squid DAEMON=/usr/sbin/squid LIB=/usr/lib/squid PIDFILE=/var/run/$NAME.pid SQUID_ARGS="-D -YC" [ ! -f /etc/default/squid ] || . /etc/default/squid . /lib/lsb/init-functions PATH=/bin:/usr/bin:/sbin:/usr/sbin [ -x $DAEMON ] || exit 0 grepconf () { w=" " # space tab sq=/etc/squid/squid.conf # sed is cool. res=`sed -ne ' s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p; t end; d; :end q' < $sq` [ -n "$res" ] || res=$2 echo "$res" } grepconf2 () { w=" " # space tab sq=/etc/squid/$NAME.conf # sed is cool. res=`sed -ne ' s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p; t end; d; :end q' < $sq` [ -n "$res" ] || res=$2 echo "$res" } # # Try to increase the # of filedescriptors we can open. # maxfds () { [ -n "$SQUID_MAXFD" ] || return [ -f /proc/sys/fs/file-max ] || return 0 global_file_max=`cat /proc/sys/fs/file-max` minimal_file_max=$(($SQUID_MAXFD + 4096)) if [ "$global_file_max" -lt $minimal_file_max ] then echo $minimal_file_max > /proc/sys/fs/file-max fi ulimit -n $SQUID_MAXFD } start () { cdr=`grepconf2 cache_dir /var/spool/$NAME` ctp=`grepconf cache_dir ufs` case "$cdr" in [0-9]*) log_failure_msg "squid: squid.conf contains 2.2.5 syntax - not starting!" log_end_msg 1 exit 1 ;; esac # # Create spool dirs if they don't exist. # if [ -d "$cdr" -a ! -d "$cdr/00" ] || [ "$ctp" = "coss" -a ! -w "$cdr" ] then log_warning_msg "Creating squid cache structure" $DAEMON $SQUID_ARGS -z fi if [ "$CHUID" = "" ]; then CHUID=root fi start-stop-daemon --quiet --start \ --pidfile $PIDFILE \ --chuid $CHUID \ --exec $DAEMON -- $SQUID_ARGS < /dev/null return $? } stop () { PID=`cat $PIDFILE 2>/dev/null` start-stop-daemon --stop --quiet --pidfile $PIDFILE --name squid # # Now we have to wait until squid has _really_ stopped. # sleep 2 if test -n "$PID" && kill -0 $PID 2>/dev/null then log_action_begin_msg "Waiting" cnt=0 while kill -0 $PID 2>/dev/null do cnt=`expr $cnt + 1` if [ $cnt -gt 24 ] then log_action_end_msg 1 return 1 fi sleep 5 log_action_cont_msg "" done log_action_end_msg 0 return 0 else return 0 fi } case "$1" in start) log_daemon_msg "Starting squid-2.7.STABLE9" if start ; then log_end_msg $? else log_end_msg $? fi ;; stop) log_daemon_msg "Stopping squid-2.7.STABLE9" if stop ; then log_end_msg $? else log_end_msg $? fi ;; reload|force-reload) log_action_msg "Reloading squid-2.7.STABLE9 configuration files" $DAEMON -k reconfigure log_action_end_msg 0 ;; restart) log_daemon_msg "Restarting squid-2.7.STABLE9" stop if start ; then log_end_msg $? else log_end_msg $? fi ;; status) status_of_proc -p "$PIDFILE" "$DAEMON" squid && exit 0 || exit $? ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}" exit 3 ;; esac exit 0
hmm.. saya tidak paham cara melakukannya mas,
init scrip ini posisinya dan cara2 mengubahnya saya krg paham Mas, :) kalau mas berkenan mohon diajarkan langkahnya mas,
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 30 Apr 2013, 22:21

Code: Select all

# cp /etc/init.d/squid /etc/init.d/squid_bak # nano /etc/init.d/squid
Hapus semua isi-nya dan ganti dengan yang di atas :)

#PS
Sebaiknya judul trit anda di-edit menjadi "[ASK]squid-2.7.STABLE9 init script" untuk memudahkan warga lain waktu searching :)
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 30 Apr 2013, 23:48

Ok mas, saya coba dulu, Terimakasih untuk kesabaran Mas memandu kami yang newbi disini.
satu lagi mas perintah mangembalikan backup file seperti diatas apakah betul seprti ini Mas
# cp /etc/init.d/squid_bak /etc/init.d/squid
??
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 30 Apr 2013, 23:54

Ok mas, saya coba dulu, Terimakasih untuk kesabaran Mas memandu kami yang newbi disini.
satu lagi mas perintah mangembalikan backup file seperti diatas apakah betul seprti ini Mas
# cp /etc/init.d/squid_bak /etc/init.d/squid
??
Iya
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 01 May 2013, 00:06

[spoiler]root@Proxy:/home/abau# /etc/init.d/squid stop
* Stopping squid-2.7.STABLE9 [ OK ]
root@Proxy:/home/abau# ps aux|grep squid
root 2369 0.0 0.0 23800 4520 ? Ss Apr28 0:00 squid star
proxy 4128 3.4 2.8 254056 200576 ? Sl Apr29 78:47 (squid) star
proxy 5481 0.0 0.0 21620 3088 ? S Apr30 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 5482 0.0 0.0 21620 3088 ? S Apr30 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 5483 0.0 0.0 21620 3084 ? S Apr30 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 5484 0.0 0.0 21620 3092 ? S Apr30 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 5485 0.0 0.0 21620 3088 ? S Apr30 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 5509 0.0 0.0 7972 884 pts/0 S+ 00:01 0:00 grep --color=auto squid
root@Proxy:/home/abau#[/spoiler]
sudah ok untuk stop squidnya Mas, tapi dilihat dari perintah
# ps aux|grep Squid
masi jalan mas ?
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 01 May 2013, 01:06

Bagian yang saya tandai ini = ANEH. Kok star, harusnya sesuai dengan SQUID_ARGS="-D -YC".

root 2369 0.0 0.0 23800 4520 ? Ss Apr28 0:00 [color:#660000]squid star[/color]
proxy 4128 3.4 2.8 254056 200576 ? Sl Apr29 78:47 [color:#660000](squid) star[/color]

Harusnya seperti di bawah ini =

Code: Select all

root 11477 0.0 0.0 27588 816 ? Ss 00:15 0:00 /usr/sbin/squid -D -YC proxy 11480 0.5 0.9 130440 74552 ? Sl 00:15 0:08 (squid) -D -YC
Coba anda kill semua prosess yang berhubungan dengan squid, lalu jalankan kembali squid. Ikuti step2 di bawah ini =

Code: Select all

# kill -9 2369 # kill -9 4128 # kill -9 5481 # kill -9 5482 # kill -9 5483 # kill -9 5484 # kill -9 5485 # ps aux | grep squid # /etc/init.d/squid start # ps aux | grep squid
Jika "star" yang saya beri tanda merah di atas masih muncul, periksa DAEMON-nya. Apakah benar ada di /usr/sbin/squid
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 02 May 2013, 11:04

maaf baru bisa respon balasan Mas Pragola_Pati, baru pulang kerja :)
sepertinya udah bisa mas
[spoiler]root 888 0.0 0.0 23800 4524 ? Ss 09:23 0:00 /usr/sbin/squid -D -YC
proxy 893 1.7 2.9 261252 210220 ? Sl 09:23 1:40 (squid) -D -YC
proxy 1136 0.0 0.0 20048 3012 ? S 10:53 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 1137 0.0 0.0 20048 3012 ? S 10:53 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 1138 0.0 0.0 20048 3012 ? S 10:53 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 1139 0.0 0.0 20048 3012 ? S 10:53 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 1140 0.0 0.0 20048 3012 ? S 10:53 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 1159 0.0 0.0 7972 888 pts/0 S+ 11:01 0:00 grep --color=auto squid[/spoiler]

apa betul kalau indikasi ini udah stop mas ??

ternyata setelah saya stop juga ndak bisa mas :)
squid ttp jalan
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 02 May 2013, 17:11

Iya, itu squid-nya masih hidup :)

Code: Select all

# chmod +x /etc/init.d/squid # update-rc.d -f squid remove # update-rc.d squid defaults # reboot
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 03 May 2013, 08:49

Iya, itu squid-nya masih hidup :)

Code: Select all

# chmod +x /etc/init.d/squid # update-rc.d -f squid remove # update-rc.d squid defaults # reboot
saya sudah melakukan perintah diatas mas, tapi setelah itu saya tidak bisa lagi melihat log (hit) squid melalui ccze
yang keluar ini
[spoiler]squid: ERROR: Could not send signal 1 to process 888: (3) No such process[/spoiler]


dgn perintah ini

# tail -f /var/log/squid/access.log

baru bisa kita lihat hit squidnya Mas,
kenapa itu mas ?

kalau dilihat di
# tail /var/log/syslog

seperti ini mas
[spoiler]root@Proxy:/home/abau# tail /var/log/syslog
May 3 08:29:32 Proxy squid[1069]: Cannot open HTTP Port
May 3 08:29:32 Proxy squid[894]: Squid Parent: child process 1069 exited due to signal 6
May 3 08:29:35 Proxy squid[894]: Squid Parent: child process 1100 started
May 3 08:29:35 Proxy squid[1100]: Cannot open HTTP Port
May 3 08:29:35 Proxy squid[894]: Squid Parent: child process 1100 exited due to signal 6
May 3 08:29:38 Proxy squid[894]: Squid Parent: child process 1131 started
May 3 08:29:38 Proxy squid[1131]: Cannot open HTTP Port
May 3 08:29:38 Proxy squid[894]: Squid Parent: child process 1131 exited due to signal 6
May 3 08:29:38 Proxy squid[894]: Exiting due to repeated, frequent failures
May 3 08:39:01 Proxy kernel: [ 601.056075] [drm] nouveau 0000:02:00.0: Setting dpms mode 1 on vga encoder (output 0)
root@Proxy:/home/abau#[/spoiler]
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 03 May 2013, 11:45

Kayaknya squid tdk jalan mas. Coba anda periksa dengan ps uax tau netstat -pln |grep squid. Kalau memang mati, start squid dan pesan eror-nya ( atau syslog) anda kopas di sini.
User avatar
bellec
Posts: 104
Joined: 04 Aug 2011, 02:07
Location: indonesia

Re: ask

Postby bellec » 04 May 2013, 10:46

seperti ini mas kalau liat log.
[spoiler]root@Proxy:/home/abau# tail -f /var/log/squid/access.log
tail: cannot open `/var/log/squid/access.log' for reading: No such file or directory[/spoiler]

dengan ps aux
[spoiler]USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 24052 2072 ? Ss May03 0:01 /sbin/init
root 2 0.0 0.0 0 0 ? S May03 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S May03 0:11 [ksoftirqd/0]
root 6 0.0 0.0 0 0 ? S May03 0:00 [migration/0]
root 7 0.0 0.0 0 0 ? S May03 0:00 [migration/1]
root 8 0.0 0.0 0 0 ? S May03 0:06 [kworker/1:0]
root 9 0.0 0.0 0 0 ? S May03 0:01 [ksoftirqd/1]
root 11 0.0 0.0 0 0 ? S< May03 0:00 [cpuset]
root 12 0.0 0.0 0 0 ? S< May03 0:00 [khelper]
root 13 0.0 0.0 0 0 ? S< May03 0:00 [netns]
root 15 0.0 0.0 0 0 ? S May03 0:00 [sync_supers]
root 16 0.0 0.0 0 0 ? S May03 0:00 [bdi-default]
root 17 0.0 0.0 0 0 ? S< May03 0:00 [kintegrityd]
root 18 0.0 0.0 0 0 ? S< May03 0:00 [kblockd]
root 19 0.0 0.0 0 0 ? S< May03 0:00 [ata_sff]
root 20 0.0 0.0 0 0 ? S May03 0:00 [khubd]
root 21 0.0 0.0 0 0 ? S< May03 0:00 [md]
root 41 0.0 0.0 0 0 ? S May03 0:00 [khungtaskd]
root 42 0.0 0.0 0 0 ? S May03 0:00 [kswapd0]
root 43 0.0 0.0 0 0 ? SN May03 0:00 [ksmd]
root 44 0.0 0.0 0 0 ? SN May03 0:00 [khugepaged]
root 45 0.0 0.0 0 0 ? S May03 0:00 [fsnotify_mark]
root 46 0.0 0.0 0 0 ? S May03 0:00 [ecryptfs-kthrea]
root 47 0.0 0.0 0 0 ? S< May03 0:00 [crypto]
root 55 0.0 0.0 0 0 ? S< May03 0:00 [kthrotld]
root 68 0.0 0.0 0 0 ? S May03 0:00 [kworker/1:1]
root 262 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_0]
root 264 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_1]
root 271 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_2]
root 272 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_3]
root 280 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_4]
root 281 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_5]
root 284 0.0 0.0 0 0 ? S May03 0:00 [kworker/u:6]
root 285 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_6]
root 286 0.0 0.0 0 0 ? S May03 0:00 [scsi_eh_7]
root 287 0.0 0.0 0 0 ? S May03 0:00 [kworker/u:7]
root 314 0.0 0.0 0 0 ? S May03 0:04 [jbd2/sda2-8]
root 315 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 321 0.0 0.0 0 0 ? S< May03 0:00 [firewire]
root 375 0.0 0.0 17104 636 ? S May03 0:00 upstart-udev-bridge --daemon
root 379 0.0 0.0 21460 1332 ? Ss May03 0:00 udevd --daemon
root 510 0.0 0.0 21456 856 ? S May03 0:00 udevd --daemon
root 514 0.0 0.0 21456 800 ? S May03 0:00 udevd --daemon
root 544 0.0 0.0 0 0 ? S< May03 0:00 [edac-poller]
root 599 0.0 0.0 0 0 ? S< May03 0:00 [ttm_swap]
root 664 0.0 0.0 15056 392 ? S May03 0:00 upstart-socket-bridge --daemon
root 733 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sda5-8]
root 734 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 737 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sda6-8]
root 738 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 741 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sda7-8]
root 742 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 745 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sdb5-8]
root 746 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 749 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sdb6-8]
root 750 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 753 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sdb7-8]
root 754 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 757 0.0 0.0 0 0 ? S May03 0:02 [jbd2/sdb8-8]
root 758 0.0 0.0 0 0 ? S< May03 0:00 [ext4-dio-unwrit]
root 784 0.0 0.0 49692 2732 ? Ss May03 0:01 /usr/sbin/sshd -D
syslog 786 0.0 0.0 52884 1492 ? Sl May03 0:02 rsyslogd -c5
102 796 0.0 0.0 24160 956 ? Ss May03 0:00 dbus-daemon --system --fork --activation=upstart
root 838 0.0 0.0 4188 624 tty4 Ss+ May03 0:00 /sbin/getty -8 38400 tty4
root 843 0.0 0.0 4188 628 tty5 Ss+ May03 0:00 /sbin/getty -8 38400 tty5
root 848 0.0 0.0 4188 628 tty2 Ss+ May03 0:00 /sbin/getty -8 38400 tty2
root 850 0.0 0.0 4188 624 tty3 Ss+ May03 0:00 /sbin/getty -8 38400 tty3
root 852 0.0 0.0 4188 628 tty6 Ss+ May03 0:00 /sbin/getty -8 38400 tty6
root 870 0.0 0.0 4204 684 ? Ss May03 0:00 acpid -c /etc/acpi/events -s /var/run/acpid.socket
root 872 0.0 0.0 15856 632 ? Ss May03 0:15 /usr/sbin/irqbalance
proxy 879 3.1 3.4 298648 249080 ? Rsl May03 49:52 /usr/sbin/squid -N -D
root 881 0.0 0.0 18984 932 ? Ss May03 0:00 cron
daemon 882 0.0 0.0 16784 380 ? Ss May03 0:00 atd
root 1001 0.0 0.0 0 0 ? S May03 0:06 [flush-8:0]
root 1665 0.0 0.0 4188 628 tty1 Ss+ May03 0:00 /sbin/getty -8 38400 tty1
root 4529 0.0 0.0 0 0 ? S 07:04 0:00 [flush-8:16]
proxy 4691 0.0 0.0 20052 3016 ? Ss 09:15 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4692 0.0 0.0 20052 3016 ? Ss 09:15 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4693 0.0 0.0 20052 3016 ? Ss 09:15 0:00 /usr/bin/perl /etc/squid/storeurl.pl
proxy 4694 0.0 0.0 20052 3016 ? Ss 09:15 0:00 /usr/bin/perl /etc/squid/storeurl.pl
root 4707 0.0 0.0 0 0 ? S 10:11 0:00 [kworker/0:0]
root 4711 0.0 0.0 0 0 ? S 10:21 0:00 [kworker/0:1]
root 4712 0.0 0.0 73092 3372 ? Ss 10:30 0:00 sshd: allec [priv]
allec 4736 0.0 0.0 73092 1672 ? S 10:31 0:00 sshd: allec@pts/0
allec 4737 0.2 0.1 26976 7280 pts/0 Ss 10:31 0:00 -bash
root 4833 0.0 0.0 35412 1572 pts/0 S 10:31 0:00 sudo su
root 4834 0.0 0.0 0 0 ? S 10:31 0:00 [kworker/0:2]
root 4835 0.0 0.0 41492 1420 pts/0 S 10:31 0:00 su
root 4836 0.0 0.0 21884 2228 pts/0 S 10:31 0:00 bash
root 4863 0.0 0.0 16756 1208 pts/0 R+ 10:34 0:00 ps aux[/spoiler]

perintah netstat -pln |grep squid
[spoiler]root@Proxy:/home/abau# netstat -pln |grep squid
tcp 0 0 0.0.0.0:3128 0.0.0.0:* LISTEN 879/squid
udp 0 0 0.0.0.0:45309 0.0.0.0:* 879/squid
udp 0 0 0.0.0.0:4827 0.0.0.0:* 879/squid
udp 0 0 0.0.0.0:3130 0.0.0.0:* 879/squid
udp 0 0 0.0.0.0:3401[/spoiler]

squid jalan tapi tidak bisa liat hit Mas.
apa yang harus saya lakukan kalau sprt ini mas !! :confused:
User avatar
q_p
Posts: 3109
Joined: 14 Oct 2012, 13:01
Contact:

Re: ask

Postby q_p » 04 May 2013, 16:52

Waduh... yang jangan ditelan mentah gitu mas :) Misalnya "ps aux" yang disarankan di atas, harusnya yang anda jalankan ya "ps aux | grep squid". Dan pesan eror pada perintah "tail" kan jelas, tdk ditemukan file access.log pada direktori /var/log/squid.

#PS
Mohon maaf, kita hanya bisa memberi "clue" bukan menuntun

Who is online

Users browsing this forum: No registered users and 0 guests