I have a rc.local file setup to auto start tomcat and httpd under fedora 18 boot. It works fine on my 64 bit system (and a couple others for a friend) but there MUST BE a sleep before bringing up httpd (for some reason I forgot).
start routine in /etc/init.d/rc.local S95tomcat start (sleep 10; S96httpd start) & date > /tmp/last_start stop routine S96httpd stop S95tomcat stop date > /tmp/last_stop # not meaningful unless testing rc.local as boot wipes /tmp for the record S96httpd is a link to /etc/init.d/httpd and S95tomcat is a script I wrote which does some extra things besides calling the official release apache/tomcat up/down scripts I also have a portable 32bit fedora 18 box. After installing all the pieces, I have tomcat/httpd working fine, BUT they WILL NOT START FROM THE BOOT up like the 64 bit systems do. I have tried putting more and longer sleeps in place (before tomcat as well as httpd). All to no avail. BUT WHEN I TYPE IN "rc.local start" AS ROOT, ALL COMES UP FINE. (after logging into the desktop as me and becoming root with "su") in a command tool The only visible difference I have found is in the httpd log Tomcat's failure is lost or I have not found it yet (yes I looked in /var/log/messages where I would expect it). --- so here is the /var/log/httpd/error_log after a boot - not sure if the first two lines are errors, but the third is (timestamps shortened up for this note) [12/15/2013] [core:notice] [pid 1686] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0 [12/15/2013] [suexec:notice] [pid 1686] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [12/15/2013] [jk:emerg] [pid 1686] Error in reading worker properties from '/etc/httpd/conf/workers.properties' AH00016: Configuration Failed ----- and now for the AFTER I boot and run "rc.local start" as root - note line 1 has different RUNTIME PERMISSIONS [12/15/2013] [core:notice] [pid 2302] SELinux policy enabled; httpd running as context unconfined_u:system_r:unconfined_t:s0-s0:c0.c1023 [12/15/2013] [suexec:notice] [pid 2302] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [12/15/2013] [auth_digest:notice] [pid 2303] AH01757: generating secret for digest authentication ... [12/15/2013] [lbmethod_heartbeat:notice] [pid 2303] AH02282: No slotmem from mod_heartmonitor [12/15/2013] [mpm_prefork:notice] [pid 2303] AH00163: Apache/2.4.6 (Fedora) mod_jk/1.2.37 configured -- resuming normal operations [12/15/2013] [core:notice] [pid 2303] AH00094: Command line: '/usr/sbin/httpd' -------------- So I am guessing here below - anyone please correct. Either a) the permissions are critical between the two runs (if so, how to set in rc.local) but ( again ) NO sign of apache tomcat being up either or b) something else is still coming up on the system as both tomcat AND httpd fail originally but later after I login and become root, the system is stable and up they come manually Workarounds I see for now: a) use 64bit machines only or b) manually start tomcat and httpd every time I boot or c) some daemon process is still initializing and I need to ensure that it is done What the HAY???? Wisdom appreciated!