{"record":{"id":"7b3eefc3ea387d9c","repo":"phacility/phabricator","slug":"configuration-file-specifies-cluster-peer-s-mor","errorCode":null,"errorMessage":"Configuration file specifies cluster peer \"%s\" more than once (at indexes \"%s\" and \"%s\"). Each peer must have a unique host and port combination.","messagePattern":"Configuration file specifies cluster peer \"(.+?)\" more than once \\(at indexes \"(.+?)\" and \"(.+?)\"\\)\\. Each peer must have a unique host and port combination\\.","errorType":"exception","errorClass":"PhutilArgumentUsageException","httpStatus":null,"severity":"error","filePath":"src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php","lineNumber":262,"sourceCode":"          break;\n        default:\n          throw new PhutilArgumentUsageException(\n            pht(\n              'Configuration file specifies cluster peer (\"%s\", at index '.\n              '\"%s\") with an invalid protocol, \"%s\". Valid protocols are '.\n              '\"%s\" or \"%s\".',\n              $host,\n              $index,\n              $protocol,\n              'http',\n              'https'));\n      }\n\n      $peer_key = \"{$host}:{$port}\";\n      if (!isset($peer_map[$peer_key])) {\n        $peer_map[$peer_key] = $index;\n      } else {\n        throw new PhutilArgumentUsageException(\n          pht(\n            'Configuration file specifies cluster peer \"%s\" more than '.\n            'once (at indexes \"%s\" and \"%s\"). Each peer must have a '.\n            'unique host and port combination.',\n            $peer_key,\n            $peer_map[$peer_key],\n            $index));\n      }\n    }\n\n    $this->configData = $data;\n    $this->configPath = $full_path;\n\n    $pid_path = $this->getPIDPath();\n    try {\n      $dir = dirname($pid_path);\n      if (!Filesystem::pathExists($dir)) {\n        Filesystem::createDirectory($dir, 0755, true);","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/aphlict/management/PhabricatorAphlictManagementWorkflow.php#L244-L280","documentation":"Thrown when two entries in the 'cluster' section of the Aphlict config produce the same host:port peer key. Each peer must identify a distinct node endpoint; duplicates usually mean the same node was listed twice.","triggerScenarios":"The cluster list contains two entries with identical host and port (exact same node listed twice), or one host listed twice where the port was not actually changed in the second entry.","commonSituations":"Copy-pasting a peer entry to add a third node and editing only the host (port left identical on the same host); merging cluster configs from two nodes that each listed the same bootstrap peer.","solutions":["Deduplicate cluster entries so each host:port pair appears exactly once","List every OTHER node of the cluster on each node's config (this node itself does not need to be its own peer)"],"exampleFix":"// before\n\"cluster\": [\n  {\"host\": \"node2\", \"port\": 22281, \"protocol\": \"http\"},\n  {\"host\": \"node2\", \"port\": 22281, \"protocol\": \"http\"}\n]\n// after\n\"cluster\": [\n  {\"host\": \"node2\", \"port\": 22281, \"protocol\": \"http\"}\n]","handlingStrategy":"validation","validationCode":"$seen = array();\nforeach (idx($config, 'cluster', array()) as $peer) {\n  $k = $peer['host'].':'.$peer['port'];\n  if (isset($seen[$k])) {\n    throw new InvalidArgumentException(\"Duplicate cluster peer {$k}\");\n  }\n  $seen[$k] = true;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate each node's cluster list from a single source of truth so duplicates cannot slip in"],"tags":["aphlict","cluster","duplicate-entry","configuration","phabricator"],"backgroundTag":"duplicate-config-entry","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T13:17:26.733Z"}