Quantcast

Need help. Squid won't start

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Need help. Squid won't start

Nick Lehman
Aaarrgh! I've been working on getting a squid box up and running
(2.6_STABLE19) and using squidguard as a redirect program.  I haven't
even been able to t-shoot squidguard yet as I can't even get Squid to
start.  It fails to start no matter what.  My config is a pretty
simple one.  Default ACLs and default listen port.  When I try to
start, it first told me that I needed a visibile_hostname parameter.
Weird, because as I understand it... This is an optional field.  So I
added a hostname and tried to start squid again.  It hangs for a while
then says it's a no go.  I do a debug on the startup and below is the
info I get.  What am I doing wrong?

Thanks in advance for the help.

-Nick

System specs:

FC8 i386
Squid 2.6_STABLE19
SquidGuard 1.3

Debug:


2008/06/29 09:05:25| Starting Squid Cache version 2.6.STABLE19 for
i386-redhat-linux-gnu...
2008/06/29 09:05:25| Process ID 15585
2008/06/29 09:05:25| With 1024 file descriptors available
2008/06/29 09:05:25| Using epoll for the IO loop
2008/06/29 09:05:25| Performing DNS Tests...
2008/06/29 09:05:25| Successful DNS name lookup tests...
2008/06/29 09:05:25| DNS Socket created at 0.0.0.0, port 56017, FD 8
2008/06/29 09:05:25| Adding domain emasterlink.com from /etc/resolv.conf
2008/06/29 09:05:25| Adding nameserver 192.168.1.40 from /etc/resolv.conf
2008/06/29 09:05:25| Adding nameserver 192.168.1.29 from /etc/resolv.conf
2008/06/29 09:05:25| helperOpenServers: Starting 4 'squidGuard' processes
2008/06/29 09:05:25| User-Agent logging is disabled.
2008/06/29 09:05:25| Referer logging is disabled.
2008/06/29 09:05:25| Unlinkd pipe opened on FD 16
2008/06/29 09:05:25| Swap maxSize 102400 KB, estimated 7876 objects
2008/06/29 09:05:25| Target number of buckets: 393
2008/06/29 09:05:25| Using 8192 Store buckets
2008/06/29 09:05:25| Max Mem  size: 8192 KB
2008/06/29 09:05:25| Max Swap size: 102400 KB
2008/06/29 09:05:25| Local cache digest enabled; rebuild/rewrite every
3600/3600 sec
2008/06/29 09:05:25| /var/spool/squid/swap.state: (13) Permission denied
FATAL: storeUfsDirOpenSwapLog: Failed to open swap log.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help. Squid won't start

Amos Jeffries
Administrator
Nick Lehman wrote:
> Aaarrgh! I've been working on getting a squid box up and running
> (2.6_STABLE19) and using squidguard as a redirect program.  I haven't
> even been able to t-shoot squidguard yet as I can't even get Squid to
> start.  It fails to start no matter what.  My config is a pretty
> simple one.  Default ACLs and default listen port.  When I try to
> start, it first told me that I needed a visibile_hostname parameter.
> Weird, because as I understand it... This is an optional field.

optional only if DNS is working properly. If a DNS failure or kernel
hostname lookup occurs during startup, this be seen.

>  So I
> added a hostname and tried to start squid again.  It hangs for a while
> then says it's a no go.  I do a debug on the startup and below is the
> info I get.  What am I doing wrong?
>
> Thanks in advance for the help.
>
> -Nick
>
> System specs:
>
> FC8 i386
> Squid 2.6_STABLE19
> SquidGuard 1.3
>
> Debug:
>
<snip>
> 2008/06/29 09:05:25| /var/spool/squid/swap.state: (13) Permission denied
> FATAL: storeUfsDirOpenSwapLog: Failed to open swap log.

Here's a few avenues of attack that error implies:

- is the file system full or nearly full?

- are you starting squid as root and letting it do its own permissions
properly?

- does the new squid have the same user/group privileges as the old one?

- do the swap.state file and associated caches have the right user/group
permissions for squid?

Amos
--
Please use Squid 2.7.STABLE3 or 3.0.STABLE7
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help. Squid won't start

Nick Lehman
I figured out what was happening.  I ended up doing a chown to the
squid user on those files.  Now I'm having another issue.  None of the
sites that I have blacklists for under squidguard are being blocked.
I see the 4 processes running along side squid, but nothing is being
block.  Even the expression filters in the squid config are being
ignored.

On Sun, Jun 29, 2008 at 9:51 AM, Amos Jeffries <[hidden email]> wrote:

> Nick Lehman wrote:
>>
>> Aaarrgh! I've been working on getting a squid box up and running
>> (2.6_STABLE19) and using squidguard as a redirect program.  I haven't
>> even been able to t-shoot squidguard yet as I can't even get Squid to
>> start.  It fails to start no matter what.  My config is a pretty
>> simple one.  Default ACLs and default listen port.  When I try to
>> start, it first told me that I needed a visibile_hostname parameter.
>> Weird, because as I understand it... This is an optional field.
>
> optional only if DNS is working properly. If a DNS failure or kernel
> hostname lookup occurs during startup, this be seen.
>
>>  So I
>> added a hostname and tried to start squid again.  It hangs for a while
>> then says it's a no go.  I do a debug on the startup and below is the
>> info I get.  What am I doing wrong?
>>
>> Thanks in advance for the help.
>>
>> -Nick
>>
>> System specs:
>>
>> FC8 i386
>> Squid 2.6_STABLE19
>> SquidGuard 1.3
>>
>> Debug:
>>
> <snip>
>>
>> 2008/06/29 09:05:25| /var/spool/squid/swap.state: (13) Permission denied
>> FATAL: storeUfsDirOpenSwapLog: Failed to open swap log.
>
> Here's a few avenues of attack that error implies:
>
> - is the file system full or nearly full?
>
> - are you starting squid as root and letting it do its own permissions
> properly?
>
> - does the new squid have the same user/group privileges as the old one?
>
> - do the swap.state file and associated caches have the right user/group
> permissions for squid?
>
> Amos
> --
> Please use Squid 2.7.STABLE3 or 3.0.STABLE7
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help. Squid won't start

Henrik Nordström
On sön, 2008-06-29 at 10:15 -0500, Nick Lehman wrote:
> I figured out what was happening.  I ended up doing a chown to the
> squid user on those files.  Now I'm having another issue.  None of the
> sites that I have blacklists for under squidguard are being blocked.
> I see the 4 processes running along side squid, but nothing is being
> block.  Even the expression filters in the squid config are being
> ignored.

Usually it's for the same reasons, permission issues. If SquidGuard
detects a proble with it's configuration it enters passthru mode letting
all requests pass..

Check your cache.log, at around the time where Squid starts SquidGuard..

And doublecheck that your cache_effective_user has read permission on
the SquidGuard configuration data.

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help. Squid won't start

Nick Lehman
On Sun, Jun 29, 2008 at 3:27 PM, Henrik Nordstrom
<[hidden email]> wrote:

> On sön, 2008-06-29 at 10:15 -0500, Nick Lehman wrote:
>> I figured out what was happening.  I ended up doing a chown to the
>> squid user on those files.  Now I'm having another issue.  None of the
>> sites that I have blacklists for under squidguard are being blocked.
>> I see the 4 processes running along side squid, but nothing is being
>> block.  Even the expression filters in the squid config are being
>> ignored.
>
> Usually it's for the same reasons, permission issues. If SquidGuard
> detects a proble with it's configuration it enters passthru mode letting
> all requests pass..
>
> Check your cache.log, at around the time where Squid starts SquidGuard..
>
> And doublecheck that your cache_effective_user has read permission on
> the SquidGuard configuration data.
>
> Regards
> Henrik
>

Still no luck.  I checked everything (cache log doesn't get created)
and it's all accessible.  the contents of the squidGuard directories
are owned by the squid user.  I'm at a point now where I get "proxy
refusing connections"  I notice that squid starts and then shortly
there after stops.  Did a -X and it appears to have taken the config.
I'm out of ideas.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help. Squid won't start

Nick Lehman
Scratch that, back to square two.  Squid and the squidguard processes
are running.  Proxy is accepting connections, but nothing is being
blocked.  From what I've read on the url_redirect_program command,
squidGuard should take over on all filtering and ignore the squid
config.  All squid will do is pass the traffic to squidGuard and that
is that.  So, I'm thinking that the config in squid is correct, but
something may be wrong with the squidGuard config.  Am I barking up
the wrong tree here?

-Nick

On Sun, Jul 6, 2008 at 9:08 AM, Nick Lehman <[hidden email]> wrote:

> On Sun, Jun 29, 2008 at 3:27 PM, Henrik Nordstrom
> <[hidden email]> wrote:
>> On sön, 2008-06-29 at 10:15 -0500, Nick Lehman wrote:
>>> I figured out what was happening.  I ended up doing a chown to the
>>> squid user on those files.  Now I'm having another issue.  None of the
>>> sites that I have blacklists for under squidguard are being blocked.
>>> I see the 4 processes running along side squid, but nothing is being
>>> block.  Even the expression filters in the squid config are being
>>> ignored.
>>
>> Usually it's for the same reasons, permission issues. If SquidGuard
>> detects a proble with it's configuration it enters passthru mode letting
>> all requests pass..
>>
>> Check your cache.log, at around the time where Squid starts SquidGuard..
>>
>> And doublecheck that your cache_effective_user has read permission on
>> the SquidGuard configuration data.
>>
>> Regards
>> Henrik
>>
>
> Still no luck.  I checked everything (cache log doesn't get created)
> and it's all accessible.  the contents of the squidGuard directories
> are owned by the squid user.  I'm at a point now where I get "proxy
> refusing connections"  I notice that squid starts and then shortly
> there after stops.  Did a -X and it appears to have taken the config.
> I'm out of ideas.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help. Squid won't start

Henrik Nordström
On sön, 2008-07-06 at 09:33 -0500, Nick Lehman wrote:
> is that.  So, I'm thinking that the config in squid is correct, but
> something may be wrong with the squidGuard config.  Am I barking up
> the wrong tree here?

That's the usual situation when seeing this.

And almost always there is some message in cache.log from squidguard
telling what is wrong..

Trying to start squidguard manually as your cache_effective_user is also
a very good test. Just log in as your cache_effective_user (using sudo
or su) and try to run the url_rewrite_program command line from the
shell. It should start without any warnings or errors.

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Loading...