{"record":{"id":"8f45a135858d32de","repo":"phacility/phabricator","slug":"this-request-asked-for-s-on-host-s-but-no-s","errorCode":null,"errorMessage":"This request asked for \"%s\" on host \"%s\", but no site is configured which can serve this request.","messagePattern":"This request asked for \"(.+?)\" on host \"(.+?)\", but no site is configured which can serve this request\\.","errorType":"exception","errorClass":"AphrontMalformedRequestException","httpStatus":500,"severity":"error","filePath":"src/aphront/configuration/AphrontApplicationConfiguration.php","lineNumber":542,"sourceCode":"      }\n    }\n  }\n\n  private function buildSiteForRequest(AphrontRequest $request) {\n    $sites = PhabricatorSite::getAllSites();\n\n    $site = null;\n    foreach ($sites as $candidate) {\n      $site = $candidate->newSiteForRequest($request);\n      if ($site) {\n        break;\n      }\n    }\n\n    if (!$site) {\n      $path = $request->getPath();\n      $host = $request->getHost();\n      throw new AphrontMalformedRequestException(\n        pht('Site Not Found'),\n        pht(\n          'This request asked for \"%s\" on host \"%s\", but no site is '.\n          'configured which can serve this request.',\n          $path,\n          $host),\n        true);\n    }\n\n    $request->setSite($site);\n\n    return $site;\n  }\n\n\n/* -(  Response Handling  )-------------------------------------------------- */\n\n","sourceCodeStart":524,"sourceCodeEnd":560,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/aphront/configuration/AphrontApplicationConfiguration.php#L524-L560","documentation":"Thrown by 'bin/repository thaw --promote' when the repository still has recorded working copy versions on devices whose bindings are now inactive. Promoting while stale versions exist on inactive devices would silently strand those versions, so thaw lists the offending device handles and requires you to demote (or reactivate) them first. This protects against creating a cluster state that later blocks leadership resolution.","triggerScenarios":"Running 'bin/repository thaw --promote repo-006 R12' when PhabricatorRepositoryWorkingCopyVersion::loadVersions() returns rows for devices that are not in the active binding set: the $inactive collection at PhabricatorRepositoryManagementThawWorkflow.php:246 is non-empty and the exception embeds the handle names of those devices.","commonSituations":"Recovery after a device failed and its binding was disabled while it still held the leader version; shrinking a cluster by deactivating bindings without demoting the devices first; repeated partial recovery attempts that left orphaned version rows.","solutions":["Demote each listed inactive device (e.g. 'bin/repository thaw --demote <inactive-device> R12') to discard its versions, then retry the promote.","Or reactivate the inactive bindings in Almanac so the devices participate normally, then choose the correct leader.","Verify remaining versions with PhabricatorRepositoryWorkingCopyVersion::loadVersions / the cluster UI before promoting."],"exampleFix":"# before (stale versions on inactive devices block promotion)\nbin/repository thaw --promote repo-006 R12\n\n# after\bin/repository thaw --demote repo-failed R12 --force\nbin/repository thaw --promote repo-006 R12 --force","handlingStrategy":"validation","validationCode":"// Check for versions on inactive devices before promoting:\n$versions = PhabricatorRepositoryWorkingCopyVersion::loadVersions($repository->getPHID());\n$versions = mpull($versions, null, 'getDevicePHID');\n$inactive = array_diff_key($versions, $bindings); // $bindings = active, by device PHID\nif ($inactive) { /* demote or reactivate those devices first */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always demote a device when disabling its binding, so no orphaned version rows linger.","Review working copy versions before every promote."],"tags":["phabricator","cli","cluster-repositories","promote-demote","stale-state"],"backgroundTag":"stale-cluster-version","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}