Re: squid can't start, can't bind to port - but lsof says nothing on port



On Tue, 10 Feb 2009 04:09:55 -0800, Bennett Haselton typed this message:

I have a CentOS 5.2 server that for several weeks has been running squid
on port 9765 with no problem (only accepting requests from certain
external IPs). Some time yesterday it stopped working, and attempts to
start squid now say only:

[root@hostname28043 squid]# service squid start Starting squid:
.................... [FAILED]

The last lines of the cache.log file (whose dates correspond to the last
time I attempted to start squid) say:

2009/02/10 03:48:20| Starting Squid Cache version 2.6.STABLE6 for i686-
redhat-li
nux-gnu...
2009/02/10 03:48:20| Process ID 3306
2009/02/10 03:48:20| With 1024 file descriptors available 2009/02/10
03:48:20| Using epoll for the IO loop 2009/02/10 03:48:20| DNS Socket
created at 0.0.0.0, port 37819, FD 5 2009/02/10 03:48:20| Adding
nameserver 67.19.0.10 from /etc/ resolv.conf
2009/02/10 03:48:20| Adding nameserver 67.19.1.10 from /etc/ resolv.conf
2009/02/10 03:48:20| User-Agent logging is disabled. 2009/02/10
03:48:20| Referer logging is disabled. 2009/02/10 03:48:20| Unlinkd pipe
opened on FD 10 2009/02/10 03:48:20| Swap maxSize 102400 KB, estimated
7876 objects 2009/02/10 03:48:20| Target number of buckets: 393
2009/02/10 03:48:20| Using 8192 Store buckets 2009/02/10 03:48:20| Max
Mem size: 8192 KB 2009/02/10 03:48:20| Max Swap size: 102400 KB
2009/02/10 03:48:20| Local cache digest enabled; rebuild/rewrite every
3600/3600
sec
2009/02/10 03:48:20| Rebuilding storage in /var/spool/squid (DIRTY)
2009/02/10 03:48:20| Using Least Load store dir selection 2009/02/10
03:48:20| Set Current Directory to /var/spool/squid 2009/02/10 03:48:20|
Loaded Icons.
2009/02/10 03:48:20| commBind: Cannot bind socket FD 12 to *:9765: (13)
Permissi
on denied
FATAL: Cannot open HTTP Port
Squid Cache (Version 2.6.STABLE6): Terminated abnormally. CPU Usage:
0.060 seconds = 0.043 user + 0.017 sys Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 2508 KB
Ordinary blocks: 2405 KB 2 blks Small blocks:
0 KB 1 blks Holding blocks: 244 KB 1
blks Free Small blocks: 0 KB
Free Ordinary blocks: 102 KB
Total in use: 2649 KB 96%
Total free: 102 KB 4%


I noted the line "Cannot bind socket FD 12 to *:9765: (13) Permission
denied" and thought maybe some process was already listening on that
port. Following the advice in this article:
http://www.debian-administration.org/articles/184

I ran
lsof -i :9765

but it reports that nothing is listening on port 9765. So, what could
explain what I'm seeing, and how to fix it?

Bennett

Not sure either.

$ sudo service squid stop
$ sudo squid -z
$ sudo service squid start

Also check filesystem free space, ie, free space on /tmp
.