qishibo/AnotherRedisDesktopManager · critical · Error

Master name "${configRaw.sentinelOptions.masterName}" not ex

Error message

Master name "${configRaw.sentinelOptions.masterName}" not exists!

What it means

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.

Source

Thrown at src/redisClient.js:108

  createSSHConnection(sshOptions, host, port, auth, config) {
    const sshOptionsDict = this.getSSHOptions(sshOptions, host, port);

    const configRaw = JSON.parse(JSON.stringify(config));
    const sshConfigRaw = JSON.parse(JSON.stringify(sshOptionsDict));

    const sshPromise = new Promise((resolve, reject) => {
      createTunnel(...Object.values(sshOptionsDict)).then(([server, connection]) => {
        const listenAddress = server.address();

        // sentinel mode
        if (configRaw.sentinelOptions) {
          // this is a sentinel connection, remove db
          const client = this.createConnection(listenAddress.address, listenAddress.port, auth, configRaw, false, true, true);

          client.on('ready', () => {
            client.call('sentinel', 'get-master-addr-by-name', configRaw.sentinelOptions.masterName).then((reply) => {
              if (!reply) {
                return reject(new Error(`Master name "${configRaw.sentinelOptions.masterName}" not exists!`));
              }

              // connect to the master node via ssh
              this.createClusterSSHTunnels(sshConfigRaw, [{ host: reply[0], port: reply[1] }]).then((tunnels) => {
                const sentinelClient = this.createConnection(
                  tunnels[0].localHost, tunnels[0].localPort, configRaw.sentinelOptions.nodePassword, configRaw, false, true,
                );

                return resolve(sentinelClient);
              });
            }).catch((e) => { reject(e); }); // sentinel exec failed
          });

          client.on('error', (e) => { reject(e); });
        }

        // ssh cluster mode
        else if (configRaw.cluster) {

View on GitHub (pinned to c149855106)

Solutions

  1. 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.
  2. Paste the exact name into the Master Name field of the connection config and reconnect.
  3. If the sentinel monitors nothing, configure it ('sentinel monitor <name> <host> <port> <quorum>') or bypass sentinel and connect directly to the Redis master.

Example fix

// before
client.call('sentinel', 'get-master-addr-by-name', configRaw.sentinelOptions.masterName).then(reply => {
  if (!reply) reject(new Error('Master name not exists!'));
});

// after - validate the name before opening tunnels
const masters = await sentinelClient.call('sentinel', 'masters');
const names = masters.map(m => m[1]);
if (!names.includes(configRaw.sentinelOptions.masterName)) {
  throw new Error(`Master name '${configRaw.sentinelOptions.masterName}' not in [${names.join(', ')}]`);
}
Defensive patterns

Strategy: validation

Validate before calling

// before opening SSH tunnels, confirm the master name resolves
const masters = await sentinel.call('sentinel', 'masters');
const validNames = masters.map((m) => m[1]);
if (!validNames.includes(configRaw.sentinelOptions.masterName)) {
  throw new Error(`Unknown master name. Valid names: ${validNames.join(', ')}`);
}

Try / catch

try {
  const client = await connectViaSentinel(config);
} catch (e) {
  if (e.message.includes('not exists')) {
    // config error: fetch SENTINEL masters and show valid names; do not retry with the same name
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.


AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22). Data as JSON: /api/errors/06fca0af93cb806b. Report an issue: GitHub.