{"record":{"id":"06fca0af93cb806b","repo":"qishibo/AnotherRedisDesktopManager","slug":"master-name-configraw-sentineloptions-masternam","errorCode":null,"errorMessage":"Master name \"${configRaw.sentinelOptions.masterName}\" not exists!","messagePattern":"Master name \"(.+?)\" not exists!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"src/redisClient.js","lineNumber":108,"sourceCode":"  createSSHConnection(sshOptions, host, port, auth, config) {\n    const sshOptionsDict = this.getSSHOptions(sshOptions, host, port);\n\n    const configRaw = JSON.parse(JSON.stringify(config));\n    const sshConfigRaw = JSON.parse(JSON.stringify(sshOptionsDict));\n\n    const sshPromise = new Promise((resolve, reject) => {\n      createTunnel(...Object.values(sshOptionsDict)).then(([server, connection]) => {\n        const listenAddress = server.address();\n\n        // sentinel mode\n        if (configRaw.sentinelOptions) {\n          // this is a sentinel connection, remove db\n          const client = this.createConnection(listenAddress.address, listenAddress.port, auth, configRaw, false, true, true);\n\n          client.on('ready', () => {\n            client.call('sentinel', 'get-master-addr-by-name', configRaw.sentinelOptions.masterName).then((reply) => {\n              if (!reply) {\n                return reject(new Error(`Master name \"${configRaw.sentinelOptions.masterName}\" not exists!`));\n              }\n\n              // connect to the master node via ssh\n              this.createClusterSSHTunnels(sshConfigRaw, [{ host: reply[0], port: reply[1] }]).then((tunnels) => {\n                const sentinelClient = this.createConnection(\n                  tunnels[0].localHost, tunnels[0].localPort, configRaw.sentinelOptions.nodePassword, configRaw, false, true,\n                );\n\n                return resolve(sentinelClient);\n              });\n            }).catch((e) => { reject(e); }); // sentinel exec failed\n          });\n\n          client.on('error', (e) => { reject(e); });\n        }\n\n        // ssh cluster mode\n        else if (configRaw.cluster) {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/redisClient.js#L90-L126","documentation":"Thrown while building an SSH-tunneled Sentinel connection. The app connects to the sentinel node through the tunnel and runs SENTINEL get-master-addr-by-name with configRaw.sentinelOptions.masterName (src/redisClient.js). Sentinel replies null when it monitors no master under that name, so the whole connection promise is rejected with this message and no client is returned.","triggerScenarios":"Sentinel connection config with sentinelOptions set (SSH tunnel + sentinel) where masterName is misspelled or unknown to that sentinel; pointing at a host/port that is a sentinel for a different deployment; a sentinel that has never been configured with 'sentinel monitor' for the requested name.","commonSituations":"Typo in the Master Name field (e.g. 'myaster' vs 'mymaster'); environments that use a custom master name instead of the default 'mymaster'; connecting to the wrong sentinel in a shared infrastructure; copy-pasting configs between environments.","solutions":["From a terminal run 'SENTINEL masters' (or 'SENTINEL get-master-addr-by-name mymaster') against the same sentinel host/port and copy the exact master name.","Paste the exact name into the Master Name field of the connection config and reconnect.","If the sentinel monitors nothing, configure it ('sentinel monitor <name> <host> <port> <quorum>') or bypass sentinel and connect directly to the Redis master."],"exampleFix":"// before\nclient.call('sentinel', 'get-master-addr-by-name', configRaw.sentinelOptions.masterName).then(reply => {\n  if (!reply) reject(new Error('Master name not exists!'));\n});\n\n// after - validate the name before opening tunnels\nconst masters = await sentinelClient.call('sentinel', 'masters');\nconst names = masters.map(m => m[1]);\nif (!names.includes(configRaw.sentinelOptions.masterName)) {\n  throw new Error(`Master name '${configRaw.sentinelOptions.masterName}' not in [${names.join(', ')}]`);\n}","handlingStrategy":"validation","validationCode":"// before opening SSH tunnels, confirm the master name resolves\nconst masters = await sentinel.call('sentinel', 'masters');\nconst validNames = masters.map((m) => m[1]);\nif (!validNames.includes(configRaw.sentinelOptions.masterName)) {\n  throw new Error(`Unknown master name. Valid names: ${validNames.join(', ')}`);\n}","typeGuard":null,"tryCatchPattern":"try {\n  const client = await connectViaSentinel(config);\n} catch (e) {\n  if (e.message.includes('not exists')) {\n    // config error: fetch SENTINEL masters and show valid names; do not retry with the same name\n  } else {\n    throw e;\n  }\n}","preventionTips":["Copy the master name from 'SENTINEL masters' output instead of typing it.","Treat this error as a permanent config failure - retrying unchanged never helps.","Store the sentinel host/port and master name together in the connection profile so they cannot drift."],"tags":["redis-sentinel","ssh-tunnel","master-name","connection-config"],"backgroundTag":"sentinel-master-not-found","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}