qishibo/AnotherRedisDesktopManager · error
message || this.$t('message.test_connection_failed')
Error message
message || this.$t('message.test_connection_failed') What it means
Toast emitted by finishTest(false, message) when a test connection fails: redisClient.createConnection/createSSHConnection rejected, the ioredis client emitted 'error' before 'ready', or the post-ready PING failed (NewConnectionDialog.vue:461-473). 'message || fallback' means the raw ioredis error text ('Connection refused', 'WRONGPASS invalid username-password pair', TLS errors) is shown when present, else the generic localized message.
Source
Thrown at src/components/NewConnectionDialog.vue:422
this.testClient.disconnect(false);
} catch (e) {}
this.testClient = null;
},
// ok: true / false; omit ok for cancel (cleanup only, no toast)
finishTest(ok, message) {
if (!this.testing) {
return;
}
this.testing = false;
clearTimeout(this.testTimer);
this.cleanupTestClient();
// except ok == null
if (ok === true) {
this.$message.success(this.$t('message.test_connection_success'));
} else if (ok === false) {
this.$message.error(message || this.$t('message.test_connection_failed'));
}
},
testConnection() {
if (this.testing) {
return;
}
const config = this.getConnectionConfig();
if (!config) {
return;
}
this.testing = true;
this.testClient = null;
// show timeout message after N seconds
this.testTimer = setTimeout(() => {
this.finishTest(false, this.$t('message.test_connection_timeout'));View on GitHub (pinned to c149855106)
Solutions
- Read the specific message text - it distinguishes TCP refusal, auth failure, and TLS errors
- Verify reachability from the same machine: redis-cli -h <host> -p <port> ping (add --tls for TLS endpoints)
- Re-enter the auth password / ACL username+password
- Match the SSL toggle and SSH settings to the server's actual configuration
Defensive patterns
Strategy: try-catch
Validate before calling
// cheap TCP preflight before the full client handshake (node)
const net = require('net');
function tcpReachable(host, port, timeoutMs = 2000) {
return new Promise((resolve) => {
const s = net.connect({ host, port });
s.setTimeout(timeoutMs, () => { s.destroy(); resolve(false); });
s.once('connect', () => { s.destroy(); resolve(true); });
s.once('error', () => resolve(false));
});
} Try / catch
// every path in the test flow funnels into one finish handler - keep that shape
redisClient.createConnection(host, port, auth, config)
.then((client) => new Promise((resolve, reject) => {
client.once('ready', () => client.ping().then(resolve, reject));
client.once('error', reject);
}))
.catch((e) => {
// surface the raw message: it discriminates auth vs TCP vs TLS causes
showError(e.message || 'test connection failed');
}); Prevention
- Always show e.message - the fallback hides the actual cause
- Keep auth/SSL/SSH settings in the saved profile in sync with server-side changes
- Verify reachability with redis-cli from the same machine before debugging the app
When it happens
Trigger: Wrong host/port (ECONNREFUSED), wrong or missing password (WRONGPASS/NOAUTH), SSL enabled against a plaintext port or vice versa, unreachable SSH tunnel/bastion, server in protected mode, ACL username/password mismatch - any failure that rejects before the 5-second timer fires.
Common situations: Typo'd port, password rotated after the config was saved, TLS mismatch on managed instances (ElastiCache/Upstash), changed SSH key, client IP outside the VPC/security group.
Related errors
- Sentinel & Cluster cannot be checked together!
- this.$t('message.test_connection_timeout')
- Exists Error: ${e.message}
- err.message
- e.message
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/62f973d4b1ec7a85.
Report an issue: GitHub.