What is the current wisdom on getting the MP apache2 port start on boot? My install is in good shape, runs when started manually, and has a daemondo that runs on boot, but the server never comes up. I searched the archive, but no dice. Thoughts? -- Sal smile. -------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University
On Jan 6, 2007, at 9:11 PM, Salvatore Domenick Desiano wrote:
What is the current wisdom on getting the MP apache2 port start on boot? My install is in good shape, runs when started manually, and has a daemondo that runs on boot, but the server never comes up. I searched the archive, but no dice.
Hi Sal, Let's see, I just did a new apache2 install the other day and ran into this problem too. here's what worked for me: - The ultimate problem, which I found by trying to start apache2 manually using "apachectl start" was that there is no httpd.conf by default. (When you try to start apache, it tells you this). - Once I copied httpd.conf.sample to httpd.conf, it started right up. Hope that works for you. James
Thoughts?
-- Sal smile.
-------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University _______________________________________________ macports-users mailing list macports-users@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo/macports-users
o Let's see, I just did a new apache2 install the other day and ran into this o problem too. here's what worked for me: o o - The ultimate problem, which I found by trying to start apache2 o manually using "apachectl start" was that there is no httpd.conf by default. o (When you try to start apache, it tells you this). It took me a minute to figure this out, but I found this earlier, so it's got to be somehting else. (without this, Apache can't be started manually, either). Something, I think, is preventing daemondo from starting the server, but I don't see a facility by which daemondo could tell me what is wrong. -- Sal smile. -------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University On Sat, 6 Jan 2007, James Berry wrote: o o On Jan 6, 2007, at 9:11 PM, Salvatore Domenick Desiano wrote: o o > What is the current wisdom on getting the MP apache2 port start on boot? My o > install is in good shape, runs when started manually, and has a daemondo o > that runs on boot, but the server never comes up. I searched the archive, o > but no dice. o o Hi Sal, o o o - Once I copied httpd.conf.sample to httpd.conf, it started right up. o o Hope that works for you. o o James o o o > o > Thoughts? o > o > -- Sal o > smile. o > o > o > -------------- o > Salvatore Domenick Desiano o > Doctoral Candidate o > Robotics Institute o > Carnegie Mellon University o > _______________________________________________ o > macports-users mailing list o > macports-users@lists.macosforge.org o > http://lists.macosforge.org/mailman/listinfo/macports-users o o
On Jan 7, 2007, at 2:38 AM, Salvatore Domenick Desiano wrote:
o Let's see, I just did a new apache2 install the other day and ran into this o problem too. here's what worked for me: o o - The ultimate problem, which I found by trying to start apache2 o manually using "apachectl start" was that there is no httpd.conf by default. o (When you try to start apache, it tells you this).
It took me a minute to figure this out, but I found this earlier, so it's got to be somehting else. (without this, Apache can't be started manually, either). Something, I think, is preventing daemondo from starting the server, but I don't see a facility by which daemondo could tell me what is wrong.
Sal, There are debug flags you can pass to daemondo to get more information. But I'd work backward. Working forward, here's how things work: - launchd launched daemondo - daemondo invokes the wrapper scripts - the wrapper scripts, in this case, call either apachectl or httpd direction (I forget which). So I'd check in reverse order: (1) Can you launch httpd and/or apachectl directly/successfully? (2) Can you launch it through the wrapper scripts directly/ successfully? (3) Can you invoke daemondo directly to have it launchd the wrappers? Depending on where that breaks down, you'll know more about where to look. Did you "launchctl load -w /Libraries/LaunchDaemons/ org.macports.apache2.plist" as root? James
-- Sal smile.
-------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University
On Sat, 6 Jan 2007, James Berry wrote:
o o On Jan 6, 2007, at 9:11 PM, Salvatore Domenick Desiano wrote: o o > What is the current wisdom on getting the MP apache2 port start on boot? My o > install is in good shape, runs when started manually, and has a daemondo o > that runs on boot, but the server never comes up. I searched the archive, o > but no dice. o o Hi Sal, o o o - Once I copied httpd.conf.sample to httpd.conf, it started right up. o o Hope that works for you. o o James o o o > o > Thoughts? o > o > -- Sal o > smile. o > o > o > -------------- o > Salvatore Domenick Desiano o > Doctoral Candidate o > Robotics Institute o > Carnegie Mellon University o > _______________________________________________ o > macports-users mailing list o > macports-users@lists.macosforge.org o > http://lists.macosforge.org/mailman/listinfo/macports-users o o
(1) Can you launch httpd and/or apachectl directly/successfully?
If this step is failing without any obvious errors, the problem may be server name resolution. I had this problem with apache2 from macports (last week) until I realized Apache was exiting without an error because it couldn't resolve my local box's DNS name (as I just use mDNS for most things). I noticed this error in the error logs and corrected it by adding a host to my loopback address via NetInfoManager and setting the httpd.conf to point to that servername. Good luck, -Mark
Sorry for the delay -- my 'book's been up for a week and I haven't been able to reboot this to test it. James, you instructions are good, and I am pretty sure I tried them all, but I'll walk through them to make sure I'm not missing anything: (-) Run in non-daemon mode (I added this one to test config files) /opt/local/apache2/bin/httpd -X [running] ^C [stopped] o (1) Can you launch httpd and/or apachectl directly/successfully? /opt/local/apache2/bin/apachectl start [running] /opt/local/apache2/bin/apachectl [stopped] o (2) Can you launch it through the wrapper scripts directly/successfully? /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start [running] /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop [stopped] (-) Check launchd configuration (aded this one to make sure plist was loaded) ps -ax | grep daemondo 36 ?? Ss 0:00.01 /opt/local/bin/daemondo --label=apache2 --start... 37 ?? Ss 0:00.02 /opt/local/bin/daemondo --label=mysql5 --start-... o (3) Can you invoke daemondo directly to have it launchd the wrappers? sudo kill -SIGHUP 36 [not running, no httpd processes] o Depending on where that breaks down, you'll know more about where to look. Did o you "launchctl load -w /Libraries/LaunchDaemons/org.macports.apache2.plist" as o root? Yes, I had, when I initially installed the port, and based on what I was seeing, I believe it worked. I don't really have a good understanding of daemondo. Can someone suggest where to look next (docs or approach)? Thank you for the help. -- Sal smile. -------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University
On Jan 13, 2007, at 9:56 AM, Salvatore Domenick Desiano wrote:
I don't really have a good understanding of daemondo. Can someone suggest where to look next (docs or approach)?
I have only four thoughts on that: (1) daemondo --help (2) start daemondo with --verbosity=5, or something like that (3) The source: http://trac.macports.org/projects/macports/browser/ trunk/base/src/programs/daemondo/main.c (4) Ask me if you find something you don't understand. Oh, and if you find something wrong you're always free to report a bug or submit a patch to it. James
Okay, with the verbosity flag, I can tell that it runs fine after boot, but not during boot. My guess is that it's starting before some necessary service. I do have a heap of crash logs from a week ago (when I first posted the problem), but nothing from today's reboot. Is there a method for getting daemondo to put its output somewhere (like console, or a file?). -- Sal smile. -------------- Salvatore Domenick Desiano Doctoral Candidate Robotics Institute Carnegie Mellon University On Sat, 13 Jan 2007, James Berry wrote: o o On Jan 13, 2007, at 9:56 AM, Salvatore Domenick Desiano wrote: o o > I don't really have a good understanding of daemondo. Can someone o > suggest where to look next (docs or approach)? o o I have only four thoughts on that: o o (1) daemondo --help o o (2) start daemondo with --verbosity=5, or something like that o o (3) The source: o http://trac.macports.org/projects/macports/browser/trunk/base/src/programs/d... o o (4) Ask me if you find something you don't understand. o o Oh, and if you find something wrong you're always free to report a bug or o submit a patch to it. o o James o
participants (3)
-
James Berry
-
Mark Fredrickson
-
Salvatore Domenick Desiano