免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3753 | 回复: 2
打印 上一主题 下一主题

[proxy] 奇怪问题,squid显示启动失败,但是进程已经启动,可是使用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-06-24 16:39 |只看该作者 |倒序浏览
本帖最后由 navywang 于 2010-07-01 15:39 编辑

请教各位:
        目前配置squid服务器。出现问题如下:

参考文档http://redking.blog.51cto.com/27212/146981
squid.conf配置文档一致


[root@squid ~]# service squid restart
Stopping squid:                                            [FAILED]
Starting squid: ....................                       [FAILED]
[root@squid ~]# service squid restart
Stopping squid:                                            [  OK  ]
Starting squid: ....................                       [FAILED]
[root@squid ~]# ps -ef | squid
2010/06/25 00:31:41| Squid is already running!  Process ID 4061

此时测试上网可以实现,请教该如何处理

[root@squid ~]# tail /var/log/messages
Jun 24 20:12:36 squid squid[3526]: Squid Parent: child process 3528 started
Jun 24 20:20:13 squid : error getting update info: Cannot find a valid baseurl for repo: addons
Jun 24 21:20:14 squid : error getting update info: Cannot find a valid baseurl for repo: addons
Jun 24 22:20:13 squid : error getting update info: Cannot find a valid baseurl for repo: addons
Jun 24 23:20:18 squid : error getting update info: Cannot find a valid baseurl for repo: addons
Jun 25 00:20:15 squid : error getting update info: Cannot find a valid baseurl for repo: addons
Jun 25 00:29:12 squid squid[3526]: Squid Parent: child process 3528 exited with status 0
Jun 25 00:30:04 squid squid[4018]: Squid Parent: child process 4020 started
Jun 25 00:30:29 squid squid[4018]: Squid Parent: child process 4020 exited with status 0
Jun 25 00:30:30 squid squid[4058]: Squid Parent: child process 4061 started
[root@squid ~]#


[root@squid ~]# cat /etc/squid/squid.conf
http_port 3128 transparent
udp_incoming_address 0.0.0.0
cache_mem 128 MB
cache_dir ufs /usr/local/squid/cache 128 16 256
access_log /usr/local/squid/var/logs/access.log
cache_log /usr/local/squid/var/logs/cache.log
cache_store_log none
emulate_httpd_log on
pid_filename /usr/local/squid/var/logs/squid.pid
acl all src 0.0.0.0/0.0.0.0
acl mynet src 192.168.0.0/255.255.255.0  
http_access allow mynet
http_access deny all
cache_effective_user squidadmin
cache_effective_group squidadmin
visible_hostname 192.168.0.1
half_closed_clients off
cache_swap_low 80
cache_swap_high 100
maximum_object_size 1024 KB
[root@squid ~]#

[root@squid ~]# squid -k parse
[root@squid ~]#

[root@squid logs]# cat access.log
192.168.0.2 - - [29/Jun/2010:00:06:44 +0800] "GET http://10.0.0.2/ HTTP/1.1" 304 273 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET http://10.0.0.2/extmail/cgi/index.cgi HTTP/1.1" 200 9285 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET http://10.0.0.2/extmail/default/css/login.css HTTP/1.1" 304 275 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET http://10.0.0.2/extmail/default/js/common.js HTTP/1.1" 304 275 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET http://10.0.0.2/extmail/default/js/menu.js HTTP/1.1" 304 275 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET HTTP/1.1" 304 274 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET HTTP/1.1" 304 275 TCP_MISSIRECT
192.168.0.2 - - [29/Jun/2010:00:06:46 +0800] "GET HTTP/1.1" 304 272 TCP_MISSIRECT



[root@squid logs]# ps ax | grep squid
2382 ?        Ss     0:03 avahi-daemon: running [squid.local]
3360 ?        Ss     0:00 squid -D
3362 ?        S      0:00 (squid) -D
3401 pts/0    R+     0:00 grep squid
[root@squid logs]#

[root@squid logs]# cat /usr/local/squid/var/logs/squid.pid
3362
[root@squid logs]# 2010/07/01 22:13:19| Preparing for shutdown after 10 requests
2010/07/01 22:13:19| Waiting 30 seconds for active connections to finish
2010/07/01 22:13:19| FD 12 Closing HTTP connection
2010/07/01 22:13:19| Shutting down...
2010/07/01 22:13:19| FD 13 Closing ICP connection
2010/07/01 22:13:19| Closing unlinkd pipe on FD 11
2010/07/01 22:13:19| storeDirWriteCleanLogs: Starting...
2010/07/01 22:13:19|   Finished.  Wrote 0 entries.
2010/07/01 22:13:19|   Took 0.0 seconds (   0.0 entries/sec).
CPU Usage: 0.328 seconds = 0.037 user + 0.291 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        total space in arena:    2540 KB
        Ordinary blocks:         2477 KB     17 blks
        Small blocks:               0 KB      6 blks
        Holding blocks:           244 KB      1 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:      62 KB
        Total in use:            2721 KB 98%
        Total free:                62 KB 2%
2010/07/01 22:13:19| Squid Cache (Version 2.6.STABLE21): Exiting normally.
2010/07/01 22:13:19| Starting Squid Cache version 2.6.STABLE21 for i686-redhat-linux-gnu...
2010/07/01 22:13:19| Process ID 2778
2010/07/01 22:13:19| With 1024 file descriptors available
2010/07/01 22:13:19| Using epoll for the IO loop
2010/07/01 22:13:19| DNS Socket created at 0.0.0.0, port 41638, FD 6
2010/07/01 22:13:19| Adding nameserver 10.0.0.2 from squid.conf
2010/07/01 22:13:19| User-Agent logging is disabled.
2010/07/01 22:13:19| Referer logging is disabled.
2010/07/01 22:13:19| Unlinkd pipe opened on FD 11
2010/07/01 22:13:19| Swap maxSize 32768 + 8192 KB, estimated 0 objects
2010/07/01 22:13:19| Target number of buckets: 157
2010/07/01 22:13:19| Using 8192 Store buckets
2010/07/01 22:13:19| Max Mem  size: 8192 KB
2010/07/01 22:13:19| Max Swap size: 32768 KB
2010/07/01 22:13:19| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2010/07/01 22:13:19| Store logging disabled
2010/07/01 22:13:19| Rebuilding storage in /usr/local/squid/cache (CLEAN)
2010/07/01 22:13:19| Using Least Load store dir selection
2010/07/01 22:13:19| Current Directory is /
2010/07/01 22:13:19| Loaded Icons.
2010/07/01 22:13:20| Accepting transparently proxied HTTP connections at 0.0.0.0, port 3128, FD 12.
2010/07/01 22:13:20| Accepting ICP messages at 0.0.0.0, port 3130, FD 13.
2010/07/01 22:13:20| WCCP Disabled.
2010/07/01 22:13:20| Ready to serve requests.
2010/07/01 22:13:20| Done reading /usr/local/squid/cache swaplog (0 entries)
2010/07/01 22:13:20| Finished rebuilding storage from disk.
2010/07/01 22:13:20|         0 Entries scanned
2010/07/01 22:13:20|         0 Invalid entries.
2010/07/01 22:13:20|         0 With invalid flags.
2010/07/01 22:13:20|         0 Objects loaded.
2010/07/01 22:13:20|         0 Objects expired.
2010/07/01 22:13:20|         0 Objects cancelled.
2010/07/01 22:13:20|         0 Duplicate URLs purged.
2010/07/01 22:13:20|         0 Swapfile clashes avoided.
2010/07/01 22:13:20|   Took 0.4 seconds (   0.0 objects/sec).
2010/07/01 22:13:20| Beginning Validation Procedure
2010/07/01 22:13:20|   Completed Validation Procedure
2010/07/01 22:13:20|   Validated 0 Entries
2010/07/01 22:13:20|   store_swap_size = 0k
2010/07/01 22:13:20| storeLateRelease: released 0 objects





需要解决问题

[root@squid logs]# service squid restart
Stopping squid:                                            [  OK  ]
Starting squid: ....................                       [FAILED]
[root@squid logs]#

论坛徽章:
0
2 [报告]
发表于 2010-06-25 09:11 |只看该作者
配置文件错误。

论坛徽章:
0
3 [报告]
发表于 2010-06-25 09:43 |只看该作者
看下cache_log
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP