LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-30-2012, 11:02 AM   #1
theIndividualist
LQ Newbie
 
Registered: May 2012
Location: Bedfordshire, UK
Posts: 4

Rep: Reputation: Disabled
squid - incorrect pid in pid file


My first attempt at installing squid - a single instance worked exactly as advertised - when trying to run multiple instances I get incorrect pid numbers in pid files. Squid 3.1 running on CentOS6.2 - (I work in a school, different web filters for different age groups)

exec /usr/sbin/squid -f /etc/squid/squidl.conf
exec /usr/sbin/squid -f /etc/squid/squidm.conf
exec /usr/sbin/squid -f /etc/squid/squids.conf

[root@CentOS62 internet]# service squid status
sed: can't read /etc/squid/squid.conf: No such file or directory
squid (pid 2696 2691 2685) is running...
FATAL: Unable to open configuration file: /etc/squid/squid.conf: (2) No such file or directory

[root@CentOS62 run]# cat squids.pid
2698
[root@CentOS62 run]# cat squidm.pid
2693
[root@CentOS62 run]# cat squidl.pid
2687

Has anyone seen this ?

#
# squidm.conf - Middle School Proxy Port 8082
#
acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

acl myNet src 10.11.96.0/21

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 1433 # Target Tracker

acl CONNECT method CONNECT

http_access allow manager localhost
http_access deny manager

http_access deny !Safe_ports

http_access deny CONNECT !SSL_ports

# http_access deny to_localhost

http_access allow myNet
http_access allow localhost

http_access deny all

http_port 10.11.103.248:8082

hierarchy_stoplist cgi-bin ?

cache_dir ufs /var/spool/squidm 30000 16 256
maximum_object_size 1 GB

coredump_dir /var/spool/squidm

refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

dns_nameservers 10.208.3.11 10.208.3.12
visible_hostname CentOS62m.localdomain
unique_hostname CentOS62m.localdomain
cache_peer 10.208.3.20 parent 8082 0 no-query default no-digest
cache_effective_user squid
cache_effective_group squid
never_direct allow myNet
pid_filename /var/run/squidm.pid
cache_log /var/log/squid/cachem.log
access_log /var/log/squid/accessm.log
 
Old 05-30-2012, 02:41 PM   #2
Kustom42
Senior Member
 
Registered: Mar 2012
Distribution: Red Hat
Posts: 1,604

Rep: Reputation: 415Reputation: 415Reputation: 415Reputation: 415Reputation: 415
Well I imagine the pids you are finding with cat are child processes spawned by the squid parent process. The conf file error is due to it being hard-coded to the /etc/init.d/squid file which is why you are using the -f flag to specify it. I don't really see any issues here.

Do a

Code:
ps -F -p pidnumber
and see if the PPID(Parent Process ID) matches up as I suspect it does.
 
1 members found this post helpful.
Old 05-31-2012, 08:23 AM   #3
theIndividualist
LQ Newbie
 
Registered: May 2012
Location: Bedfordshire, UK
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks, once I knew what was going on, I figured out what I needed to do to get the -k options to work ie
Code:
exec /usr/sbin/squid -f /etc/squid/squidm.conf -k shutdown
Thanks again

Last edited by theIndividualist; 05-31-2012 at 08:41 AM.
 
  


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
(20014)Internal error: Error retrieving pid file /var/run/apache2.pid yuri16 Linux - Server 0 07-28-2009 03:11 AM
reading pid from pid file in C language shifter Programming 1 05-14-2008 10:49 AM
squid dead but pid file exist jatender Linux - Server 2 11-06-2007 10:55 AM
squid dead but pid file exists chenboly Linux - Networking 3 05-31-2007 02:10 PM
ERROR: Couldn't write pid to pid file lawrencegoodman Linux - Newbie 2 02-13-2004 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:00 AM.

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