2

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.

Lazylabs
  • 143
  • 1
  • 2
  • 5

2 Answers2

3

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.
Oliver
  • 5,883
  • 23
  • 32
1

I faced the same issue. When nothing else worked, this worked for me :

  • Find the pid of svscanboot through ps auxf. You will see that it starts svscan which monitors all the services.
  • kill -9 -pid.

svscanboot will start automatically and so will all services under svscan.

I faced the issue when named pipe of svcan gets corrupt when no disk space is left on machine.