Re: [squid-users] Client Error Cannot Connect

From: Chris Robertson <crobertson@dont-contact.us>
Date: Mon, 03 Dec 2007 15:52:34 -0900

Steve Billig wrote:
> Well I did do a search, but I couldn't figure out what the problem I am
> having could be to actually be solved. I have been seeking help from
>
> Fedoraforum.org <http://fedoraforum.org/>, with a thread link here:
> http://forums.fedoraforum.org/showthread.php?t=173935. I will give a basic
> run-down. So far I had troubles with installing squid, the guy on that forum
> had helped me, told me to go to the squidwiki at
> http://www.deckle.co.za/squid-users-guide/Squid_Configuration_Basics. Well
> not all commands here worked, for example "cache1:~ #
> /usr/local/squid/sbin/squid -N -d 1 -D". I got through most of it and I got
> to the point where I use squidclient http://google/ -p (port) and obviously
> I am getting the error message "client: ERROR: Cannot connect to localhost:
> PORT: Connection refused". But so far nothing. If you need my
> squid.confjust tell me but the port I set above 1024 I think it was. I
> also put the
> cache usernames and all to squid as said in the squidwiki.
>
> Thanks a lot.
>

Considering you installed Squid from an RPM (and not from sources) it's
probably not a good idea to change the cache_effective_user. Your
initialization script (/etc/init.d/squid) is designed to run as root
when the system starts. The cache_effective_user tells squid what user
to switch to after starting. Setting it to a user that doesn't exist on
your system (or just as bad, one that doesn't have the proper
permissions or SELinux security context) is not going to work.

Did you perchance make a backup of the squid.conf before making changes
to it? It might be a good idea to start from scratch. Uninstalling,
and reinstalling would be one method.

Here are the steps in Fedora to get Squid up and running as a forwarding
proxy (assuming you have networking set up already):

Install squid package.
Under "System Settings -> Server Settings -> Services" find the Squid
service and hit the start button.

If that's not successful, in a terminal session type "tail -n 50
/var/log/squid/cache.log" (I think that's where they put it) and see if
you can find anything that looks like an error.

Chris
Received on Mon Dec 03 2007 - 17:53:04 MST

This archive was generated by hypermail pre-2.1.9 : Tue Jan 01 2008 - 12:00:01 MST