Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm exploring daemontools to run some of our applications, which generate some output as well (on both stdout and stderr).

I installed daemontools on a debian box. Every time, I do a svc -u /etc/service/myservice to start the service, I get a [defunct] process. How can I go about debugging this problem.

Following is my /etc/service/myservice/run:

#!/bin/bash
exec myservice -c /etc/myservice/myservice.conf

and /etc/service/myservice/log/run

#!/bin/sh
exec multilog t ./main

Any help would be apppreciated. Thanks.

share|improve this question
    
More information are velcome. For example, what happens when you directly run /etc/service/myservice/run ? –  Gregory MOUSSAT May 8 '12 at 13:31
    
It runs just fine, spewing out messages on the console (both stderr and stdout). –  Lazylabs May 8 '12 at 17:30
    
So try to run it with the same user as daemontools will use for it. This can also be a problem of environement: what happen if you run it from cron ? –  Gregory MOUSSAT May 9 '12 at 0:01
add comment

1 Answer

up vote 1 down vote accepted

You can catch some errors with ps -aux | grep readproctitle.

Some debugging ideas:

  • myserver is not in the PATH. Consider specifying the full path to the program.
  • myserver forks into background: This is explicitly forbidden with services started using daemontools.
  • Permissions: Double-check the permissions of the directories and of the run script.
share|improve this answer
add comment

Your Answer

 
discard

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.