Description of problem:
I am trying to use a small, custom upstart script to run apache tomcat. This works very well in Fedora 11 (upstart-0.3.9-24) but does not seem to work in RHEL 6 (upstart-0.6.3-5). Here is the script:
start on tomcat-start
exec /opt/tomcat/bin/catalina.sh run
When I run the following command, nothing happens:
# initctl emit tomcat-start
I also tried the simple "bounce" example from the upstart website and it doesn't work on RHEL 6 either (but works on FC11, like the above script):
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install a new upstart script
2. Try to run script using start or emit command
Nothing happens if script is event based and emit command is used. When invoked using the "initctl start" command, an "Unknown job" error is received.
Script should run.
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release. Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release. This request is not yet committed for
Where is your job located and what is job file name? Since upstart-0.6.5 upstart jobs moved to /etc/init and job description files must have .conf suffix.
# cat > /etc/init/tomcat.conf << EOF
> start on tomcat-start
> exec /opt/tomcat/bin/catalina.sh run
# initctl status tomcat
# start tomcat
start: Job failed to start
Job failed just because I don't have any /opt/tomcat/bin/catalina.sh.
Thanks very much Petr. That was indeed the problem.
What's the best place to find documentation on upstart 0.6.5? I have a problem with another job too that was working in FC11, but I want to make sure it's not a config issue like this one before reporting anything.
The most actual documentation can be found in man pages - init(8), init(5), initctl(8) telinit(8), runlevel(7), startup(7), starting(7), started(7), stopping(7), stopped(7)