Issues with squid startup
I am a new convert from Windows to MacOS X. I have installed squid using Darwinports and installed the plist file: /opt/local/etc/LaunchDaemons/org.macports.Squid/org.macports.Squid.plist But it doesn't start the server properly: unix% ps ugxaww | grep -i squid root 35 0.0 -0.0 27832 328 ?? Ss Wed07AM 0:00.01 /opt/local/bin/daemondo --label=Squid --start-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper restart ; --pid=none No squid process ever starts. I can (and do) start it by hand with "sudo /opt/local/sbin/squid" because I need a local cache. But I haven't been able to find anything on this list or in google about how to fix it not starting from launchd. Does anyone have any hints for me? I am sorry if this is a repeat question, I tried to search for the answer. Risner
James Risner <risner@stdio.com> on Thursday, November 23, 2006 at 9:51 PM -0800 wrote:
I have installed squid using Darwinports and installed the plist file: /opt/local/etc/LaunchDaemons/org.macports.Squid/org.macports.Squid.plist
But it doesn't start the server properly:
unix% ps ugxaww | grep -i squid root 35 0.0 -0.0 27832 328 ?? Ss Wed07AM 0:00.01 /opt/local/bin/daemondo --label=Squid --start-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper restart ; --pid=none
No squid process ever starts. I can (and do) start it by hand with "sudo /opt/local/sbin/squid" because I need a local cache. But I haven't been able to find anything on this list or in google about how to fix it not starting from launchd. Does anyone have any hints for me?
I am sorry if this is a repeat question, I tried to search for the answer.
Surely the "tsu" command is a typo and "su" was meant in the startupitems section of the portfile. But in general, to trouble shoot problems like this, try doing manually the steps the portfile defines and see where the problem is. cd to /opt/local/var/squid Is /opt/local/var/squid/cache/00 present? then tsu -fm squid -c "exec /opt/local/sbin/squid -s -z" else su -fm squid -c "exec /opt/local/sbin/squid -s" If tsu is a type then the portfile startupitems section can be corrected so let us know. Or until then, correct that error in the wrapper file generated from the portfile. Mark startupitem.start \ "cd ${prefix}/var/squid" \ "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \ "\tsu -fm squid -c \"exec ${prefix}/sbin/squid -s -z\"" \ "fi" \ "su -fm squid -c \"exec ${prefix}/sbin/squid -s\"" startupitem.stop \ "cd ${prefix}/var/squid" \ "su -fm squid -c \"exec ${prefix}/sbin/squid -k kill\""
On Nov 24, 2006, at 11:57, Mark Duling wrote:
James Risner wrote:
I have installed squid using Darwinports and installed the plist file: /opt/local/etc/LaunchDaemons/org.macports.Squid/ org.macports.Squid.plist
But it doesn't start the server properly:
unix% ps ugxaww | grep -i squid root 35 0.0 -0.0 27832 328 ?? Ss Wed07AM 0:00.01 /opt/local/bin/daemondo --label=Squid --start-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/ Squid.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper restart ; --pid=none
No squid process ever starts. I can (and do) start it by hand with "sudo /opt/local/sbin/squid" because I need a local cache. But I haven't been able to find anything on this list or in google about how to fix it not starting from launchd. Does anyone have any hints for me?
Surely the "tsu" command is a typo and "su" was meant in the startupitems section of the portfile. But in general, to trouble shoot problems like this, try doing manually the steps the portfile defines and see where the problem is.
cd to /opt/local/var/squid
Is /opt/local/var/squid/cache/00 present? then
tsu -fm squid -c "exec /opt/local/sbin/squid -s -z"
else su -fm squid -c "exec /opt/local/sbin/squid -s"
If tsu is a type then the portfile startupitems section can be corrected so let us know. Or until then, correct that error in the wrapper file generated from the portfile.
Mark
startupitem.start \ "cd ${prefix}/var/squid" \ "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \ "\tsu -fm squid -c \"exec ${prefix}/sbin/squid -s -z\"" \ "fi" \ "su -fm squid -c \"exec ${prefix}/sbin/squid -s\"" startupitem.stop \ "cd ${prefix}/var/squid" \ "su -fm squid -c \"exec ${prefix}/sbin/squid -k kill\""
It doesn't say "tsu"; it says "\tsu". Presumably "\t" is meant to be a tab character. If that is valid in TCL (I don't know if it is) then there is no typo.
On Nov 24, 2006, at 15:34, Ryan Schmidt wrote:
On Nov 24, 2006, at 11:57, Mark Duling wrote:
James Risner wrote:
I have installed squid using Darwinports and installed the plist file: /opt/local/etc/LaunchDaemons/org.macports.Squid/ org.macports.Squid.plist
But it doesn't start the server properly:
unix% ps ugxaww | grep -i squid root 35 0.0 -0.0 27832 328 ?? Ss Wed07AM 0:00.01 /opt/local/bin/daemondo --label=Squid --start-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ; --stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/ Squid.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper restart ; --pid=none
No squid process ever starts. I can (and do) start it by hand with "sudo /opt/local/sbin/squid" because I need a local cache. But I haven't been able to find anything on this list or in google about how to fix it not starting from launchd. Does anyone have any hints for me?
Surely the "tsu" command is a typo and "su" was meant in the startupitems section of the portfile. But in general, to trouble shoot problems like this, try doing manually the steps the portfile defines and see where the problem is.
cd to /opt/local/var/squid
Is /opt/local/var/squid/cache/00 present? then
tsu -fm squid -c "exec /opt/local/sbin/squid -s -z"
else su -fm squid -c "exec /opt/local/sbin/squid -s"
If tsu is a type then the portfile startupitems section can be corrected so let us know. Or until then, correct that error in the wrapper file generated from the portfile.
Mark
startupitem.start \ "cd ${prefix}/var/squid" \ "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" \ "\tsu -fm squid -c \"exec ${prefix}/sbin/squid -s -z\"" \ "fi" \ "su -fm squid -c \"exec ${prefix}/sbin/squid -s\"" startupitem.stop \ "cd ${prefix}/var/squid" \ "su -fm squid -c \"exec ${prefix}/sbin/squid -k kill\""
It doesn't say "tsu"; it says "\tsu". Presumably "\t" is meant to be a tab character. If that is valid in TCL (I don't know if it is) then there is no typo.
It also doesn't say "else" anywhere. It says: if the first cache directory does not exist, then do this one thing (presumably: set up the cache directories). Then, in any case, do this other thing (presumably: start squid).
On Nov 24, 2006, at 12:51 AM, James Risner wrote:
I am a new convert from Windows to MacOS X.
I have installed squid using Darwinports and installed the plist file: /opt/local/etc/LaunchDaemons/org.macports.Squid/ org.macports.Squid.plist
But it doesn't start the server properly:
unix% ps ugxaww | grep -i squid root 35 0.0 -0.0 27832 328 ?? Ss Wed07AM 0:00.01 /opt/local/bin/daemondo --label=Squid --start-cmd /opt/ local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start ; -- stop-cmd /opt/local/etc/LaunchDaemons/org.macports.Squid/ Squid.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/ org.macports.Squid/Squid.wrapper restart ; --pid=none
No squid process ever starts. I can (and do) start it by hand with "sudo /opt/local/sbin/squid" because I need a local cache. But I haven't been able to find anything on this list or in google about how to fix it not starting from launchd. Does anyone have any hints for me?
What happens if you run: 'sudo /opt/local/etc/LaunchDaemons/org.macports.Squid/Squid.wrapper start' Also, be sure to check the squid log to see if there's some hint there. -- Daniel J. Luke +========================================================+ | *---------------- dluke@geeklair.net ----------------* | | *-------------- http://www.geeklair.net -------------* | +========================================================+ | Opinions expressed are mine and do not necessarily | | reflect the opinions of my employer. | +========================================================+
participants (4)
-
Daniel J. Luke
-
James Risner
-
Mark Duling
-
Ryan Schmidt