1

Добрый день.
Вопрос знатокам:

root@sams:~# squid start
2011/04/18 23:37:14| ACL name 'all' not defined!
FATAL: Bungled squid.conf line 32: http_access deny all
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.

конфиг сквида:

# created by SAMS _sams_ 2011-4-18 23:27:36
http_port 172.21.2.68:3128


#cache_mem 1024 MB
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
#mime_table /etc/squid/mime.conf
pid_filename /var/run/squid/squid.pid
hosts_file /etc/hosts
diskd_program /usr/lib/squid/diskd-daemon
unlinkd_program /usr/lib/squid/unlinkd

#url_rewrite_program /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf
#url_rewrite_children 10
#error_directory /usr/share/squid/errors/Russian-1251


auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Log Pass na INET:
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
     

acl users proxy_auth REQUIRED


http_access allow users
http_access deny all

суть:
ОС - Debian 6,0,1 ; sams 1.0.5 ; 2.7.STABLE9-2.1 ; mysql-server-5.1 ; apache2  2.2.16-6+squeeze1 
самс работает нормально, служба запускаеца и нормально конфигурируеца через веб.
СКВИД не запускаеца.
халп.

2

просит acl all например так
acl all src 0.0.0.0/0.0.0.0

Ищу дополнительный заработок (удалёнка).
Пьянка без секса – признак алкоголизма.

3 (18.04.2011 17:16:46 отредактировано White Nelud)

Stum74, и тут еще говорит "FATAL: Bungled squid.conf line 32: http_access deny all" что  у вас в конф. файле в строке 32 http доступ запрещен всем. Поставьте allow all или allow from IP. Или это так задумано?

4

White Nelud пишет:

Stum74, и тут еще говорит "FATAL: Bungled squid.conf line 32: http_access deny all" что  у вас в конф. файле в строке 32 http доступ запрещен всем. Поставьте allow all или allow from IP. Или это так задумано?

Чуть не так он пытается закрыть но не ту acl all что ему закрывать вот и материт

Ищу дополнительный заработок (удалёнка).
Пьянка без секса – признак алкоголизма.

5

Kettler пишет:

просит acl all например так
acl all src 0.0.0.0/0.0.0.0

Добавил. заработало.
Спасибо.

6 (20.04.2011 08:29:22 отредактировано Stum74)

Теперь у меня другая проблема выплыла. даже пару.

критичная и идеологическая ab :

Настроил в САМСе "политику" блокировке юзеров, то есть :
1. лимит трафика 10мб
2. внедрил так называемые списки УРЛов куда можно ходить, куда запрещено ходить и тд.
сохранил конфиг самса, реконфигурировал сквид . из веб морды самса все естественно.

в итоге нет счастья. юзер ходит куда захочет, ест трафика пока глаза не устанут. единственное, что в самсе работает это анализ логов.

Конфиги ПО:

ОС - Debian 6,0,1 ; sams 1.0.5 ; 2.7.STABLE9-2.1 ; mysql-server-5.1 ; apache2  2.2.16-6+squeeze1

сквид

+ открыть спойлер

# created by SAMS _sams_ 2011-4-19 10:42:0
http_port 172.21.2.68:3128


#cache_mem 1024 MB
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
#mime_table /etc/squid/mime.conf
pid_filename /var/run/squid/squid.pid
hosts_file /etc/hosts
diskd_program /usr/lib/squid/diskd-daemon
unlinkd_program /usr/lib/squid/unlinkd

#url_rewrite_program /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf
#url_rewrite_children 10
#error_directory /usr/share/squid/errors/Russian-1251


auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Log Pass na INET:
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
     
acl all src 0.0.0.0/0.0.0.0
acl users proxy_auth REQUIRED



http_access allow users
http_access deny all

самс

+ открыть спойлер

[client]
SQUID_DB=squidlog
SAMS_DB=squidctrl
MYSQLHOSTNAME=localhost
MYSQLUSER=sams
MYSQLPASSWORD=*********
MYSQLVERSION=4.0
SQUIDCACHEFILE=access.log
SQUIDROOTDIR=/etc/squid
SQUIDLOGDIR=/var/log/squid
SQUIDCACHEDIR=/var/spool/squid
SAMSPATH=/usr/local
SQUIDPATH=/usr/sbin
SQUIDGUARDLOGPATH=/var/log
SQUIDGUARDDBPATH=/var/db/squidguard
RECODECOMMAND=iconv -f KOI8-R -t 866 %finp > %fout
#LDAPSERVER=servername_or_ipadress
#LDAPBASEDN=your.domain
#LDAPUSER=DomainAdministrator
#LDAPUSERPASSWD=passwd
#LDAPUSERSGROUP=Users
REJIKPATH=/usr/local/rejik
#SHUTDOWNCOMMAND=shutdown -h now
CACHENUM=0

пс. самсом как админ пользуюсь больше года. но нет практики в установке с нуля. то есть с продуктом знаком.

Сейчас заметил, что если юзера руками поставить в статус отключен или отключен за превышении трафика, сохранить конфиг и реконфигурировать сквид из самса все. то юзер не может зайти в инет.
Также заметил, что при превышении лимита трафика статус юзера переходит в отключен за превышение. но результата нет. то есть, как будто сквид не реконфигурируется сам. это моя логика процесса, может я ошибаюсь.

вот кусок syslog,  тут тоже не все хорошо:

+ открыть спойлер

Apr 19 14:57:30 sams ntpd[1911]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Apr 19 14:57:30 sams ntpd[1911]: Listen and drop on 1 v6wildcard :: UDP 123
Apr 19 14:57:30 sams ntpd[1911]: Listen normally on 2 lo 127.0.0.1 UDP 123
Apr 19 14:57:30 sams ntpd[1911]: Listen normally on 3 eth0 172.21.2.68 UDP 123
Apr 19 14:57:30 sams ntpd[1911]: Listen normally on 4 lo ::1 UDP 123
Apr 19 14:57:30 sams ntpd[1911]: Listen normally on 5 eth0 fe80::b03f:75ff:fe86:7d34 UDP 123
Apr 19 09:07:01 sams squid[1947]: Squid Parent: child process 1949 started
Apr 19 09:09:01 sams /USR/SBIN/CRON[1967]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
Apr 19 09:16:40 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 09:16:42 sams samsdaemon[2005]: Reconfigure & restart SQUID... Error
Apr 19 09:17:01 sams /USR/SBIN/CRON[2012]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 19 09:20:53 sams samslogparser[2026]: Disable user inet traffic 63140396>10485760
Apr 19 09:20:53 sams samslogparser[2026]: Send message to admin. script /usr/local/share/sams/src/script/none
Apr 19 09:20:53 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 09:20:55 sams samsdaemon[2030]: Reconfigure & restart SQUID... Error
Apr 19 09:39:01 sams /USR/SBIN/CRON[2089]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
Apr 19 10:09:01 sams /USR/SBIN/CRON[2193]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
Apr 19 10:13:48 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 10:13:50 sams samsdaemon[2218]: Reconfigure & restart SQUID... Error
Apr 19 10:17:01 sams /USR/SBIN/CRON[2235]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 19 10:28:23 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 10:28:25 sams samsdaemon[2273]: Reconfigure & restart SQUID... Error
Apr 19 10:30:49 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 10:30:51 sams samsdaemon[2285]: Reconfigure & restart SQUID... Error
Apr 19 10:38:00 sams samslogparser[2311]: Disable user anton traffic 20139992>10485760
Apr 19 10:38:00 sams samslogparser[2311]: Send message to admin. script /usr/local/share/sams/src/script/none
Apr 19 10:38:00 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 10:38:02 sams samsdaemon[2313]: Reconfigure & restart SQUID... Error
Apr 19 10:39:01 sams /USR/SBIN/CRON[2325]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)

Apr 19 10:41:59 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 10:42:01 sams samsdaemon[2365]: Reconfigure & restart SQUID... Error
Apr 19 11:09:01 sams /USR/SBIN/CRON[2457]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)
Apr 19 11:17:01 sams /USR/SBIN/CRON[2493]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Apr 19 11:19:13 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 11:19:15 sams samsdaemon[2506]: Reconfigure & restart SQUID... Error
Apr 19 11:20:31 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 11:20:33 sams samsdaemon[2513]: Reconfigure & restart SQUID... Error
Apr 19 11:21:11 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 11:21:13 sams samsdaemon[2522]: Reconfigure & restart SQUID... Error
Apr 19 11:39:01 sams /USR/SBIN/CRON[2579]: (root) CMD (  [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -delete)

7

1. Выложыте весь конфиг Сквида.
2. У вас демон который отвечает за реконфиг Сквида не может его переконфигурировать. Какаято ошыбка. Может в правах доступа. Проверте.
3. Вы в качестве резалки что используете. А то по конфигу у вас 2 банерорезки прописаны. Используйте одну какуюту.
4. Ну и в конфиге самса верно пути прописаны??????

Trouble  in WINDOWS reboot, trouble in UNIX be root.

8 (19.04.2011 12:21:22 отредактировано Stum74)

kisil пишет:

1. Выложыте весь конфиг Сквида.
2. У вас демон который отвечает за реконфиг Сквида не может его переконфигурировать. Какаято ошыбка. Может в правах доступа. Проверте.
3. Вы в качестве резалки что используете. А то по конфигу у вас 2 банерорезки прописаны. Используйте одну какуюту.
4. Ну и в конфиге самса верно пути прописаны??????

1. сквид конфил выложил весь. я его стер и взял из рабочей версии своего товарища.
2. По этому вопросу хотелось бы поподробнее. что нужно сделать чтобы посмотреть права доступа? с помощью ps и chkconfig я не нашел службу samslogparser.
3. резалку пока закомментировал.  сначало надо настроить базовую работу связки.
4. пути проверял изначало. все верно. все директории по дефолту у меня в сквиде.

9 (19.04.2011 12:31:26 отредактировано kisil)

Команда

 Консоль:
ls -l

позволяет проверить права на каталог, файл. Выполните её в директории /var/log/squid
Как вы устанавливали Самс. Из исхожников или же пакетом??? если из исходников то с какими параметрами собирали?

Trouble  in WINDOWS reboot, trouble in UNIX be root.

10

2009-04-22 14:48:14 sams Disable user maxim traffic 54069682>52428800
2009-04-22 14:48:14 samsdaemon Send message to admin. script /usr/local/share/sams/src/scri
2009-04-22 14:48:14 samsdaemon Reading request to reconfigure SQUID
2009-04-22 14:48:16 samsdaemon Reconfigure & restart SQUID... Ok

вот нашел на одном ресурсе (http://www.permlug.org/node/4916). у человека совсем друга служба реконфигурирует. непонятно немного.

11

kisil пишет:

Команда

 Консоль:
ls -l

позволяет проверить права на каталог, файл. Выполните её в директории /var/log/squid
Как вы устанавливали Самс. Из исхожников или же пакетом??? если из исходников то с какими параметрами собирали?

root@sams:/etc# cd /etc/squid
root@sams:/etc/squid# ls -l
итого 224
-rw-r--r-- 1 root root      7 Апр 19 14:08 4dac741d1bad3.sams
-rw-r--r-- 1 root root     21 Апр 19 14:08 4dad0e92209e7.sams
-rw-r--r-- 1 root root  26009 Апр 19 14:08 banners.sams
-rw-r--r-- 1 root root     11 Апр 19 14:08 disabled_id.sams
-rw-r--r-- 1 root root      0 Апр 19 14:08 ncsa.sams
-rwxrwxrwx 1 root root    918 Апр 19 14:08 squid.conf
-rw-r--r-- 1 root root    875 Апр 19 14:08 squid.conf.bak
-rw------- 1 root root 169404 Апр 18 15:42 squid.conf.orig
-rw-r--r-- 1 root root   1264 Июн  3  2010 squidGuard.conf
root@sams:/etc/squid#

Установку сделал вот по этому мануалу с оф сайта http://sams.nixdev.ru/wiki/debian4.0

12

Так, ещё покажыте что говорит

 Консоль:
php -i | grep safe_mode

У вас веб-интерфейс нормально грузитса, статистика сквида в базу ложытса?
Ещё покажыте вывод
 Консоль:
ls -l /usr/local/share/sams/src/script/none

или

 Консоль:
ls -l /usr/local/share/sams/src/script

Вообщето проделайте настройку вот по этой статье

Trouble  in WINDOWS reboot, trouble in UNIX be root.

13 (19.04.2011 13:19:25 отредактировано Stum74)

пхп сейф мод я настройку делал по вашей ссылке. но заметил нестыковку похоже. настройку пвп я делал по пути /etc/php5/apache2/php.ini
в этом файле я сделал следующее

 Консоль:
; Safe Mode
; http://php.net/safe-mode
safe_mode = On

 Консоль:
safe_mode_exec_dir = "/usr/local/share/sams/bin"

 Консоль:
disable_functions = "chdir,dl,ini_get_all,popen,proc_open,passthru,pcntl_exec"
Это значение у меня было пустое.  тут у меня возник вопрос: "нужно было оставить пустым ...?" в линуксе новичек, по этому вопрос остался открытым

hphp.executor.func.blacklist = chdir,dl,ini_get_all,popen,proc_open,passthru,pcntl_exec

- этого параметра у меня нет и в мануали для Debian тоже http://sams.nixdev.net/wiki/debian4.0

 Консоль:
root@sams:/etc/squid# php -i | grep safe_mode
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626+lfs/suhosin.so' - /usr/lib/php5/20090626+lfs/suhosin.so: cannot open shared object file: No such file or directory in Unknown on line 0
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sql.safe_mode => Off => Off
safe_mode_allowed_env_vars => PHP_ => PHP_
safe_mode_protected_env_vars => LD_LIBRARY_PATH => LD_LIBRARY_PATH

 Консоль:
root@sams:/etc/squid# ls -l /usr/local/share/sams/src/script
итого 12
-rwxr-xr-x 1 root staff 120 Апр 18 17:22 send_email_message
-rwxr-xr-x 1 root staff  95 Апр 18 17:22 send_winpopup_message
-rwxr-xr-x 1 root staff  66 Апр 18 17:22 test_script
root@sams:/etc/squid#

веб морда самса работет нормально. в начале были какие то проблемы с отображением некоторых областей в веб интерфейсе, но я их решил. не помню как чесно говоря.

14

Ну на период отладки я бы рекомендовал отключить safe_mode в php.
Статистика в базу ложытса?
Если проверили установку и настройку Самса по мануалу, попробуйте что то из вэб поправить и переконфигурировать сквид. Тогда в лог смотрите.
И выложыте cache.log при переконфигурации сквида.

Trouble  in WINDOWS reboot, trouble in UNIX be root.

15 (19.04.2011 14:31:11 отредактировано Stum74)

отключил safe_mode = Off
В итоге пропала ошибка на перезапуск . вот лог

 Консоль:
Apr 19 16:04:17 sams samslogparser[3571]: Disable user test traffic 22138463>10485760
Apr 19 16:04:17 sams samslogparser[3571]: Send message to admin. script /usr/local/share/sams/src/script/none
Apr 19 16:04:17 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 16:04:17 sams kernel: [26608.633254] samsdaemon[1216]: segfault at 72617633 ip b741f59a sp bfb1f8bc error 4 in libc-2.11.2.so[b73b4000+140000]

как показано выше я создал в самсе нового юзера, сохранил конфигурацию и перезапустил службу сквид. в веб морде самса.
съел 10мб+ отпущеного лимита новым пользователем. скрипт это заметил, но доступ не закрыл. лог выложил выше.

Статистика в базу ложытса?

немного непонятно.
в самсе-вебморде зашел в "Журнале". там генерируется статистика по всех категориям кроме "Журнал событий изменений баз данных логов скивд". там формируеца пустой отчет.
Отчеты по трафику самс генерирует нормально

 Консоль:
за период с 1.4.2011 по 19.4.2011
No        Из КЭШ    Трафик    URL
1      11 779 799      0      11 Mb 239 kb      v5.lscache3.c.youtube.com
2      7 180 818      0      6 Mb 868 kb      11.okcontent.video.mail.ru
3       396 088      0       386 kb      js.imgsmail.ru
4       370 953      0       362 kb      s0.2mdn.net
5       333 556      0       325 kb      img.mail.ru
6       219 260      0       214 kb      video.mail.ru
7       205 337      0       200 kb      pagead2.googlesyndication.com
8       173 194      0       169 kb      images-partners.google.com

Щас порылся в файле кеш.лог
там определенная неразбериха связанная со всем процессом  настройки самса. решил выложить полностью .http://depositfiles.com/ru/files/dntfgig2e

16

Статистика в базу ложытса?

Это я имею ввиду самс собирает статистику Сквида в базу или нет?
По пользователях можна посмотреть скока он съел трафика?

Trouble  in WINDOWS reboot, trouble in UNIX be root.

17

kisil пишет:
Статистика в базу ложытса?

Это я имею ввиду самс собирает статистику Сквида в базу или нет?
По пользователях можна посмотреть скока он съел трафика?

да. я вижу из самса полную статистику посещений сайтов и трафика. выше я лог статистики привел по трафику пользователя test

18

Понятно. Это хорошо.  ae
А как нащот лога сквида cache.log? Можна на него взгленуть?

Trouble  in WINDOWS reboot, trouble in UNIX be root.

19

kisil пишет:

Понятно. Это хорошо.  ae
А как нащот лога сквида cache.log? Можна на него взгленуть?

http://depositfiles.com/ru/files/dntfgig2e  smile

20 (19.04.2011 15:08:31 отредактировано kisil)

У вас от какого пользователя Сквид запускаетса. Процес не может создать pid  файл в дериктории. Проверте права. Вот ошыбка

2011/04/19 09:07:01| WCCP Disabled.

2011/04/19 09:07:01| /var/run/squid/squid.pid: (2) No such file or directory

2011/04/19 09:07:01| WARNING: Could not write pid file

2011/04/19 09:07:01| Ready to serve requests.

Наверное при переконфигурацыи Сквид просто падает. Проверте права на этот файл  /var/run/squid/squid.pid.

И ещё. В cache.log есть ошыбки нащот отсутствие в базе таблицы. Вы верно создали базу??

mysql_real_connect() error 4. no open database squidctrl, DELAY 3 sec

Кстати имя пользователя и групи от имени которых должен работать Сквид задаётса в его конфиге.

Trouble  in WINDOWS reboot, trouble in UNIX be root.

21

Это я заметил кстати тоже. но та мнет сквида

 Консоль:
root@sams:/var/run# ls
acpid.pid     apache2.pid  crond.reboot  mysqld           portmap.pid    rsyslogd.pid    sm-notify.pid  utmp
acpid.socket  atd.pid      exim4         ntpd.pid         postgresql     samsdaemon.pid  sshd
apache2       crond.pid    motd          portmap_mapping  rpc.statd.pid  sams.pid        sshd.pid
root@sams:/var/run#

и еще. я в очередной раз перезагрузил машину и у меня в очередной раз не поднялся сквид. я думаю как раз из за подобных вещей.

 Консоль:
Last login: Tue Apr 19 14:45:31 2011 from 172.21.2.23
root@sams:~# ps -aux | grep sams
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root      1574  0.0  0.0   4816   860 ?        S    16:53   0:00 /usr/local/bin/                                               samsdaemon
root      1629  0.0  0.0   3324   764 pts/0    R+   16:57   0:00 grep sams
root@sams:~# ps -aux | grep sams
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root      1574  0.0  0.0   4816   860 ?        S    16:53   0:00 /usr/local/bin/samsdaemon
root      1631  0.0  0.0   3324   768 pts/0    R+   16:57   0:00 grep sams
root@sams:~# squid start
root@sams:~# ps -aux | grep sams
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root      1574  0.0  0.0   4816   860 ?        S    16:53   0:00 /usr/local/bin/samsdaemon
proxy     1637  0.0  0.0   2052   500 ?        S    16:57   0:00 (ncsa_auth) /etc/squid/ncsa.sams
proxy     1638  0.0  0.0   2052   504 ?        S    16:57   0:00 (ncsa_auth) /etc/squid/ncsa.sams
proxy     1639  0.0  0.0   2052   504 ?        S    16:57   0:00 (ncsa_auth) /etc/squid/ncsa.sams
proxy     1640  0.0  0.0   2052   496 ?        S    16:57   0:00 (ncsa_auth) /etc/squid/ncsa.sams
proxy     1641  0.0  0.0   2052   496 ?        S    16:57   0:00 (ncsa_auth) /etc/squid/ncsa.sams
root      1644  0.0  0.0   3324   776 pts/0    S+   16:58   0:00 grep sams
root@sams:~# chkconfig --list squid
squid                     0:off  1:off  2:on   3:on   4:on   5:on   6:off

То есть. когда машина воднялась после раебута. прокси не работет. когда я стартанул сквид вручную. прокси работает. но старт прокси никаких ошибок не выдает. но всеже почемуто не стартует при включении машины.

 Консоль:
Apr 19 16:04:17 sams samslogparser[3571]: Disable user test traffic 22138463>10485760
Apr 19 16:04:17 sams samslogparser[3571]: Send message to admin. script /usr/local/share/sams/src/script/none
Apr 19 16:04:17 sams samsdaemon[1216]: Reading request to reconfigure SQUID
Apr 19 16:04:17 sams kernel: [26608.633254] samsdaemon[1216]: segfault at 72617633 ip b741f59a sp bfb1f8bc error 4 in libc-2.11.2.so[b73b4000+140000]
Apr 19 16:57:56 sams squid[1633]: Squid Parent: child process 1635 started

22

В конфиге сквида поправте строку

pid_filename /var/run/squid/squid.pid

на

pid_filename /var/run/squid.pid

И перезапустите сквид. Посмотрите на последние строки в cache.log нет ли там после этого ошыбки доступа к squid.pid файлу.
Сначала нуна сквид настроить чтобы работал без ошыбок, а потом с остальным разбирёмся. wink

Trouble  in WINDOWS reboot, trouble in UNIX be root.

23

kisil пишет:

У вас от какого пользователя Сквид запускаетса. Процес не может создать pid  файл в дериктории. Проверте права.
И ещё. В cache.log есть ошыбки нащот отсутствие в базе таблицы. Вы верно создали базу??

mysql_real_connect() error 4. no open database squidctrl, DELAY 3 sec

Кстати имя пользователя и групи от имени которых должен работать Сквид задаётса в его конфиге.

Базу я создал по мануалу с оф сайта

+ открыть спойлер

Создание БД:
Для работы SAMS необходимо создать пользователя sams в БД MySQL:

  mysql -u root -p
  GRANT ALL ON squidctrl.* TO sams@localhost IDENTIFIED BY "yourpassword";
  GRANT ALL ON squidlog.* TO sams@localhost IDENTIFIED BY "yourpassword";

Где:

    yourpassword - пароль

После этого имя пользователя и пароль надо сохранить в файле конфигурации SAMS /etc/sams.conf:

    MYSQLUSER=sams - Имя пользователя MySQL, от имени которого будет работать SAMS
    MYSQLPASSWORD=yourpasswd - Пароль пользователя в MySQL

Создаем базы SAMS в MySQL
Для этого перемещаемся в каталог ./mysql и там даем команды:

  cd ./mysql
  mysql -u root -p < sams_db.sql
  mysql -u root -p < squid_db.sql

А на счет групы запуска процеса сквид. я конфиг сквида выложил в первом посте. просто у моего знакомого конфиг брал и у нег овсе работает.

24

Хорошо.

Как нащот этого

kisil пишет:

В конфиге сквида поправте строку

pid_filename /var/run/squid/squid.pid

на

pid_filename /var/run/squid.pid

И перезапустите сквид. Посмотрите на последние строки в cache.log нет ли там после этого ошыбки доступа к squid.pid файлу.
Сначала нуна сквид настроить чтобы работал без ошыбок, а потом с остальным разбирёмся. wink

Trouble  in WINDOWS reboot, trouble in UNIX be root.

25

kisil пишет:

В конфиге сквида поправте строку

pid_filename /var/run/squid/squid.pid

на

pid_filename /var/run/squid.pid

И перезапустите сквид. Посмотрите на последние строки в cache.log нет ли там после этого ошыбки доступа к squid.pid файлу.
Сначала нуна сквид настроить чтобы работал без ошыбок, а потом с остальным разбирёмся. wink

Ya wol'. но и в /var/run/ нет squid.pid

+ открыть спойлер

2011/04/19 17:21:03| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:03| Process ID 1740
2011/04/19 17:21:03| With 1024 file descriptors available
2011/04/19 17:21:03| Using epoll for the IO loop
2011/04/19 17:21:03| Performing DNS Tests...
2011/04/19 17:21:03| Successful DNS name lookup tests...
2011/04/19 17:21:03| DNS Socket created at 0.0.0.0, port 35641, FD 6
2011/04/19 17:21:03| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:03| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:03| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:03| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:03| User-Agent logging is disabled.
2011/04/19 17:21:03| Referer logging is disabled.
2011/04/19 17:21:03| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:03| Unlinkd pipe opened on FD 16
2011/04/19 17:21:03| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:03| Target number of buckets: 425
2011/04/19 17:21:03| Using 8192 Store buckets
2011/04/19 17:21:03| Max Mem  size: 8192 KB
2011/04/19 17:21:03| Max Swap size: 102400 KB
2011/04/19 17:21:03| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:03| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:03| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:03| Using Least Load store dir selection
2011/04/19 17:21:03| Current Directory is /var/run
2011/04/19 17:21:03| Loaded Icons.
2011/04/19 17:21:03| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.000 user + 0.012 sys
Maximum Resident Size: 18896 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:06| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:06| Process ID 1749
2011/04/19 17:21:06| With 1024 file descriptors available
2011/04/19 17:21:06| Using epoll for the IO loop
2011/04/19 17:21:06| Performing DNS Tests...
2011/04/19 17:21:06| Successful DNS name lookup tests...
2011/04/19 17:21:06| DNS Socket created at 0.0.0.0, port 54348, FD 6
2011/04/19 17:21:06| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:06| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:06| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:06| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:06| User-Agent logging is disabled.
2011/04/19 17:21:06| Referer logging is disabled.
2011/04/19 17:21:06| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:06| Unlinkd pipe opened on FD 16
2011/04/19 17:21:06| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:06| Target number of buckets: 425
2011/04/19 17:21:06| Using 8192 Store buckets
2011/04/19 17:21:06| Max Mem  size: 8192 KB
2011/04/19 17:21:06| Max Swap size: 102400 KB
2011/04/19 17:21:06| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:06| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:06| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:06| Using Least Load store dir selection
2011/04/19 17:21:06| Current Directory is /var/run
2011/04/19 17:21:06| Loaded Icons.
2011/04/19 17:21:06| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 18896 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:09| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:09| Process ID 1759
2011/04/19 17:21:09| With 1024 file descriptors available
2011/04/19 17:21:09| Using epoll for the IO loop
2011/04/19 17:21:09| Performing DNS Tests...
2011/04/19 17:21:09| Successful DNS name lookup tests...
2011/04/19 17:21:09| DNS Socket created at 0.0.0.0, port 58859, FD 6
2011/04/19 17:21:09| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:09| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:09| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:09| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:09| User-Agent logging is disabled.
2011/04/19 17:21:09| Referer logging is disabled.
2011/04/19 17:21:09| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:09| Unlinkd pipe opened on FD 16
2011/04/19 17:21:09| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:09| Target number of buckets: 425
2011/04/19 17:21:09| Using 8192 Store buckets
2011/04/19 17:21:09| Max Mem  size: 8192 KB
2011/04/19 17:21:09| Max Swap size: 102400 KB
2011/04/19 17:21:09| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:09| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:09| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:09| Using Least Load store dir selection
2011/04/19 17:21:09| Current Directory is /var/run
2011/04/19 17:21:09| Loaded Icons.
2011/04/19 17:21:09| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 18896 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:09| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:09| Process ID 1767
2011/04/19 17:21:09| With 1024 file descriptors available
2011/04/19 17:21:09| Using epoll for the IO loop
2011/04/19 17:21:09| Performing DNS Tests...
2011/04/19 17:21:09| Successful DNS name lookup tests...
2011/04/19 17:21:09| DNS Socket created at 0.0.0.0, port 36607, FD 6
2011/04/19 17:21:09| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:09| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:09| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:09| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:09| User-Agent logging is disabled.
2011/04/19 17:21:09| Referer logging is disabled.
2011/04/19 17:21:09| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:09| Unlinkd pipe opened on FD 16
2011/04/19 17:21:09| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:09| Target number of buckets: 425
2011/04/19 17:21:09| Using 8192 Store buckets
2011/04/19 17:21:09| Max Mem  size: 8192 KB
2011/04/19 17:21:09| Max Swap size: 102400 KB
2011/04/19 17:21:09| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:09| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:09| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:09| Using Least Load store dir selection
2011/04/19 17:21:09| Current Directory is /var/run
2011/04/19 17:21:09| Loaded Icons.
2011/04/19 17:21:09| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 18912 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:12| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:12| Process ID 1775
2011/04/19 17:21:12| With 1024 file descriptors available
2011/04/19 17:21:12| Using epoll for the IO loop
2011/04/19 17:21:12| Performing DNS Tests...
2011/04/19 17:21:12| Successful DNS name lookup tests...
2011/04/19 17:21:12| DNS Socket created at 0.0.0.0, port 37730, FD 6
2011/04/19 17:21:12| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:12| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:12| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:12| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:12| User-Agent logging is disabled.
2011/04/19 17:21:12| Referer logging is disabled.
2011/04/19 17:21:12| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:12| Unlinkd pipe opened on FD 16
2011/04/19 17:21:12| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:12| Target number of buckets: 425
2011/04/19 17:21:12| Using 8192 Store buckets
2011/04/19 17:21:12| Max Mem  size: 8192 KB
2011/04/19 17:21:12| Max Swap size: 102400 KB
2011/04/19 17:21:12| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:12| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:12| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:12| Using Least Load store dir selection
2011/04/19 17:21:12| Current Directory is /var/run
2011/04/19 17:21:12| Loaded Icons.
2011/04/19 17:21:12| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.008 user + 0.000 sys
Maximum Resident Size: 18880 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:12| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:12| Process ID 1783
2011/04/19 17:21:12| With 1024 file descriptors available
2011/04/19 17:21:12| Using epoll for the IO loop
2011/04/19 17:21:12| Performing DNS Tests...
2011/04/19 17:21:12| Successful DNS name lookup tests...
2011/04/19 17:21:12| DNS Socket created at 0.0.0.0, port 49747, FD 6
2011/04/19 17:21:12| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:12| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:12| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:12| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:12| User-Agent logging is disabled.
2011/04/19 17:21:12| Referer logging is disabled.
2011/04/19 17:21:12| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:12| Unlinkd pipe opened on FD 16
2011/04/19 17:21:12| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:12| Target number of buckets: 425
2011/04/19 17:21:12| Using 8192 Store buckets
2011/04/19 17:21:12| Max Mem  size: 8192 KB
2011/04/19 17:21:12| Max Swap size: 102400 KB
2011/04/19 17:21:12| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:12| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:12| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:12| Using Least Load store dir selection
2011/04/19 17:21:12| Current Directory is /var/run
2011/04/19 17:21:12| Loaded Icons.
2011/04/19 17:21:13| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 18880 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:15| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:15| Process ID 1791
2011/04/19 17:21:15| With 1024 file descriptors available
2011/04/19 17:21:15| Using epoll for the IO loop
2011/04/19 17:21:15| Performing DNS Tests...
2011/04/19 17:21:15| Successful DNS name lookup tests...
2011/04/19 17:21:15| DNS Socket created at 0.0.0.0, port 60670, FD 6
2011/04/19 17:21:15| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:15| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:15| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:15| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:15| User-Agent logging is disabled.
2011/04/19 17:21:15| Referer logging is disabled.
2011/04/19 17:21:15| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:15| Unlinkd pipe opened on FD 16
2011/04/19 17:21:15| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:15| Target number of buckets: 425
2011/04/19 17:21:15| Using 8192 Store buckets
2011/04/19 17:21:15| Max Mem  size: 8192 KB
2011/04/19 17:21:15| Max Swap size: 102400 KB
2011/04/19 17:21:15| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:15| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:15| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:15| Using Least Load store dir selection
2011/04/19 17:21:15| Current Directory is /var/run
2011/04/19 17:21:15| Loaded Icons.
2011/04/19 17:21:15| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.008 user + 0.000 sys
Maximum Resident Size: 18912 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:16| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:16| Process ID 1799
2011/04/19 17:21:16| With 1024 file descriptors available
2011/04/19 17:21:16| Using epoll for the IO loop
2011/04/19 17:21:16| Performing DNS Tests...
2011/04/19 17:21:16| Successful DNS name lookup tests...
2011/04/19 17:21:16| DNS Socket created at 0.0.0.0, port 54316, FD 6
2011/04/19 17:21:16| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:16| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:16| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:16| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:16| User-Agent logging is disabled.
2011/04/19 17:21:16| Referer logging is disabled.
2011/04/19 17:21:16| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:16| Unlinkd pipe opened on FD 16
2011/04/19 17:21:16| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:16| Target number of buckets: 425
2011/04/19 17:21:16| Using 8192 Store buckets
2011/04/19 17:21:16| Max Mem  size: 8192 KB
2011/04/19 17:21:16| Max Swap size: 102400 KB
2011/04/19 17:21:16| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:16| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:16| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:16| Using Least Load store dir selection
2011/04/19 17:21:16| Current Directory is /var/run
2011/04/19 17:21:16| Loaded Icons.
2011/04/19 17:21:16| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 18880 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:18| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:18| Process ID 1807
2011/04/19 17:21:18| With 1024 file descriptors available
2011/04/19 17:21:18| Using epoll for the IO loop
2011/04/19 17:21:18| Performing DNS Tests...
2011/04/19 17:21:18| Successful DNS name lookup tests...
2011/04/19 17:21:18| DNS Socket created at 0.0.0.0, port 55557, FD 6
2011/04/19 17:21:18| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:18| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:18| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:18| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:18| User-Agent logging is disabled.
2011/04/19 17:21:18| Referer logging is disabled.
2011/04/19 17:21:18| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:18| Unlinkd pipe opened on FD 16
2011/04/19 17:21:18| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:18| Target number of buckets: 425
2011/04/19 17:21:18| Using 8192 Store buckets
2011/04/19 17:21:18| Max Mem  size: 8192 KB
2011/04/19 17:21:18| Max Swap size: 102400 KB
2011/04/19 17:21:18| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:18| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:18| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:18| Using Least Load store dir selection
2011/04/19 17:21:18| Current Directory is /var/run
2011/04/19 17:21:18| Loaded Icons.
2011/04/19 17:21:19| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.000 user + 0.008 sys
Maximum Resident Size: 18880 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%
2011/04/19 17:21:22| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:21:22| Process ID 1815
2011/04/19 17:21:22| With 1024 file descriptors available
2011/04/19 17:21:22| Using epoll for the IO loop
2011/04/19 17:21:22| Performing DNS Tests...
2011/04/19 17:21:22| Successful DNS name lookup tests...
2011/04/19 17:21:22| DNS Socket created at 0.0.0.0, port 57987, FD 6
2011/04/19 17:21:22| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:22| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:21:22| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:21:22| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:21:22| User-Agent logging is disabled.
2011/04/19 17:21:22| Referer logging is disabled.
2011/04/19 17:21:22| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:21:22| Unlinkd pipe opened on FD 16
2011/04/19 17:21:22| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:21:22| Target number of buckets: 425
2011/04/19 17:21:22| Using 8192 Store buckets
2011/04/19 17:21:22| Max Mem  size: 8192 KB
2011/04/19 17:21:22| Max Swap size: 102400 KB
2011/04/19 17:21:22| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:21:22| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:21:22| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:21:22| Using Least Load store dir selection
2011/04/19 17:21:22| Current Directory is /var/run
2011/04/19 17:21:22| Loaded Icons.
2011/04/19 17:21:22| commBind: Cannot bind socket FD 18 to 172.21.2.68:3128: (98) Address already in use
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.7.STABLE9): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
Maximum Resident Size: 18880 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
    total space in arena:    2112 KB
    Ordinary blocks:         2063 KB      2 blks
    Small blocks:               0 KB      1 blks
    Holding blocks:           280 KB      1 blks
    Free Small blocks:          0 KB
    Free Ordinary blocks:      48 KB
    Total in use:            2343 KB 98%
    Total free:                48 KB 2%

сквид конфиг щас

+ открыть спойлер

# created by SAMS _sams_ 2011-4-19 15:59:36
http_port 172.21.2.68:3128


#cache_mem 1024 MB
cache_dir ufs /var/spool/squid 100 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
#mime_table /etc/squid/mime.conf
#pid_filename /var/run/squid/squid.pid
pid_filename /var/run/squid.pid
hosts_file /etc/hosts
diskd_program /usr/lib/squid/diskd-daemon
unlinkd_program /usr/lib/squid/unlinkd

#url_rewrite_program /usr/local/rejik3/redirector /usr/local/rejik3/redirector.conf
#url_rewrite_children 10
#error_directory /usr/share/squid/errors/Russian-1251


auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/ncsa.sams
auth_param basic children 5
auth_param basic realm Log Pass na INET:
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off
     
acl all src 0.0.0.0/0.0.0.0
acl users proxy_auth REQUIRED



http_access allow users
http_access deny all

26 (19.04.2011 15:34:32 отредактировано kisil)

Офигеть. А что теперь весит на 3128 порту что сквид к нему подцепитса не может.

 Консоль:
ps ax | grep squid
netstat -lnp | grep squid

Trouble  in WINDOWS reboot, trouble in UNIX be root.

27

ммм. у меня ИЕ через прокси нормально работает

+ открыть спойлер

 Консоль:
root@sams:/var/run# ps ax | grep squid
1633 ?        Ss     0:00 squid start
1635 ?        S      0:00 (squid) start
1637 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1638 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1639 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1640 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1641 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1857 pts/0    S+     0:00 grep squid

28 (19.04.2011 15:49:57 отредактировано kisil)

Это я не понял. Вы что пробывали запустить сквид при работающем экземпляре. Если правите конфиг, то потом просто в консоли набираете

 Консоль:
/path/to/bin_squid/squid -k reconfigure
.
Проделайте это щас когда поправили конфиг и выправили сроку с pid файлом. И тогда выложыте последние строки из cache.log.
Нащот этой команды не уверен. У вас 2,7 версия у меня 3,0.

Trouble  in WINDOWS reboot, trouble in UNIX be root.

29

помогло. я ребут сдела.

+ открыть спойлер

011/04/19 17:55:12| Preparing for shutdown after 60 requests
2011/04/19 17:55:12| Waiting 30 seconds for active connections to finish
2011/04/19 17:55:12| FD 18 Closing HTTP connection
2011/04/19 17:55:12| WARNING: basicauthenticator #4 (FD 10) exited
2011/04/19 17:55:12| WARNING: basicauthenticator #2 (FD af exited
2011/04/19 17:55:12| WARNING: basicauthenticator #3 (FD 9) exited
2011/04/19 17:55:12| Too few basicauthenticator processes are running
2011/04/19 17:55:12| Starting new helpers
2011/04/19 17:55:12| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:55:12| WARNING: basicauthenticator #5 (FD 11) exited
2011/04/19 17:55:12| WARNING: basicauthenticator #1 (FD 7) exited
2011/04/19 17:55:35| Starting Squid Cache version 2.7.STABLE9 for i386-debian-linux-gnu...
2011/04/19 17:55:35| Process ID 1093
2011/04/19 17:55:35| With 1024 file descriptors available
2011/04/19 17:55:35| Using epoll for the IO loop
2011/04/19 17:55:35| DNS Socket created at 0.0.0.0, port 60217, FD 6
2011/04/19 17:55:35| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:55:35| Adding domain system.lan from /etc/resolv.conf
2011/04/19 17:55:35| Adding nameserver 172.21.2.101 from /etc/resolv.conf
2011/04/19 17:55:35| helperOpenServers: Starting 5 'ncsa_auth' processes
2011/04/19 17:55:35| User-Agent logging is disabled.
2011/04/19 17:55:35| Referer logging is disabled.
2011/04/19 17:55:35| logfileOpen: opening log /var/log/squid/access.log
2011/04/19 17:55:35| Unlinkd pipe opened on FD 16
2011/04/19 17:55:35| Swap maxSize 102400 + 8192 KB, estimated 8507 objects
2011/04/19 17:55:35| Target number of buckets: 425
2011/04/19 17:55:35| Using 8192 Store buckets
2011/04/19 17:55:35| Max Mem  size: 8192 KB
2011/04/19 17:55:35| Max Swap size: 102400 KB
2011/04/19 17:55:35| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2011/04/19 17:55:35| logfileOpen: opening log /var/log/squid/store.log
2011/04/19 17:55:35| Rebuilding storage in /var/spool/squid (DIRTY)
2011/04/19 17:55:35| Using Least Load store dir selection
2011/04/19 17:55:35| Current Directory is /
2011/04/19 17:55:35| Loaded Icons.
2011/04/19 17:55:35| Accepting proxy HTTP connections at 172.21.2.68, port 3128, FD 18.
2011/04/19 17:55:35| Accepting ICP messages at 0.0.0.0, port 3130, FD 19.
2011/04/19 17:55:35| HTCP Disabled.
2011/04/19 17:55:35| WCCP Disabled.
2011/04/19 17:55:35| Ready to serve requests.
2011/04/19 17:55:35| Done reading /var/spool/squid swaplog (3309 entries)
2011/04/19 17:55:35| Finished rebuilding storage from disk.
2011/04/19 17:55:35|      2746 Entries scanned
2011/04/19 17:55:35|         0 Invalid entries.
2011/04/19 17:55:35|         0 With invalid flags.
2011/04/19 17:55:35|      2746 Objects loaded.
2011/04/19 17:55:35|         0 Objects expired.
2011/04/19 17:55:35|       563 Objects cancelled.
2011/04/19 17:55:35|         0 Duplicate URLs purged.
2011/04/19 17:55:35|         0 Swapfile clashes avoided.
2011/04/19 17:55:35|   Took 0.4 seconds (7349.8 objects/sec).
2011/04/19 17:55:35| Beginning Validation Procedure
2011/04/19 17:55:35|   Completed Validation Procedure
2011/04/19 17:55:35|   Validated 2183 Entries
2011/04/19 17:55:35|   store_swap_size = 32632k
2011/04/19 17:55:36| storeLateRelease: released 0 objects

+ открыть спойлер

root@sams:~# ps ax | grep squid
1088 ?        Ss     0:00 /usr/sbin/squid -D -YC
1093 ?        S      0:00 (squid) -D -YC
1099 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1100 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1101 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1102 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1103 ?        S      0:00 (ncsa_auth) /etc/squid/ncsa.sams
1672 pts/0    S+     0:00 grep squid
root@sams:~#

побежал домой. завтра продолжим
ОГРОМНОЕ СПАСИБО ЗА ПОМОЩЬ!!!! ПОБЕЖАЛ А ТО ОПАЗДАЮ НА АВТОБУС)

30

Давай удачи. ag

Trouble  in WINDOWS reboot, trouble in UNIX be root.