qishibo/AnotherRedisDesktopManager · critical

error.message

Error message

error.message

What it means

The initial connection promise from redisClient.createConnection(host, port, auth, config) (or createSSHConnection for the ssh branch) rejected, so the connection never established. Classic causes: ECONNREFUSED (wrong host/port or server not listening), ETIMEDOUT (firewalled or unreachable), 'ERR invalid password'/NOAUTH (auth mismatch), TLS mismatch, or bad SSH options. The UI shows the raw message and emits closeConnection.

Source

Thrown at src/components/ConnectionWrapper.vue:189

        var clientPromise = redisClient.createConnection(
          configCopy.host, configCopy.port, configCopy.auth, configCopy,
        );
      }

      clientPromise.then((client) => {
        this.client = client;

        client.on('error', (error) => {
          this.$message.error({
            message: `Client On Error: ${error} Config right?`,
            duration: 3000,
            customClass: 'redis-on-error-message',
          });

          this.$bus.$emit('closeConnection');
        });
      }).catch((error) => {
        this.$message.error(error.message);
        this.$bus.$emit('closeConnection');
      });

      return clientPromise;
    },
    setColor(color, save = true) {
      const ulDom = this.$refs.connectionMenu.$el;
      const className = 'menu-with-custom-color';

      // save to setting
      save && this.$storage.editConnectionItem(this.config, { color });

      if (!color) {
        ulDom.classList.remove(className);
      } else {
        ulDom.classList.add(className);
        this.$el.style.setProperty('--menu-color', color);
      }

View on GitHub (pinned to c149855106)

Solutions

  1. Verify reachability outside the app: redis-cli -h <host> -p <port> ping (or nc -vz host port)
  2. Fix host/port and ensure the server binds the right interface with protected-mode handled (bind + requirepass, or bind 127.0.0.1 for local only)
  3. Update the saved auth password to match requirepass/ACL
  4. Match the TLS setting to the endpoint and check SSH options for tunnelled setups

Example fix

// before
clientPromise.then((client) => { /* ... */ }).catch((error) => {
  this.$message.error(error.message);
  this.$bus.$emit('closeConnection');
});

// after
clientPromise.then((client) => { /* ... */ }).catch((error) => {
  const m = String(error.message);
  const hint = /ECONNREFUSED/.test(m) ? 'host/port wrong or server down'
    : /ETIMEDOUT/.test(m) ? 'firewall or unreachable network'
    : /invalid password|NOAUTH|auth/i.test(m) ? 'wrong password'
    : m;
  this.$message.error(`Connect failed: ${hint}`);
  this.$bus.$emit('closeConnection');
});
Defensive patterns

Strategy: validation

Validate before calling

// cheap TCP probe before creating the redis client
const net = require('net');
const reachable = await new Promise((resolve) => {
  const s = net.connect({ host, port, timeout: 2000 });
  s.on('connect', () => { s.destroy(); resolve(true); });
  s.on('error', () => resolve(false));
  s.on('timeout', () => { s.destroy(); resolve(false); });
});
if (!reachable) {
  this.$message.error(`${host}:${port} unreachable`);
  return;
}

Type guard

const isRedisConfigValid = (c) =>
  Boolean(c) && typeof c.host === 'string' && c.host.length > 0
  && Number.isInteger(c.port) && c.port > 0 && c.port < 65536;

Try / catch

.catch((error) => {
  const m = String(error.message);
  if (/ECONNREFUSED/.test(m)) { /* host/port wrong or server down */ }
  else if (/ETIMEDOUT/.test(m)) { /* firewall or network */ }
  else if (/invalid password|NOAUTH/i.test(m)) { /* fix credentials */ }
  else { this.$message.error(m); }
  this.$bus.$emit('closeConnection');
})

Prevention

When it happens

Trigger: Typo'd host or port; redis-server not started or bound to 127.0.0.1 while connecting remotely; protected-mode blocking external clients; requirepass set but the saved auth empty; plaintext connection to a TLS port (or vice versa); SSH tunnel credentials or mappings wrong.

Common situations: First-time setups, Docker port mappings not published, cloud security groups blocking 6379, rotated passwords in saved configs, rediss:// endpoints used without TLS.

Related errors


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