LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Router/Firewall w/ Squid problem (https://www.linuxquestions.org/questions/linux-newbie-8/router-firewall-w-squid-problem-40584/)

lhorstman 01-07-2003 10:18 AM

Router/Firewall w/ Squid problem
 
Problem: I am unable to run applications. Specifically Squid.

Background: I am using a rackmount MultiTech RouteFinder which uses Squid. Normally we use an HTML interface to administer it. Recently we had a problem where it was necessary to SSH into it to fix a problem. At that point I had never used Linux before, and am still a complete newb at it. Our problem was that somehow our cache had exploded from an average of 300,000 cached objects to aprox 1.5 million cached objects in several minutes. The proxy basically stopped responding. We had to clear the cache. I was able to follow the FAQ on the Squid site but came across a problem. I am unable to actually run squid: "# squid -k shutdown", "# squid -z" or similar.

Explanation: As the basic user set up by MultiTech I receive this error:
"squid: error in loading shared libraries: libcap.so.1: cannot open shared object file: No such file or directory"

As Root I simply get
"bash: squid: command not found"
I did read that squid cannot be run as root, so that solves that.

I looked at the permissions:
-rwxr-xr-x 1 system system 656524 Nov 2 2001 squid

Thinking that maybe I needed to run the file as system I altered the passwd file to direct me to bash at login, and then used "su system" to log in as system. When attempting to run squid I received the "bash:squid: command not found" error again. So I switched the login path back to false for system.

I thought that perhaps because I was SSH'd into it I was unable to run, so I got a USB keyboard and a monitor and logged on locally, with the same results.

I couldn't find the file "libcap.so.1" which would explain that error, however Squid starts and stops fine from the web interface, so there must be a way to do it from the command line so I can add the switches I need.

I contacted MultiTech tech support concerning the cache problem, who were helpful, but not very knowlegeable with the inner workings of their product. I was put on with an engineer who essentially told me he wouldn't help me because it went too in depth into linux. He proceeded to tell me I could just rm -rf the cache directory, reboot the RouteFinder and it would automatically recreate the directory. It didn't recreate the directory. I told him that if he could help me run squid from the command line, that "# squid -z" was supposed to recreate the cache directories. He refused to help me and essentially left. One of the lower tech support guys eventually ssh'd into the box and created the directories. He said he copied the directories from another RouteFinder. The proxy was working again so I was happy for time being.

I would still like to learn why I cannot run squid from the command line with this product, so that in the future if this happens again I don't have to pull my teeth getting help from MultiTech. Can anyone tell me why I can't run it, and how I can make it run?

I am still a nearly complete newb. I've installed Slackware on a box at home and messed around a bit but am still pretty much clueless, so please give a detailed explanation if you could so I can learn.

Thanks,
-Luke

simalt 10-10-2003 05:14 AM

squid
 
Luke,

I am not sure what exactly is the problem you are having but here is roughly how squid works.

If you have done the installation correctly it creates several files and squid uses the group "nobody" to start by default.

The whole thing is controlled by only one file squid.conf.

If you read this file a lot of the information is understandable while some may not be but it is fairly commented.

You set up through this one file (squid.conf) where you tell it what cache dirs, what log file and where to create them, what network access, what port etc.

Do a search on your system and you should be able to find where the current squid.conf file is usually in /usr/local/squid or in /etc.

Search like find / -name squid.conf

This should return the where abouts of any squid.conf files.

Rename the file before you do any work on it ie copy it cp path/squid.conf path/newfilename.

You can start the squid file taking into consideration cache directories need to be created once.

./squid -z

To start the process in background ./squid -NCd1 &

% /usr/local/squid/sbin/squid -NCd1 & ##same thing but full path to squid file.


There is a script in the squid dir which you can use to start it also and background the process with the & switch, I think it is called RunCache.

To verify all your configs errors you can test it by running

% /usr/local/squid/sbin/squid -k parse


I hope this does explain some if not all of squid.

Regards

Simon

Yeshua is the only truth the lamb of God!

pablob 10-11-2003 07:03 AM

Try some

/etc/init.d/squid stop

The reason for the web interface not failing with the shared libraries is probably because the script starting squid shall include some LD_LIBRARY_PATH which tells squid: "hey, you can look for extra libraries within $LD_LIBRARY_PATH"


All times are GMT -5. The time now is 06:04 PM.