Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have three init scripts and the Broker init script runs fine, but when I try to run the Consumer init script and then the Data Collector init script, the only process that is running is the Broker.

I added the symbolic links to the run levels using update-rc.d for each script and I also changed the number prefixes in the symbolic links to try and run the scripts in the proper order but that did not work.

I am able to run the scripts from the terminal and they work fine but they need to all be started on boot.

Any ideas as to why my other scripts are not running?

Also inside my Consumer and Data Collector I am running:

su user1 -c 'java -jar foo.jar'

to start the services.

Also the Consumer Java class sits and waits for a message from the queue, so the Java code does not stop until I specify the stop argument for the init script. The Broker has to start first, then the Consumer, then the Data Collector.

Adding the symbolic links for the runlevels:

sudo update-rc.d Broker defaults 10 90
sudo update-rc.d Consumer defaults 15 85
sudo update-rc.d DataCollector defaults 20 80
share|improve this question

I got it to work. I made the Broker a background process because it constantly runs until I shutdown the computer or call the script with the shutdown parameter. I also made the Consumer a background process.

Broker Init Script

su user1 -c 'qpid-server &'

Consumer Init Script

su user1 -c 'java -jar foo.jar &'
share|improve this answer

Sounds like the java command never completes, and thus the rest of the init scripts do not start. Try something like:

 nohup su user1 -c 'java -jar foo.jar' &

and I think that you'll find that the rest of the init startup sequence will work.

share|improve this answer
It did not work because I was not able to see it in the process list using: ps -ef – Colin McQueen Jun 12 '12 at 18:07

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.