phacility/phabricator · warning · PhutilArgumentUsageException

You must specify at least one daemon to start!

Error message

You must specify at least one daemon to start!

What it means

PhutilDaemonOverseer's constructor requires a non-empty 'daemons' entry in its config array; this PhutilArgumentUsageException is that guard. It fires when an overseer process is started without being told which daemon(s) to run, i.e. a command-line or config usage mistake rather than a runtime failure.

Source

Thrown at src/infrastructure/daemon/PhutilDaemonOverseer.php:115

    $config = id(new PhutilJSONParser())->parse($config);

    $this->libraries = idx($config, 'load');
    $this->log = idx($config, 'log');
    $this->daemonize = idx($config, 'daemonize');

    $this->config = $config;

    if (self::$instance) {
      throw new Exception(
        pht('You may not instantiate more than one Overseer per process.'));
    }

    self::$instance = $this;

    $this->startEpoch = time();

    if (!idx($config, 'daemons')) {
      throw new PhutilArgumentUsageException(
        pht('You must specify at least one daemon to start!'));
    }

    if ($this->log) {
      // NOTE: Now that we're committed to daemonizing, redirect the error
      // log if we have a `--log` parameter. Do this at the last moment
      // so as many setup issues as possible are surfaced.
      ini_set('error_log', $this->log);
    }

    if ($this->daemonize) {
      // We need to get rid of these or the daemon will hang when we TERM it
      // waiting for something to read the buffers. TODO: Learn how unix works.
      fclose(STDOUT);
      fclose(STDERR);
      ob_start();

      $pid = pcntl_fork();

View on GitHub (pinned to 5720a38cfe)

Solutions

  1. Pass at least one daemon to start, e.g. via the standard phd launch workflow.
  2. If constructing PhutilDaemonOverseer yourself, set 'daemons' => array(...) in the config array.
  3. Check any wrapper script's argument forwarding so daemon arguments reach the overseer.

Example fix

// before
new PhutilDaemonOverseer(array('log' => $log_path));

// after
new PhutilDaemonOverseer(array(
  'daemons' => array('PhabricatorTaskmasterDaemon'),
  'log' => $log_path,
));
Defensive patterns

Strategy: validation

Validate before calling

if (!idx($config, 'daemons')) {
  throw new InvalidArgumentException(
    'Provide at least one daemon in the overseer config.');
}

Prevention

When it happens

Trigger: Constructing PhutilDaemonOverseer with a config array missing the 'daemons' key, or driving the daemon launch entry point with no daemon argument so the config is built empty.

Common situations: Custom wrapper scripts around phd that assemble the overseer config programmatically and forget the daemons entry; argv forwarding bugs in launch tooling; invoking the overseer binary directly instead of through phd.

Related errors


AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21). Data as JSON: /api/errors/0d46c0e89c6ceb6b. Report an issue: GitHub.