phacility/phabricator · error · AphrontMalformedRequestException
This service is configured in cluster mode and the address t
Error message
This service is configured in cluster mode and the address this request was received on ("%s") is not whitelisted as a cluster address. What it means
Thrown by 'bin/repository thaw' while processing a repository when $repository->loadAlmanacService() returns null, i.e. the repository is not bound to any Almanac service and therefore is not a cluster repository. Thaw exists to repair cluster working-copy version locks and leadership; a non-cluster repository has no cluster state to repair, so the command refuses rather than pretending to thaw it.
Source
Thrown at src/aphront/configuration/AphrontApplicationConfiguration.php:431
$server_addr = idx($_SERVER, 'SERVER_ADDR');
if (!$server_addr) {
if (php_sapi_name() == 'cli') {
// This is a command line script (probably something like a unit
// test) so it's fine that we don't have SERVER_ADDR defined.
} else {
throw new AphrontMalformedRequestException(
pht('No %s', 'SERVER_ADDR'),
pht(
'This service is configured to operate in cluster mode, but '.
'%s is not defined in the request context. Your webserver '.
'configuration needs to forward %s to PHP so the software can '.
'reject requests received on external interfaces.',
'SERVER_ADDR',
'SERVER_ADDR'));
}
} else {
if (!PhabricatorEnv::isClusterAddress($server_addr)) {
throw new AphrontMalformedRequestException(
pht('External Interface'),
pht(
'This service is configured in cluster mode and the address '.
'this request was received on ("%s") is not whitelisted as '.
'a cluster address.',
$server_addr));
}
}
}
$site = $this->buildSiteForRequest($request);
if ($site->shouldRequireHTTPS()) {
if (!$request->isHTTPS()) {
// Don't redirect intracluster requests: doing so drops headers and
// parameters, imposes a performance penalty, and indicates a
// misconfiguration.View on GitHub (pinned to 5720a38cfe)
Solutions
- Remove the non-cluster repository from the thaw command and thaw only repositories bound to a cluster service.
- Check the repository's 'Cluster' / service setting (or Almanac bindings) to confirm which repositories are actually clustered.
- If the repository should be clustered, bind it to an Almanac repository service first, then re-run thaw.
Example fix
# before bin/repository thaw --demote dev-001 R77 R12 # after (thaw only cluster repositories) bin/repository thaw --demote dev-001 R12
Defensive patterns
Strategy: validation
Validate before calling
// Filter to cluster repositories before thaw:
$service = $repository->loadAlmanacService();
if (!$service) { /* skip: not a cluster repository, thaw does not apply */ } Prevention
- Tag clustered repositories in runbooks so thaw commands only ever name them.
- Check the repository's service binding in the UI before including it in cluster recovery.
When it happens
Trigger: Naming a plain (non-cluster) repository in a thaw command, e.g. 'bin/repository thaw --demote dev-001 R77' where R77 is hosted locally without an Almanac repository service: the per-repository loop at PhabricatorRepositoryManagementThawWorkflow.php:210 finds no service and throws.
Common situations: Mixed installations where only some repositories are clustered; running thaw on a single-device Phabricator after reading cluster-recovery docs; a repository that lost its service binding after Almanac reconfiguration; using '--all-repositories' on a device whose service also hosts non-cluster repos.
Related errors
- This request reached a site which requires HTTPS, but the re
- This server is configured as "%s", but you are using the dom
- Request parameter "%s" is not formatted properly. Expected a
- Request parameter "%s" is not formatted properly. Expected a
- This service is configured to operate in cluster mode, but %
AI-assisted analysis of phacility/phabricator@5720a38cfe (2026-08-21).
Data as JSON: /api/errors/db5a33843c190d45.
Report an issue: GitHub.