qishibo/AnotherRedisDesktopManager · warning
e.message
Error message
e.message
What it means
Fires when this.client.select(selectedDbIndex) rejects inside changeDb(). The dominant cause is Redis Cluster: only DB 0 exists and cluster clients reject SELECT with 'SELECT is not allowed in cluster mode' (the code comment notes exactly this). Standalone causes include an index beyond the databases limit ('DB index is out of range'), NOAUTH, or a dropped connection; on any failure the component resets selectedDbIndex to 0.
Source
Thrown at src/components/OperateItem.vue:246
if (dbIndex !== false) {
this.selectedDbIndex = parseInt(dbIndex);
}
this.client.select(this.selectedDbIndex)
.then(() => {
// clear the search input
this.searchMatch = '';
this.$parent.$parent.$parent.$refs.keyList.refreshKeyList();
const dbKey = this.$storage.getStorageKeyByName('last_db', this.config.connectionName);
// store the last selected db
localStorage.setItem(dbKey, this.selectedDbIndex);
// tell cli to change db
this.client.options.db = this.selectedDbIndex;
this.$bus.$emit('changeDb', this.client, this.selectedDbIndex);
})
// select is not allowed in cluster mode
.catch((e) => {
this.$message.error({
message: e.message,
duration: 3000,
});
// reset to db0
this.selectedDbIndex = 0;
});
},
customDbName(db) {
const name = this.dbNames[db];
this.$prompt(this.$t('message.custom_name'), { inputValue: name }).then(({ value }) => {
this.$set(this.dbNames, db, value);
const dbKey = this.$storage.getStorageKeyByName('custom_db', this.config.connectionName);
localStorage.setItem(dbKey, JSON.stringify(this.dbNames));
}).catch(() => {});
},
filterDbCustomName(query) {View on GitHub (pinned to c149855106)
Solutions
- Hide or disable the DB selector when the client is a cluster connection so SELECT is never issued
- Verify the index is within the server's databases setting (redis-cli CONFIG GET databases)
- Reconnect if the socket dropped, then retry the select
- Keep the reset-to-db0 fallback so UI state matches server state after a failure
Example fix
// before
this.client.select(this.selectedDbIndex).then(() => { /* ... */ }).catch((e) => {
this.$message.error({ message: e.message, duration: 3000 });
this.selectedDbIndex = 0;
});
// after
if (this.client.nodes) { // cluster client: only db 0 exists
this.$message.info(this.$t('message.cluster_only_db0'));
this.selectedDbIndex = 0;
return;
}
this.client.select(this.selectedDbIndex).then(() => { /* ... */ }).catch((e) => {
this.$message.error({ message: e.message, duration: 3000 });
this.selectedDbIndex = 0;
}); Defensive patterns
Strategy: validation
Validate before calling
// cluster connections expose nodes(); SELECT only exists on standalone
if (this.client.nodes) {
this.$message.info(this.$t('message.cluster_only_db0'));
this.selectedDbIndex = 0;
return;
}
if (!(Number.isInteger(this.selectedDbIndex) && this.selectedDbIndex >= 0 && this.selectedDbIndex < this.dbs.length)) {
this.selectedDbIndex = 0;
} Type guard
const isClusterClient = (client) => Boolean(client && typeof client.nodes === 'function');
Prevention
- Detect cluster connections up front and lock the DB selector to 0
- Cache CONFIG GET databases to bound valid indexes
- Reset UI state to db0 whenever SELECT fails so client and server stay in sync
When it happens
Trigger: Picking a non-zero database in the DB dropdown while the connection is a cluster (client exposing nodes()); selecting an index >= the server's databases setting (default 16, indexes 0-15); executing SELECT on a socket that just dropped.
Common situations: Pointing the tool at ElastiCache/Azure cluster-mode endpoints while expecting standalone DB semantics; configs copied between standalone and cluster connections; small servers configured with databases < 16.
Related errors
- You are in readonly mode! Unable to execute write command!
- Persist Error: ${e.message}
- this.$t('message.info_disabled')
- e.message
- Delete Batch Stream On Error: ${e.message}
AI-assisted analysis of qishibo/AnotherRedisDesktopManager@c149855106 (2026-08-22).
Data as JSON: /api/errors/930b99ed7d571d38.
Report an issue: GitHub.