Re: squid can't start, can't bind to port - but lsof says nothing on port
- From: Bennett Haselton <bennett@xxxxxxxxxxxxx>
- Date: Tue, 10 Feb 2009 12:36:15 -0800 (PST)
On Feb 10, 4:09 am, Bennett Haselton <benn...@xxxxxxxxxxxxx> wrote:
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
OK, someone on RentACoder pointed out that SELinux was probably
preventing squid from starting, so I turned selinux off with
"setenforce 0", and they were right, after that, squid was able to
start.
But why on Earth would selinux want to prevent squid from starting?
Also, as far as I know, selinux was enabled on this server for all
these past weeks, and squid was running with no problem. (At least, I
didn't just turn selinux on, and I don't know why the hosting company
would have gone in and done it.) So I don't know why the problem
would have just turned up now.
.
- Follow-Ups:
- Re: squid can't start, can't bind to port - but lsof says nothing on ?port
- From: Chris Davies
- Re: squid can't start, can't bind to port - but lsof says nothing on ?port
- References:
- squid can't start, can't bind to port - but lsof says nothing on port
- From: Bennett Haselton
- squid can't start, can't bind to port - but lsof says nothing on port
- Prev by Date: Re: squid can't start, can't bind to port - but lsof says nothing on port
- Next by Date: Re: NFS mounts and following soft links
- Previous by thread: Re: squid can't start, can't bind to port - but lsof says nothing on port
- Next by thread: Re: squid can't start, can't bind to port - but lsof says nothing on ?port
- Index(es):
Relevant Pages
|