{"record":{"id":"db5a33843c190d45","repo":"phacility/phabricator","slug":"this-service-is-configured-in-cluster-mode-and-the","errorCode":null,"errorMessage":"This service is configured in cluster mode and the address this request was received on (\"%s\") is not whitelisted as a cluster address.","messagePattern":"This service is configured in cluster mode and the address this request was received on \\(\"(.+?)\"\\) is not whitelisted as a cluster address\\.","errorType":"exception","errorClass":"AphrontMalformedRequestException","httpStatus":500,"severity":"error","filePath":"src/aphront/configuration/AphrontApplicationConfiguration.php","lineNumber":431,"sourceCode":"      $server_addr = idx($_SERVER, 'SERVER_ADDR');\n      if (!$server_addr) {\n        if (php_sapi_name() == 'cli') {\n          // This is a command line script (probably something like a unit\n          // test) so it's fine that we don't have SERVER_ADDR defined.\n        } else {\n          throw new AphrontMalformedRequestException(\n            pht('No %s', 'SERVER_ADDR'),\n            pht(\n              'This service is configured to operate in cluster mode, but '.\n              '%s is not defined in the request context. Your webserver '.\n              'configuration needs to forward %s to PHP so the software can '.\n              'reject requests received on external interfaces.',\n              'SERVER_ADDR',\n              'SERVER_ADDR'));\n        }\n      } else {\n        if (!PhabricatorEnv::isClusterAddress($server_addr)) {\n          throw new AphrontMalformedRequestException(\n            pht('External Interface'),\n            pht(\n              'This service is configured in cluster mode and the address '.\n              'this request was received on (\"%s\") is not whitelisted as '.\n              'a cluster address.',\n              $server_addr));\n        }\n      }\n    }\n\n    $site = $this->buildSiteForRequest($request);\n\n    if ($site->shouldRequireHTTPS()) {\n      if (!$request->isHTTPS()) {\n\n        // Don't redirect intracluster requests: doing so drops headers and\n        // parameters, imposes a performance penalty, and indicates a\n        // misconfiguration.","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/configuration/AphrontApplicationConfiguration.php#L413-L449","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before\nbin/repository thaw --demote dev-001 R77 R12\n\n# after (thaw only cluster repositories)\nbin/repository thaw --demote dev-001 R12","handlingStrategy":"validation","validationCode":"// Filter to cluster repositories before thaw:\n$service = $repository->loadAlmanacService();\nif (!$service) { /* skip: not a cluster repository, thaw does not apply */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["phabricator","cli","almanac","cluster-repositories","service-binding"],"backgroundTag":"missing-service-binding","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}