LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-07-2003, 10:18 AM   #1
lhorstman
LQ Newbie
 
Registered: Jan 2003
Location: Alexandria, VA
Distribution: Slackware
Posts: 5

Rep: Reputation: 0
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
 
Old 10-10-2003, 05:14 AM   #2
simalt
LQ Newbie
 
Registered: Sep 2003
Location: ON Earth!
Distribution: Redhat 9
Posts: 5

Rep: Reputation: 0
Thumbs up 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!
 
Old 10-11-2003, 07:03 AM   #3
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
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"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
azureus torrent behind ADSL router firewall problem kpachopoulos General 2 08-27-2005 01:10 PM
router/firewall install problem jedimastermopar Linux - Networking 1 06-16-2005 11:42 AM
Firewall, SQUID problem plese help me razan Linux - Security 12 04-28-2005 01:51 AM
Mandrake Firewall/router networked to US Robotics 8000A router jrzplace Linux - Networking 0 11-17-2003 04:48 PM
Problem with my router and firewall junk. BmxFace Linux - General 1 11-16-2003 01:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration