{"record":{"id":"f681448de738ab33","repo":"phacility/phabricator","slug":"no-repository-service-s-exists","errorCode":null,"errorMessage":"No repository service \"%s\" exists.","messagePattern":"No repository service \"(.+?)\" exists\\.","errorType":"console","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/repository/management/PhabricatorRepositoryManagementClusterizeWorkflow.php","lineNumber":67,"sourceCode":"    if (!$service_name && !$remove_service) {\n      throw new PhutilArgumentUsageException(\n        pht('Specify --service or --remove-service.'));\n    }\n\n    if ($remove_service) {\n      $service = null;\n    } else {\n      $service = id(new AlmanacServiceQuery())\n        ->setViewer($viewer)\n        ->withNames(array($service_name))\n        ->withServiceTypes(\n          array(\n            AlmanacClusterRepositoryServiceType::SERVICETYPE,\n          ))\n        ->needActiveBindings(true)\n        ->executeOne();\n      if (!$service) {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'No repository service \"%s\" exists.',\n            $service_name));\n      }\n    }\n\n    if ($service) {\n      $service_phid = $service->getPHID();\n\n      $bindings = $service->getActiveBindings();\n\n      $unique_devices = array();\n      foreach ($bindings as $binding) {\n        $unique_devices[$binding->getDevicePHID()] = $binding->getDevice();\n      }\n\n      if (count($unique_devices) > 1) {\n        $device_names = mpull($unique_devices, 'getName');","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/repository/management/PhabricatorRepositoryManagementClusterizeWorkflow.php#L49-L85","documentation":"Usage error from 'bin/repository clusterize': --service <name> was given, but the AlmanacServiceQuery filtered to the cluster repository service type (AlmanacClusterRepositoryServiceType) with active bindings returned no service. Either no Almanac service with that name exists, or one exists but is the wrong service type, or it has no active bindings.","triggerScenarios":"Typo in the service name; the Almanac service was created with a different service type rather than the cluster repository type; the service exists but has no active device bindings; the running admin cannot see the service.","commonSituations":"Clustering set up partially: service created but bindings to devices never made; name mismatch between the Almanac console and the CLI argument.","solutions":["Check Almanac (/almanac/) for the exact service name spelling","Ensure the service type is Cluster Repository (AlmanacClusterRepositoryServiceType)","Add active bindings to at least one device for that service, then retry","Run the command as an admin who can see the service"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Pre-check the Almanac service exactly as clusterize does:\n$service = id(new AlmanacServiceQuery())\n  ->setViewer($viewer)\n  ->withNames(array($service_name))\n  ->withServiceTypes(array(AlmanacClusterRepositoryServiceType::SERVICETYPE))\n  ->needActiveBindings(true)\n  ->executeOne();\nif (!$service) {\n  // fix name, type, or bindings before running clusterize\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Create cluster services with the Cluster Repository service type only","Bind at least one device and verify bindings are active before clusterizing","Copy service names verbatim from the Almanac console"],"tags":["phabricator","cli","almanac","clustering","service-not-found"],"backgroundTag":"service-not-found","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}