LINUX.ORG.RU
ФорумAdmin

Проблема со Squid


0

0

Есть система на ALT Linux Master 2.5, работающая как почтовый и прокси сервер. Через Squid раздаётся интернет для офиса. Утром ИБП запускает сервер, там запускаются postfix и squid и всё вроде нормально. Некоторое время назад позникла такая проблема - при запуске сервера squid запускается, но интернета не даёт. При ручном перезапуске (/etc/init.d/squid restart) всё нормально. Попробовал решение в лоб - добавил крону команду на перезапуск squid через 30 минут после включения. Перезапускает, но всё равно не работает. Подключаюсь через ssh, перезапускаю ручками - работает. Что делать? Куда копать? Спасибо.

anonymous

Ответ на: комментарий от Rain

В том вся и прелесть, что с логами, на мой взгляд, всё нормально. Если кто что сможет сказать по логам, то вот:
Часть лога выключения:
2007/01/29 20:01:03| Preparing for shutdown after 3329 requests
2007/01/29 20:01:03| Waiting 30 seconds for active connections to finish
2007/01/29 20:01:03| FD 17 Closing HTTP connection

Дальше идёт новый день и запускается сервер:
2007/01/30 08:02:05| Starting Squid Cache version 2.5.STABLE10 for i586-alt-linux-gnu...
2007/01/30 08:02:05| Process ID 2224
2007/01/30 08:02:05| With 16384 file descriptors available
2007/01/30 08:02:05| DNS Socket created at 0.0.0.0, port 32771, FD 5
2007/01/30 08:02:05| Adding nameserver XXX.XXX.XXX.XXX from /etc/resolv.conf
2007/01/30 08:02:05| helperOpenServers: Starting 5 'ncsa_auth' processes
2007/01/30 08:02:05| User-Agent logging is disabled.
2007/01/30 08:02:05| Unlinkd pipe opened on FD 15
2007/01/30 08:02:05| Swap maxSize 102400 KB, estimated 7876 objects
2007/01/30 08:02:05| Target number of buckets: 393
2007/01/30 08:02:05| Using 8192 Store buckets
2007/01/30 08:02:05| Max Mem size: 8192 KB
2007/01/30 08:02:05| Max Swap size: 102400 KB
2007/01/30 08:02:05| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2007/01/30 08:02:05| Rebuilding storage in /var/spool/squid (DIRTY)
2007/01/30 08:02:05| Using Least Load store dir selection
2007/01/30 08:02:05| Set Current Directory to /var/spool/squid
2007/01/30 08:02:05| Loaded Icons.
2007/01/30 08:02:06| Accepting HTTP connections at 0.0.0.0, port 3128, FD 17.
2007/01/30 08:02:06| Accepting ICP messages at 0.0.0.0, port 3130, FD 18.
2007/01/30 08:02:06| Accepting SNMP messages on port 3401, FD 19.
2007/01/30 08:02:06| WCCP Disabled.
2007/01/30 08:02:06| ipcCreate: /usr/lib/squid/pinger: (2) No such file or directory
2007/01/30 08:02:06| Pinger socket opened on FD 21
2007/01/30 08:02:06| Ready to serve requests.
2007/01/30 08:02:06| Store rebuilding is 47.1% complete
2007/01/30 08:02:06| Done reading /var/spool/squid swaplog (8863 entries)
2007/01/30 08:02:06| Finished rebuilding storage from disk.
2007/01/30 08:02:06| 8533 Entries scanned
2007/01/30 08:02:06| 0 Invalid entries.
2007/01/30 08:02:06| 0 With invalid flags.
2007/01/30 08:02:06| 8473 Objects loaded.
2007/01/30 08:02:06| 0 Objects expired.
2007/01/30 08:02:06| 50 Objects cancelled.
2007/01/30 08:02:06| 271 Duplicate URLs purged.
2007/01/30 08:02:06| 3 Swapfile clashes avoided.
2007/01/30 08:02:06| Took 0.8 seconds (10921.0 objects/sec).
2007/01/30 08:02:06| Beginning Validation Procedure
2007/01/30 08:02:06| Completed Validation Procedure
2007/01/30 08:02:06| Validated 8206 Entries
2007/01/30 08:02:06| store_swap_size = 74828k
2007/01/30 08:02:06| storeLateRelease: released 0 objects

anonymous
()
Ответ на: комментарий от anonymous

После этого интернет не работает. Дальше squid перезапускается по крону:
2007/01/30 09:35:01| Preparing for shutdown after 484 requests
2007/01/30 09:35:01| Waiting 30 seconds for active connections to finish
2007/01/30 09:35:01| FD 17 Closing HTTP connection
2007/01/30 09:35:01| Closing Pinger socket on FD 21
2007/01/30 09:35:02| Starting Squid Cache version 2.5.STABLE10 for i586-alt-linux-gnu...
2007/01/30 09:35:02| Process ID 3166
2007/01/30 09:35:02| With 16384 file descriptors available
2007/01/30 09:35:02| DNS Socket created at 0.0.0.0, port 32795, FD 5
2007/01/30 09:35:02| Adding nameserver XXX.XXX.XXX.XXX from /etc/resolv.conf
2007/01/30 09:35:02| helperOpenServers: Starting 5 'ncsa_auth' processes
2007/01/30 09:35:02| User-Agent logging is disabled.
2007/01/30 09:35:02| Unlinkd pipe opened on FD 15
2007/01/30 09:35:02| Swap maxSize 102400 KB, estimated 7876 objects
2007/01/30 09:35:02| Target number of buckets: 393
2007/01/30 09:35:02| Using 8192 Store buckets
2007/01/30 09:35:02| Max Mem size: 8192 KB
2007/01/30 09:35:02| Max Swap size: 102400 KB
2007/01/30 09:35:02| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2007/01/30 09:35:02| Rebuilding storage in /var/spool/squid (DIRTY)
2007/01/30 09:35:02| Using Least Load store dir selection
2007/01/30 09:35:02| Set Current Directory to /var/spool/squid
2007/01/30 09:35:02| Loaded Icons.
2007/01/30 09:35:02| Accepting HTTP connections at 0.0.0.0, port 3128, FD 17.
2007/01/30 09:35:02| Accepting ICP messages at 0.0.0.0, port 3130, FD 18.
2007/01/30 09:35:02| Accepting SNMP messages on port 3401, FD 19.
2007/01/30 09:35:02| WCCP Disabled.
2007/01/30 09:35:02| ipcCreate: /usr/lib/squid/pinger: (2) No such file or directory
2007/01/30 09:35:02| Pinger socket opened on FD 21
2007/01/30 09:35:02| Ready to serve requests.
2007/01/30 09:35:02| Store rebuilding is 47.3% complete
2007/01/30 09:35:02| Done reading /var/spool/squid swaplog (8839 entries)
2007/01/30 09:35:02| Finished rebuilding storage from disk.
2007/01/30 09:35:02| 8523 Entries scanned
2007/01/30 09:35:02| 0 Invalid entries.
2007/01/30 09:35:02| 0 With invalid flags.
2007/01/30 09:35:02| 8521 Objects loaded.
2007/01/30 09:35:02| 0 Objects expired.
2007/01/30 09:35:02| 1 Objects cancelled.
2007/01/30 09:35:02| 314 Duplicate URLs purged.
2007/01/30 09:35:02| 0 Swapfile clashes avoided.
2007/01/30 09:35:02| Took 0.4 seconds (19162.0 objects/sec).
2007/01/30 09:35:02| Beginning Validation Procedure
2007/01/30 09:35:02| Completed Validation Procedure
2007/01/30 09:35:02| Validated 8207 Entries
2007/01/30 09:35:02| store_swap_size = 74832k
2007/01/30 09:35:03| storeLateRelease: released 0 objects
2007/01/30 09:35:03| icmpRecv: recv: (111) Connection refused
2007/01/30 09:35:03| Closing Pinger socket on FD 21

anonymous
()
Ответ на: комментарий от anonymous

Интернет не работает. После этого перезапускаю его вручную:

2007/01/30 09:46:36| Preparing for shutdown after 314 requests 2007/01/30 09:46:36| Waiting 30 seconds for active connections to finish 2007/01/30 09:46:36| FD 17 Closing HTTP connection 2007/01/30 09:46:36| Starting Squid Cache version 2.5.STABLE10 for i586-alt-linux-gnu... 2007/01/30 09:46:36| Process ID 3485 2007/01/30 09:46:36| With 16384 file descriptors available 2007/01/30 09:46:36| DNS Socket created at 0.0.0.0, port 32833, FD 5 2007/01/30 09:46:36| Adding nameserver XXX.XXX.XXX.XXX from /etc/resolv.conf 2007/01/30 09:46:36| helperOpenServers: Starting 5 'ncsa_auth' processes 2007/01/30 09:46:36| User-Agent logging is disabled. 2007/01/30 09:46:36| Unlinkd pipe opened on FD 15 2007/01/30 09:46:36| Swap maxSize 102400 KB, estimated 7876 objects 2007/01/30 09:46:36| Target number of buckets: 393 2007/01/30 09:46:36| Using 8192 Store buckets 2007/01/30 09:46:36| Max Mem size: 8192 KB 2007/01/30 09:46:36| Max Swap size: 102400 KB 2007/01/30 09:46:36| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec 2007/01/30 09:46:36| Rebuilding storage in /var/spool/squid (DIRTY) 2007/01/30 09:46:36| Using Least Load store dir selection 2007/01/30 09:46:36| Set Current Directory to /var/spool/squid 2007/01/30 09:46:36| Loaded Icons. 2007/01/30 09:46:37| Accepting HTTP connections at 0.0.0.0, port 3128, FD 17. 2007/01/30 09:46:37| Accepting ICP messages at 0.0.0.0, port 3130, FD 18. 2007/01/30 09:46:37| Accepting SNMP messages on port 3401, FD 19. 2007/01/30 09:46:37| WCCP Disabled. 2007/01/30 09:46:37| ipcCreate: /usr/lib/squid/pinger: (2) No such file or directory 2007/01/30 09:46:37| Pinger socket opened on FD 21 2007/01/30 09:46:37| Ready to serve requests. 2007/01/30 09:46:37| Store rebuilding is 47.1% complete 2007/01/30 09:46:37| Done reading /var/spool/squid swaplog (8867 entries) 2007/01/30 09:46:37| Finished rebuilding storage from disk. 2007/01/30 09:46:37| 8547 Entries scanned 2007/01/30 09:46:37| 0 Invalid entries. 2007/01/30 09:46:37| 0 With invalid flags. 2007/01/30 09:46:37| 8542 Objects loaded. 2007/01/30 09:46:37| 0 Objects expired. 2007/01/30 09:46:37| 5 Objects cancelled. 2007/01/30 09:46:37| 315 Duplicate URLs purged. 2007/01/30 09:46:37| 0 Swapfile clashes avoided. 2007/01/30 09:46:37| Took 0.3 seconds (27346.7 objects/sec). 2007/01/30 09:46:37| Beginning Validation Procedure 2007/01/30 09:46:37| Completed Validation Procedure 2007/01/30 09:46:37| Validated 8227 Entries 2007/01/30 09:46:37| store_swap_size = 75028k 2007/01/30 09:46:37| storeLateRelease: released 0 objects 2007/01/30 09:46:38| icmpRecv: recv: (111) Connection refused 2007/01/30 09:46:38| Closing Pinger socket on FD 21

После этого всё работает.

anonymous
()
Ответ на: комментарий от anonymous

Интернет не работает. После этого перезапускаю его вручную:

2007/01/30 09:46:36| Preparing for shutdown after 314 requests
2007/01/30 09:46:36| Waiting 30 seconds for active connections to finish
2007/01/30 09:46:36| FD 17 Closing HTTP connection
2007/01/30 09:46:36| Starting Squid Cache version 2.5.STABLE10 for i586-alt-linux-gnu...
2007/01/30 09:46:36| Process ID 3485
2007/01/30 09:46:36| With 16384 file descriptors available
2007/01/30 09:46:36| DNS Socket created at 0.0.0.0, port 32833, FD 5
2007/01/30 09:46:36| Adding nameserver XXX.XXX.XXX.XXX from /etc/resolv.conf
2007/01/30 09:46:36| helperOpenServers: Starting 5 'ncsa_auth' processes
2007/01/30 09:46:36| User-Agent logging is disabled.
2007/01/30 09:46:36| Unlinkd pipe opened on FD 15
2007/01/30 09:46:36| Swap maxSize 102400 KB, estimated 7876 objects
2007/01/30 09:46:36| Target number of buckets: 393
2007/01/30 09:46:36| Using 8192 Store buckets
2007/01/30 09:46:36| Max Mem size: 8192 KB
2007/01/30 09:46:36| Max Swap size: 102400 KB
2007/01/30 09:46:36| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2007/01/30 09:46:36| Rebuilding storage in /var/spool/squid (DIRTY)
2007/01/30 09:46:36| Using Least Load store dir selection
2007/01/30 09:46:36| Set Current Directory to /var/spool/squid
2007/01/30 09:46:36| Loaded Icons.
2007/01/30 09:46:37| Accepting HTTP connections at 0.0.0.0, port 3128, FD 17.
2007/01/30 09:46:37| Accepting ICP messages at 0.0.0.0, port 3130, FD 18.
2007/01/30 09:46:37| Accepting SNMP messages on port 3401, FD 19.
2007/01/30 09:46:37| WCCP Disabled.
2007/01/30 09:46:37| ipcCreate: /usr/lib/squid/pinger: (2) No such file or directory
2007/01/30 09:46:37| Pinger socket opened on FD 21
2007/01/30 09:46:37| Ready to serve requests.
2007/01/30 09:46:37| Store rebuilding is 47.1% complete
2007/01/30 09:46:37| Done reading /var/spool/squid swaplog (8867 entries)
2007/01/30 09:46:37| Finished rebuilding storage from disk.
2007/01/30 09:46:37| 8547 Entries scanned
2007/01/30 09:46:37| 0 Invalid entries.
2007/01/30 09:46:37| 0 With invalid flags.
2007/01/30 09:46:37| 8542 Objects loaded.
2007/01/30 09:46:37| 0 Objects expired.
2007/01/30 09:46:37| 5 Objects cancelled.
2007/01/30 09:46:37| 315 Duplicate URLs purged.
2007/01/30 09:46:37| 0 Swapfile clashes avoided.
2007/01/30 09:46:37| Took 0.3 seconds (27346.7 objects/sec).
2007/01/30 09:46:37| Beginning Validation Procedure
2007/01/30 09:46:37| Completed Validation Procedure
2007/01/30 09:46:37| Validated 8227 Entries
2007/01/30 09:46:37| store_swap_size = 75028k
2007/01/30 09:46:37| storeLateRelease: released 0 objects
2007/01/30 09:46:38| icmpRecv: recv: (111) Connection refused
2007/01/30 09:46:38| Closing Pinger socket on FD 21

После этого всё работает.

anonymous
()
Ответ на: комментарий от anonymous

Вот это я сам сегодня пытался узнать, но немогу пока вычленить это - там дата-время в неудобном формате. Поставил в конфиге опцию emulate_httpd_log on, чтобы время в нормальном виде было, так что завтра утром скажу.

anonymous
()
Ответ на: комментарий от anonymous

а чего там вычленять? обратись на определенный сайт, например, www.sony-europe.com, а затем найди эту строчку в логе.

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.