Upstart CentOS Vs Upstart Ubuntu Is There Any Difference Between Them?

Home » CentOS » Upstart CentOS Vs Upstart Ubuntu Is There Any Difference Between Them?
CentOS No Comments

I’m moving some server configurations from Ubuntu Server 12.04 to CentOS
6.6. Now I’m working on `/etc/init` script that should be handled by
`upstart` at both OS as far as I know. The files on both server are the same and I mean the same at content level and also at path level and permissions level, is the exactly copy from Ubuntu to CentOS. I’m having some issues with upstart at CentOS since scripts doesn’t start and I can’t find why (the cause). This is the output from `initctl list` at Ubuntu server:

# Ubuntu 12.04
root@qa:/etc/init# initctl list
// rest of processes goes here pdoneVendorBroker start/running, process 854
repToolBroker start/running, process 3705
emailBroker start/running, process 3738
cmeBroker start/running, process 3760
messageBroker start/running, process 3727
shareEventHandler start/running, process 3686
edetailBroker start/running, process 3749
pdoneLoginProctor start/running, process 3716

All the processes has been started at OS boot, that’s fine.

This is the output from CentOS server:

# CentOS 6.6
root@staging:/etc/init# initctl list
// rest of processes goes here pdoneVendorBroker stop/waiting repToolBroker stop/waiting emailBroker stop/waiting cmeBroker stop/waiting messageBroker stop/waiting shareEventHandler stop/waiting edetailBroker stop/waiting pdoneLoginProctor stop/waiting

None processes has been started after OS boot, and that’s wrong. Why? What I’m missing here? Can any give me some advice?

At CentOS I’ve tried also to start the process manually by running this:

initctl start messageBroker

And this is the output at console:

messageBroker start/running, process 3587

But if I run the command `initctl list` I didn’t see the process started:

initctl list rc stop/waiting tty (/dev/tty3) start/running, process 2565
tty (/dev/tty2) start/running, process 2562
tty (/dev/tty1) start/running, process 2558
tty (/dev/tty6) start/running, process 2577
tty (/dev/tty5) start/running, process 2574
tty (/dev/tty4) start/running, process 2571
plymouth-shutdown stop/waiting control-alt-delete stop/waiting debug stop/waiting rcS-emergency stop/waiting kexec-disable stop/waiting pdoneVendorBroker stop/waiting quit-plymouth stop/waiting rcS stop/waiting prefdm stop/waiting repToolBroker stop/waiting init-system-dbus stop/waiting emailBroker stop/waiting splash-manager stop/waiting cmeBroker stop/waiting start-ttys stop/waiting messageBroker stop/waiting shareEventHandler stop/waiting edetailBroker stop/waiting pdoneLoginProctor stop/waiting rcS-sulogin stop/waiting serial stop/waiting

This is the content for the file `/ etc/init/messageBroker.conf`:

description “messageBroker”

start on runlevel [234]
stop on runlevel [0156]

respawn
exec php /usr/local/bin/messageBroker/messageBroker.php
post-start script
PID=`status messageBroker| egrep -oi ‘([0-9]+)$’ | head -n1`
echo $PID > /var/run/messageBroker.pid
end script

post-stop script
rm -f /var/run/messageBroker.pid
end script

Why it’s not starting? What is wrong?