Page MenuHomePhabricator

How to debug `sudo command failed. Starting daemon as current user.`?
OpenPublic

Asked by devurandom on Sep 10 2015, 10:04 AM.

Details

When I run ./bin/phd start, it will try to sudo to the phd user, but fail:

Freeing active task leases...
Freed 0 task lease(s).
Starting daemons as phd
Launching daemons:
(Logs will appear in "/var/tmp/phd/log/daemons.log".)

    PhabricatorRepositoryPullLocalDaemon (Static)
    PhabricatorTriggerDaemon (Static)
    PhabricatorTaskmasterDaemon (Autoscaling: group=task, pool=4, reserve=0)

sudo command failed. Starting daemon as current user.
Done.

I am unsure why that happens - root (the current user) should be able to sudo to phd ( I can definitely run sudo -u phd ./bin/phd start manually, without any signs of failure). /var/tmp/phd/log/daemons.log is empty. How would I debug this?

Answers

tolbrino
Updated 2,684 Days Ago

I used ./bin/phd debug <daemon> to point me into the right direction. This command must be executed as the same user, e.g. phd, as the service should be run as.

New Answer