Page MenuHomestyx hydra

No OneTemporary

diff --git a/scripts/install/update_phabricator.sh b/scripts/install/update_phabricator.sh
index 5aad808087..5a3950088e 100755
--- a/scripts/install/update_phabricator.sh
+++ b/scripts/install/update_phabricator.sh
@@ -1,50 +1,56 @@
#!/bin/sh
set -e
set -x
# This is an example script for updating Phabricator, similar to the one used to
# update <https://secure.phabricator.com/>. It might not work perfectly on your
# system, but hopefully it should be easy to adapt. This script is not intended
# to work without modifications.
# NOTE: This script assumes you are running it from a directory which contains
# arcanist/, libphutil/, and phabricator/.
ROOT=`pwd` # You can hard-code the path here instead.
### UPDATE WORKING COPIES ######################################################
cd $ROOT/libphutil
git pull
cd $ROOT/arcanist
git pull
cd $ROOT/phabricator
git pull
### CYCLE WEB SERVER AND DAEMONS ###############################################
# Stop daemons.
$ROOT/phabricator/bin/phd stop
+# If running the notification server, stop it.
+# $ROOT/phabricator/bin/aphlict stop
+
# Stop the webserver (apache, nginx, lighttpd, etc). This command will differ
# depending on which system and webserver you are running: replace it with an
# appropriate command for your system.
# NOTE: If you're running php-fpm, you should stop it here too.
sudo /etc/init.d/httpd stop
# Upgrade the database schema. You may want to add the "--force" flag to allow
# this script to run noninteractively.
$ROOT/phabricator/bin/storage upgrade
# Restart the webserver. As above, this depends on your system and webserver.
# NOTE: If you're running php-fpm, restart it here too.
sudo /etc/init.d/httpd start
# Restart daemons.
$ROOT/phabricator/bin/phd start
+
+# If running the notification server, start it.
+# $ROOT/phabricator/bin/aphlict start
diff --git a/src/applications/notification/setup/PhabricatorSetupCheckAphlict.php b/src/applications/notification/setup/PhabricatorSetupCheckAphlict.php
index fd11f58632..294fa5f84e 100644
--- a/src/applications/notification/setup/PhabricatorSetupCheckAphlict.php
+++ b/src/applications/notification/setup/PhabricatorSetupCheckAphlict.php
@@ -1,64 +1,64 @@
<?php
final class PhabricatorSetupCheckAphlict extends PhabricatorSetupCheck {
protected function executeChecks() {
$enabled = PhabricatorEnv::getEnvConfig('notification.enabled');
if (!$enabled) {
// Notifications aren't set up, so just ignore all of these checks.
return;
}
try {
$status = PhabricatorNotificationClient::getServerStatus();
} catch (Exception $ex) {
$message = pht(
'Phabricator is configured to use a notification server, but '.
'is unable to connect to it. You should resolve this issue or '.
'disable the notification server. It may be helpful to double check '.
'your configuration or restart the server using the command below.'.
"\n\n".
"%s",
phutil_tag(
'pre',
array(),
array(
get_class($ex),
"\n",
$ex->getMessage(),
)));
$this->newIssue('aphlict.connect')
->setShortName(pht('Notification Server Down'))
->setName(pht('Unable to Connect to Notification Server'))
->setMessage($message)
->addRelatedPhabricatorConfig('notification.enabled')
->addRelatedPhabricatorConfig('notification.server-uri')
->addCommand(
pht(
- "(To start or restart the server, run this command.)\n".
- "phabricator/ $ sudo ./bin/aphlict"));
+ "(To start the server, run this command.)\n".
+ "phabricator/ $ sudo ./bin/aphlict start"));
return;
}
$expect_version = PhabricatorNotificationClient::EXPECT_VERSION;
$have_version = idx($status, 'version', 1);
if ($have_version != $expect_version) {
$message = pht(
'The notification server is out of date. You are running server '.
'version %d, but Phabricator expects version %d. Restart the server '.
'to update it, using the command below:',
$have_version,
$expect_version);
$this->newIssue('aphlict.version')
->setShortName(pht('Notification Server Version'))
->setName(pht('Notification Server Out of Date'))
->setMessage($message)
- ->addCommand('phabricator/ $ sudo ./bin/aphlict');
+ ->addCommand('phabricator/ $ sudo ./bin/aphlict start');
}
}
}
diff --git a/src/docs/user/userguide/notifications.diviner b/src/docs/user/userguide/notifications.diviner
index 218ef11170..6bee039045 100644
--- a/src/docs/user/userguide/notifications.diviner
+++ b/src/docs/user/userguide/notifications.diviner
@@ -1,81 +1,81 @@
@title Notifications User Guide: Setup and Configuration
@group userguide
Guide to setting up notifications.
= Overview =
By default, Phabricator delivers information about events (like users creating
tasks or commenting on code reviews) through email and in-application
notifications.
Phabricator can also be configured to deliver notifications in real time, by
popping up a message in any open browser windows if something has
happened or an object has been updated.
To enable real-time notifications:
- Set `notification.enabled` in your configuration to true.
- Run the notification server, as described below.
This document describes the process in detail.
= Running the Aphlict Server =
Phabricator implements realtime notifications using a Node.js server called
"Aphlict". To run it:
- Install node.js.
- - Run `bin/aphlict` (this script must be run as root).
+ - Run `bin/aphlict start` (this script must be run as root).
The server must be able to listen on port **843** and port **22280** for Aphlict
to work. You can change the latter port in the `notification.client-uri` config,
but port 843 is used by Flash and can not be changed. In particular, if you're
running in EC2, you need to unblock both of these ports in the server's security
group configuration.
You may want to adjust these settings:
- `notification.client-uri` Externally-facing host and port that browsers will
connect to in order to listen for notifications.
- `notification.server-uri` Internally-facing host and port that Phabricator
will connect to in order to publish notifications.
- `notification.log` Log file location for the server.
- `notification.user` Non-root user to drop permissions to after binding to
privileged ports.
- `notification.pid` Pidfile location used to stop any running server when
aphlict is restarted.
In most cases, the defaults are appropriate, except that you should set
`notification.user` to some valid system user so Aphlict isn't running as root.
== Verifying Server Status ==
Access `/notification/status/` to verify the server is operational. You should
see a table showing stats like "uptime" and connection/message counts if the
server is working. If it isn't working, you should see an error.
== Testing the Server ==
The easiest way to test the server is to have two users login and comment on
the same Maniphest Task or Differential Revision. They should receive in-browser
notifications about the other user's activity.
NOTE: This is cumbersome. There will be better testing tools at some point.
== Debugging Server Problems ==
You can run `aphlict` in the foreground to get output to your console:
- phabricator/ $ sudo ./bin/aphlict --foreground
+ phabricator/ $ sudo ./bin/aphlict debug
You can run `support/aphlict/client/aphlict_test_client.php` to connect to the
Aphlict server from the command line. Messages the client receives will be
printed to stdout.
You can set `notification.debug` in your configuration to get additional
output in your browser.
The server also generates a log, by default in `/var/log/aphlict.log`. You can
change this location by changing `notification.log` in your configuration. The
log may contain information useful in resolving issues.

File Metadata

Mime Type
text/x-diff
Expires
Fri, Oct 31, 7:35 AM (13 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
312048
Default Alt Text
(8 KB)

Event Timeline