LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   RH9 Squid Problem? (https://www.linuxquestions.org/questions/linux-newbie-8/rh9-squid-problem-90959/)

Arenba 09-09-2003 02:14 PM

RH9 Squid Problem?
 
Hi,
I am a newbie. I had no problems installing and running Squid on RH8. But it doesn't seem to work on RH9.
Reports some problems on a file in /etc/init.d/rc.5 (or something). I checked - naturally, I couldn't make heads or tails of it. I reverted back to RH8.
Can anybody please help? Is it worth shifting over to RH9?
Aka.

browny_amiga 09-18-2003 10:23 AM

I generally though, think that RH9 is better than RH8, old rule:
Never trust a zero version (i.e. 7.0 , 6.0)
I had some funny business with RH8, like odd spaced console fonts, strange characters that you could not recognize etc..
I am using RH9 for almost 4 months now and don't think of switching back a bit.
One thing to mention is that Wine breaks big time on RH9 and I *think* the newest version of it 200309011 fixed it now, but not sure yet.
If you are using wine, don't go to rh9.

Squid works on RH9, had to do my RedHat Certified Engineer on it, that is why I know. I would never use this proxy (or any other) normally...
There is some funny buiness with the format of the access restriction in the config file...

What error do you get exactly?

Arenba 09-18-2003 11:44 PM

Sorry, but I forgot to note down the error message I got. I have to reinstall RH9. (I am back to RH8 again). So I will let you know later on.

I don't use Wine. I am trying not to. :-)

Thanks for the reply. Will get in touch with you soon.

Arenba 09-19-2003 06:47 AM

This is the error message I get when I try to run Squid.
(in RH9 Squid version 2.5.STABLE1)
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 162: 1285 Aborted
$SQUID -z -F -D 2>/dev/null
Starting squid: /etc/init.d/squid: line 162: 1286 Aborted $SQUID $SQUID_OPTS 2>/dev/null

This happened during a standard installation.
When I try to create cache dirs (squid -z) or run squid, it gives this error

FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'
Squid Cache (Version 2.5.STABLE1): Terminated abnormally.
CPU Usage: 0.020 seconds = 0.010 user + 0.010 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 389
Aborted

In RH8 (Squid 2.4.STABLE7), I did not have a problem. I had included Squid (default rpm installation) and it ran well. I wanted to enable delay pools this time. So I tried to manually configure it (was my first compilation, by the way....never ./configure(d) before). Of course, I went through a few documentations before compiling Squid and then tried it. Didn't work.
Then I installed RH9. It gave me the errors shown above. In RH9, I couldn't even get Squid working through a standard default installation (in RH8 it did).
I suspect something wrong in the path configuration. In default installations, squid usually installs itself in /etc/squid, whereas manually, it defaults to /usr/local/squid. So I guess there must be something I missed. (I really tried to work it out and I am exhausted now!!).
Also, are there some specific compilers needed when it is run manually? I don't know, so I just installed the standard compilers (gcc and all that stuff). If somebody can give me a list of all the compilers needed specifically(and maybe its clones), I'd be very grateful.
Now, I don't know what to do. I can switch back to RH8 with the default squid installation (that works). But I really need the "delay pools" feature. So I guess I'll have to hang around for a little while....
:-)

Note: I had chown(ed) all squid-related dirs to squid too. In squid.conf, I set the cache_effective_user & group to squid. I used the default path for logs and cache and also tried using a user-defined path. Zit !!!

Thanks for the interest.:)

Edit:- I had referred to www.tldp.org., howto section (Bandwidth limiting HOWTO)

Arenba 09-20-2003 12:09 AM

Hi Browny_Amiga

Seemed to have finally got it working. I did it in RH8 though using Squid 2.4 STABLE7. There are still some things to be done, basically to add some sort of start up script or something/somewhere. Remember, I am a newbie - I just got on to Linux a couple of weeks back !! But the main .conf file up and working - and believe me it's satisfying !!!!
Now I am feeling sleepy ...........
Thanks a bunch for your interest.

Looking_Lost 09-20-2003 02:33 AM

Not much help now but from memory the visible hostname eror could have gotten round by adding to your conf

visible hostname whatever_name_I_want

and you'd probably have been good to go

dunmarie 09-20-2003 02:40 AM

Hi Arenba,
I am also installing Squid on RH9 and I got exactly the same error you got in post 4. I have tried using "any_name" but with no success. Can you please tell us what you did to fix the problem?
Thanks.

Looking_Lost 09-20-2003 05:40 AM

When I was using it I put

visible_hostname cache.mylan.com

in to squid.conf and added an entry to the /etc/hosts file

192.168.0.2 cache.mylan.com

or whatever, although the host file bit may not be needed as like most things I setup squid just for the experience then once I had satisified myself I could get it going i dumped it. Of course it may not
solve everything but it's a start.

Arenba 09-20-2003 06:23 AM

Hi dunmarie,
Basically, I myself, have to figure out what I did. I tried soooo many things, I lost track of what I did. So I am planning to reinstall it once again.
Also, I used RH8 with Squid 2.4.Stable7(I downloaded it from www.squid-cache.org). The rpm that comes packaged with RH8 is version 2.4.Stable7-4 or so it says). I haven't been able to figure out how to even start it in RH9 with Squid 2.5.Stable1. Another question, do you specifically need to enable delay pools too? I am asking you this because, in RH8, I didn't come across any problems just to have Squid up and running using the standard rpm (without delay pools, that is).
Anyway, I will keep you posted. Right now, I don't want to confuse you (and myself) with more confusing instructions :-). Let me perform another setup and maybe things will be much clearer. Do let me know if you come across anything too.
For reference, I checked out the Bandwidth Limiting document in the howtos section in www.tldp.org
Note: About the "visible_hostname" thing, try connecting to the internet and then starting squid. But, I am not sure. Also try the input "Looking_Lost" just put in. Usually, Squid is supposed to start with the -D option. Have to check that out. Thanks - Looking_Lost :-). Glad to have your inputs on this.

Arenba 09-21-2003 05:18 AM

Hi dunmarie,
This is basically what I did.
I unzipped (or untarred, or whatever) to a tmp dir. From there, I ran this command (all in one line):
./configure --enable-delay-pools --enable-poll --enable-truncate --disable-ident-lookups --enable-removal-policies
You can add a prefix if you want it located in a specific dir of your choice. Squid defaults itself to /usr/local/squid if you don't add it. (I kept it that way).
Then I ran the make all and make install commands.
Next, I edited the squid.conf file in /usr/local/squid/etc/ (in my case, that is)
It all depends on where you want to store logs or the cache.
I changed the cache_mgr to root and cache_effective_user and group to squid.
Next, I chown(ed) all squid dirs to squid, except for the bin dir (under squid. I kept the owner as root only)
Then I chmod(ed) all squid dirs to 770.
Next, I created the cache dirs.
/usr/local/squid/bin/squid -z
To start squid,
/usr/local/squid/bin/squid -D
If you are connected to the internet already, -D is not needed.
To start squid with the -D option everytime we boot the comp., I added this line to the /etc/rc.d/rc.local file
/usr/local/squid/bin/squid -D
Normally, we start or stop squid using the command:
/etc/init.d/squid start (restart etc right??).
It doesn't work here. You have to navigate to /usr/local/squid/bin/ everytime you want to enable squid (and hence that entry in rc.local file). Maybe we have to create a script or something - I don't know.
There are so many things I don't understand. Hopefully, I'll learn more day by day. Linux is a really good system. I have forgotten about Windows for quite a while now :-). Don't forget to go to the site I mentioned in my previous posts. I picked it up from there. An example of squid.conf file is also given.
Good luck - and keep me posted if you come across anything. Right now, I am trying to fine-tune the delay pool thing (confusing little #$%$&*#).
:-)

dunmarie 09-22-2003 02:31 AM

Hi Arenba,
Thanks, just got it to work. My problem was with the visible_hostname. I kept on changing the word "hostname" instead of adding the hostname to the res of the line. I do find Linux sometimes a little confusing in the sense that examples is not clear. What I do like about Linux is that you have much more control than with Windows.
Good luck with your pool delay.
And thanks Looking_Lost, you put me on the right track and there was no need to add anything to /etc/host.

fuseburner 03-15-2006 09:15 AM

visible_hostname yourhost.yourdomain
 
WOW!

you are totally right, a person should write the following:
visible_hostname yourhost.yourdomain

when I put that in, all was cool!


All times are GMT -5. The time now is 09:54 PM.