Legacy Forums => Experienced User Forum => Topic started by: Gaetan on June 23, 2003, 12:39:15 AM
Title: Squid Problem
Post by: Gaetan on June 23, 2003, 12:39:15 AM
Hi,
A few days ago, the hard drive of my e-smith server went full.After clearing it, when rebooting the server, I started to get funny message when loading the SQUID service. Now, from the prompt (root), when I try to run "squid -k shutdown", I get the following message (below). Can someone explain the problem ? How can I sort it out ?
Cheers
Gaetan
[root@e-smith /root]# squid -k shutdown 2003/06/22 20:34:20| parseConfigFile: line 19 unrecognized: 'Program fragment at line 1 delivered error Can't locate esmith/DB/db.pm in @INC (@INC contains: / usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6 .0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .)''' 2003/06/22 20:34:20| parseConfigFile: line 41 unrecognized: 'Program fragment at line 1 delivered error Can't locate esmith/DB/db.pm in @INC (@INC contains: / usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6 .0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .)''' 2003/06/22 20:34:20| parseConfigFile: line 43 unrecognized: '2003/06/22 20:34:20| parseConfigFile: line 113 unrecognized: '$strThisFileName = "index.php";' 2003/06/22 20:34:20| parseConfigFile: line 114 unrecognized: '$strThisDirectoryP ath = $REQUEST_URI;' 2003/06/22 20:34:20| parseConfigFile: line 116 unrecognized: '$strThisServerName = $SERVER_NAME;' 2003/06/22 20:34:20| parseConfigFile: line 118 unrecognized: '$strThisPageFilesD ir = "/images/indexerfiles/";' 2003/06/22 20:34:20| parseConfigFile: line 120 unrecognized: '$strThisPageCssFil e= $strThisPageFilesDir ."dirindexer.css";' 2003/06/22 20:34:20| parseConfigFile: line 122 unrecognized: '$arrFileImgProps = array('filepath' => $strThisPageFilesDir ."file.gif", 'height' => '13', 'width' => '13');' 2003/06/22 20:34:20| parseConfigFile: line 123 unrecognized: '$arrDirImageProps = array('filepath' => $strThisPageFilesDir ."dir.gif", 'height' => '13', 'width' => '13');' 2003/06/22 20:34:20| parseConfigFile: line 124 unrecognized: '$arrBulletImgs = a rray('fileImg' => $arrFileImgProps, 'dirImg' => $arrDirImageProps);' 2003/06/22 20:34:20| parseConfigFile: line 136 unrecognized: '$arrDontListFiles = array($strThisFileName, $arrBulletImgs['dirImg']['filepath'], $arrBulletImgs[' fileImg']['filepath'], $strThisPageCssFile);' 2003/06/22 20:34:20| parseConfigFile: line 137 unrecognized: '$arrDontListDirs = array($strThisPageFilesDir , "cgi-bin", "indexerfiles");' 2003/06/22 20:34:20| parseConfigFile: line 191 unrecognized: '$arrDontListFilesE xts = array();' 2003/06/22 20:34:20| parseConfigFile: line 192 unrecognized: '$arrListOnlyFilesE xts = array();' 2003/06/22 20:34:20| parseConfigFile: line 199 unrecognized: '$intShowSubdirs = 1;' 2003/06/22 20:34:20| parseConfigFile: line 204 unrecognized: 'function getThisDi rName($strUrl)' 2003/06/22 20:34:20| parseConfigFile: line 205 unrecognized: 'Program fragment a t line 163 delivered error Undefined subroutine &esmith::__TEMPLATE__::1::strr pos called''' 2003/06/22 20:34:20| parseConfigFile: line 212 unrecognized: 'function isort($st rA,$strB)' 2003/06/22 20:34:20| parseConfigFile: line 213 unrecognized: 'Program fragment a t line 180 delivered error syntax error''' 2003/06/22 20:34:20| parseConfigFile: line 215 unrecognized: 'function isortMult iD($strA,$strB)' 2003/06/22 20:34:20| parseConfigFile: line 216 unrecognized: 'Program fragment a t line 200 delivered error syntax error''' 2003/06/22 20:34:20| parseConfigFile: line 218 unrecognized: 'function indexdirT hisDir()' 2003/06/22 20:34:20| parseConfigFile: line 219 unrecognized: 'Program fragment a t line 217 delivered error Not enough arguments for opendir''' 2003/06/22 20:34:20| parseConfigFile: line 221 unrecognized: '$thisDirName = get ThisDirName($strThisDirectoryPath);' 2003/06/22 20:34:20| parseConfigFile: line 222 unrecognized: '$strListingHTMLstr ing = indexdirThisDir();' 2003/06/22 20:34:20| parseConfigFile: line 224 unrecognized: 'header("Content-ty pe: text/html");' 2003/06/22 20:34:20| parseConfigFile: line 226 unrecognized: 'print ('' 2003/06/22 20:34:20| parseConfigFile: line 227 unrecognized: 'LIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-s trict.dtd">' 2003/06/22 20:34:20| parseConfigFile: line 228 unrecognized: '' 2003/06/22 20:34:20| parseConfigFile: line 229 unrecognized: '' 2003/06/22 20:34:20| parseConfigFile: line 230 unrecognized: '' 2003/06/22 20:34:20| parseConfigFile: line 231 unrecognized: 'index of '. $thisDirName.'' 2003/06/22 20:34:20| parseConfigFile: line 232 unrecognized: '' 2003/06/22 20:34:20| parseConfigFile: line 233 unrecognized: '' 2003/06/22 20:34:20| parseConfigFile: line 235 unrecognized: ' ' 2003/06/22 20:34:20| parseConfigFile: line 236 unrecognized: '
Tech-Geeks.Org :Contrib Area
' 2003/06/22 20:34:20| parseConfigFile: line 237 unrecognized: '
'.$thisDirName .'
' 2003/06/22 20:34:20| parseConfigFile: line 238 unrecognized: 'Up O ne Level ' 2003/06/22 20:34:20| parseConfigFile: line 239 unrecognized: ''.$strListingHTMLs tring.'' 2003/06/22 20:34:20| parseConfigFile: line 241 unrecognized: '
You need to track it down, and delete it. Then expand the squid template (/sbin/e-smith/expand-template /etc/squid/squid.conf) and restart squid (service squid restart)
Title: Re: Squid Problem
Post by: Gaetan on June 25, 2003, 03:36:03 PM
Hi,
Thanks for your reply. I have found a index.php file in the '/etc/e-smith/templates-custom/etc/squid/squid.conf' directory.
I then run '/sbin/e-smith/expand-template /etc/squid/squid' Then, run 'service squid stop' and get the following message:
[root@e-smith templates-custom]# service squid stop Stopping squid: 2003/06/25 11:33:07| parseConfigFile: line 19 unrecognized: 'Program fragment at line 1 delivered error Can't locate esmith/DB/db.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .)''' 2003/06/25 11:33:07| parseConfigFile: line 41 unrecognized: 'Program fragment at line 1 delivered error Can't locate esmith/DB/db.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .)''' ............. [ OK ] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I then type 'service squid start', I get the following:
Starting squid: [ OK ]
Question: What's wrong when the service is being stopped ?
Cheers
Gaetan
Title: Re: Squid Problem
Post by: Abe Loveless on June 25, 2003, 06:30:52 PM
I'm guessing that it failed on stop, because it never got started correctly... due to the errors.
Let me know.
Title: Re: Squid Problem
Post by: Gaetan on June 25, 2003, 07:28:11 PM
Hi,
Yes I did: "rm /etc/e-smith/templates-custom/etc/squid/squid.conf/index.php"
I have tried to run again "service squid stop". The service gets stopped but I still get funny message before it:
[root@e-smith squid.conf]# service squid stop Stopping squid: 2003/06/25 15:15:16| parseConfigFile: line 19 unrecognized: 'Pro gram fragment at line 1 delivered error Can't locate esmith/DB/db.pm in @INC ( @INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/per l5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site _perl .)''' 2003/06/25 15:15:16| parseConfigFile: line 41 unrecognized: 'Program fragment at line 1 delivered error Can't locate esmith/DB/db.pm in @INC (@INC contains: / usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6 .0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .)''' ................ [ OK ]
Then, Squid will restart well with "service squid start" ...
But if I decide to stop it again, the funny messages comes back again ....
Cheers
Gaetan
Title: Re: Squid Problem
Post by: Abe Loveless on June 25, 2003, 07:46:54 PM
Sounds like there is something weird in your squid.conf file.
Could you send me the contents of your squid.conf file?
"mail MY-EMAIL < /etc/squid/squid.conf"
OR, post it here in a reply.
Thanks,
Title: Re: Squid Problem
Post by: Charlie Brady on June 25, 2003, 09:05:36 PM
Gaetan wrote:
> [root@e-smith squid.conf]# service squid stop > Stopping squid: 2003/06/25 15:15:16| parseConfigFile: line 19 > unrecognized: 'Pro > gram fragment at line 1 delivered error Can't locate > esmith/DB/db.pm in @INC ( > @INC contains: /usr/lib/perl5/5.6.0/i386-linux > /usr/lib/perl5/5.6.0 /usr/lib/per > l5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 > /usr/lib/perl5/site > _perl .)'''
You're running an old version. Upgrade.
Charlie
Title: Re: Squid Problem
Post by: Abe Loveless on June 25, 2003, 09:25:45 PM
Got your message, but the message I sent back was rejected... so I'll post it here.
Yep... that's the problem. Those lines must have been added at some point when you expanded the template. Those calls to perl should not end up inside the squid.conf file. I'd go back through the templates-custom/etc/squid/squid.conf directory to make sure the files template fragments look right.
Then expand the template again "/sbin/e-smith/expand-template /etc/squid/squid.conf" and check the squid.conf file to see if those lines are still there.
Let me know, Abe
Title: Re: Squid Problem
Post by: Gaetan on June 27, 2003, 04:20:46 PM
Hi,
I have check the .... There are 2 files in there. Here are the details: FILE = 20ACL40no-cache
{ my @NoCache = (); my $result = ""; my $count = 0;
use esmith::DB::db; my $db = esmith::DB::db->open('/home/e-smith/squidproperties');
if ($db) { my @domains = $db->get_all_by_prop('type' => 'Domain');
foreach my $d (@domains) { my $domain = $d->key; push @NoCache, $domain; $count++; } }
if ($count > 0) { $result .= "\n"; $result .= "#-----------------------------------\n"; $result .= "# Force Direct Connection for Domains \n"; $result .= "# ACL Statements \n"; $result .= "#-----------------------------------\n";