Debian – daemontools: How to find out what is wrong

daemontoolsdebian

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.

Best Answer

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.