{"record":{"id":"a8c789cc347277f0","repo":"qishibo/AnotherRedisDesktopManager","slug":"sentinel-cluster-cannot-be-checked-together","errorCode":null,"errorMessage":"Sentinel & Cluster cannot be checked together!","messagePattern":"Sentinel & Cluster cannot be checked together!","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/components/NewConnectionDialog.vue","lineNumber":363,"sourceCode":"        this.sslOptionsShow = !!this.config.sslOptions;\n        this.sentinelOptionsShow = !!this.config.sentinelOptions;\n        // recovery connection before edit\n        const connection = Object.assign({}, this.connectionEmpty, this.config);\n        this.connection = JSON.parse(JSON.stringify(connection));\n      }\n      // new connection mode\n      else {\n        this.sshOptionsShow = false;\n        this.sslOptionsShow = false;\n        this.sentinelOptionsShow = false;\n        this.connection = JSON.parse(JSON.stringify(this.connectionEmpty));\n      }\n    },\n    getConnectionConfig() {\n      const config = JSON.parse(JSON.stringify(this.connection));\n\n      if (this.sentinelOptionsShow && config.cluster) {\n        this.$message.error('Sentinel & Cluster cannot be checked together!');\n        return false;\n      }\n\n      !config.host && (config.host = '127.0.0.1');\n      !config.port && (config.port = 6379);\n\n      if (!this.sshOptionsShow || !config.sshOptions.host) {\n        delete config.sshOptions;\n      }\n\n      if (!this.sslOptionsShow) {\n        delete config.sslOptions;\n      }\n\n      if (!this.sentinelOptionsShow || !config.sentinelOptions.masterName) {\n        delete config.sentinelOptions;\n      }\n","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/components/NewConnectionDialog.vue#L345-L381","documentation":"getConnectionConfig() rejects the form when the Sentinel panel is expanded (sentinelOptionsShow) and the Cluster checkbox is also ticked: it shows this toast and returns false, which aborts both testConnection and saving. ioredis connects either via a sentinel list or to cluster nodes, never both at once, so this is an invalid topology caught client-side before any network call.","triggerScenarios":"In the connection dialog: fill Sentinel options and also check 'Cluster' (config.cluster truthy), then click Test Connection or OK. The check in getConnectionConfig fires before defaults (host 127.0.0.1, port 6379) are even applied.","commonSituations":"Exploring dialog options and leaving both boxes checked; converting a saved cluster connection to sentinel-managed (or vice versa) without unchecking the other option.","solutions":["If the deployment is Sentinel-managed, uncheck Cluster and fill the sentinel master name/host","If connecting directly to a Redis Cluster, collapse Sentinel and clear its fields","Make the two controls mutually exclusive in the UI so the state can never be submitted"],"exampleFix":"// before - both flags can be on at once\n\n// after - enforce mutual exclusion when Sentinel toggles\nwatch: {\n  sentinelOptionsShow(show) {\n    if (show) {\n      this.connection.cluster = false;\n    }\n  },\n},","handlingStrategy":"validation","validationCode":"// reject the config before any network activity\nfunction isValidConnectionConfig(config, sentinelEnabled) {\n  if (sentinelEnabled && config.cluster) {\n    return { ok: false, reason: 'sentinel-and-cluster-mutually-exclusive' };\n  }\n  return { ok: true };\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Decide the topology first: sentinel-managed OR direct cluster, never both","When toggling Sentinel on, clear/uncheck Cluster in the same interaction","Save known-good profiles per topology so manual checkbox state never mixes"],"tags":["redis","sentinel","cluster","configuration","ioredis","ardm"],"backgroundTag":"invalid-configuration","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}