Page MenuHomePhabricator

Improvement of message: `A daemon is running as user phd.user while the Phabricator config specifies phd.user to be phd.`
Closed, ResolvedPublic

Description

Phabricator reports this issue to me: A daemon is running as user phd.user while the Phabricator config specifies phd.user to be phd.

Question is: Which user does it believe the daemons to be running as? Phabricator should probably be a little bit more verbose in it's message - i.e. show the expected and percieved uid and username.

I currently unexpectedly get this message (daemons are running as the configured user, according to the output of ps aux). To debug it, I would like to know what numeric uid and which username Phabricator expects to see, and what the daemons are actually reporting to be running as.

Event Timeline

devurandom updated the task description. (Show Details)
devurandom added a project: Daemons.
devurandom added a subscriber: devurandom.

The 3rd paragraph is outright confusing:

phd Daemons will try to use `root` to start as the configured user. Make sure that the user who starts `phd` has the correct sudo permissions to start `root` daemons as `phd`

I have no clue what this is supposed to mean... :(

  • "use root"? i.e. run as root?
  • "user who starts phd"? i.e. root?
  • "root daemons"? What's that?

My suggestion for the message text (markup should be part of the message):

The daemon `daemon_name` (PID observed_pid) is running as user //observed_username// (UID observed_uid), while the Phabricator config specifies phd.user to be //expected_username// (UID expected_uid).

Either adjust sudo to match phd or start the daemons as the correct user.

Daemons will try to use the `sudo` command to start as the configured user. Make sure that the user who starts `phd` has the correct sudo permissions to start daemons as user //expected_username//.

If the daemon itself resolves the observed and expected UID to usernames (i.e. a mismatch of UIDs on the phd and web-ui systems can never be the cause of this message), then one could leave out the UID parts. But even then it wouldn't hurt to have that information.

Alternate style:

A daemon is running as user //observed_username//, while the Phabricator config specifies phd.user to be //expected_username//.

Either adjust sudo to match phd or start the daemons as the correct user.

Daemons will try to use the `sudo` command to start as the configured user. Make sure that the user who starts `phd` has the correct sudo permissions to start daemons as user //expected_username//.

Daemon: `daemon_name` (PID observed_pid)
* Expected user: expected_username (UID expected_uid)
* Actual user: observed_username (UID observed_uid)
* Started by: observed_original_username (UID observed_original_uid)
devurandom renamed this task from `A daemon is running as user phd.user while the Phabricator config specifies phd.user to be phd.` to Improvement of message: `A daemon is running as user phd.user while the Phabricator config specifies phd.user to be phd.`.Sep 10 2015, 10:39 AM

Better yet: Instead of mentioning the PID, link to /daemon/log/.../, it already contains the necessary information (except the UID). There actually is no need for the lengthy list of "expected/actual/started" usernames, which I suggested, if you provide a list of affected daemons with links to their log.

Phabricator newbie here. This error message doesn't really make any sense without Phabricator experience.
Suggesting a way to fix it would be much better.

All the users used by my Phabricator install are in sudo, yet it still fails to launch the daemons with daemon user.