尝试启动 Notification Server 时出错

Error trying to start Notification Server

我试图启动 Phabricator 的 通知服务器,但遇到以下错误:

/phabricator/phabricator/bin/aphlict start

[2015-11-16 18:41:08] EXCEPTION: (FilesystemException) Requested path '/var/tmp/aphlict/pid' is not writable. at [<phutil>/src/filesystem/Filesystem.php:1081]
arcanist(head=master, ref.master=9dd6eafb5254), phabricator(head=master, ref.master=50d158a8c4d9), phutil(head=master, ref.master=e9ed72483a14)
  #0 Filesystem::assertWritable(string) called at [<phutil>/src/filesystem/Filesystem.php:73]
  #1 Filesystem::assertWritableFile(string) called at [<phutil>/src/filesystem/Filesystem.php:89]
  #2 Filesystem::writeFile(string, string) called at [<phabricator>/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php:140]
  #3 PhabricatorAphlictManagementWorkflow::willLaunch() called at [<phabricator>/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php:249]
  #4 PhabricatorAphlictManagementWorkflow::executeStartCommand() called at [<phabricator>/src/applications/aphlict/management/PhabricatorAphlictManagementStartWorkflow.php:15]
  #5 PhabricatorAphlictManagementStartWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:406]
  #6 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:301]
  #7 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/support/aphlict/server/aphlict_launcher.php:23]

有问题的目录似乎是可写的:

ls -l /var/tmp/aphlict

total 4
drwxr-xr-x 2 root root 4096 Nov 16 13:40 pid

如果重要的话,我 运行 在 Ubuntu 14.04 LTS 系统上的所有操作都是非 'root'。

我刚刚弄明白了。正如我在最近的更新中所说,我试图以非 'root' 启动通知服务器。再看/var/tmp/aphlict/pid文件夹的权限,问题一下子变得crystal清楚了。

ls -l /var/tmp/aphlict

total 4
drwxr-xr-x 2 root root 4096 Nov 16 13:40 pid

因此,解决该问题所需要做的就是使目录对所有人都可写(我希望这种方法不会造成潜在的安全问题):

chmod go+w /var/tmp/aphlict/pid

su MY_NON_ROOT_USER_NAME -c './bin/aphlict start'
Aphlict Server started.

问题已解决。顺便问一下,为了使Notification Server 正常工作,除了已经打开的22280 端口之外,还需要打开22281 端口吗? (请在评论中回答,谢谢!)