# ERR unknown command: Redis does not know this command

> The first word of the command is not one this server knows: a typo, an unsupported module command, or a client newer than the server.

Source: https://sqlly.app/errors/redis/unknown-command
Last updated: 2026-11-30
License: Text and data [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) (credit SQLly, sqlly.app); code and SQL snippets [MIT](https://opensource.org/license/mit). [Details](https://sqlly.app/license).
Note: Quoted error message text belongs to its database vendor.

- Error prefix: `ERR unknown command`
- Category: Data types and commands

Error message:

```text
ERR unknown command 'HGETALLX', with args beginning with: 'myhash'
```

## What it means

This is Redis's failure for the command name itself. The server looked up the first token and found no command with that name, so it reports the name and the first arguments it received, and nothing executed.

The common causes are a typo, a command that exists only in a newer Redis than the server runs, a module command arriving while the module is not loaded, and proxies or ORMs that mangle the name. Redis is case-insensitive about command names, so casing is never the problem, but appended suffixes are. A close sibling message, unknown subcommand '...', appears when a known command gets an unrecognized subcommand.

## Common causes

- A typo in the command name, or a client library assembling the command array wrong.
- The command exists only in Redis versions newer than the one connected to.
- A module command was sent to a server that has not loaded that module.
- A proxy or query builder split or prefixed the command line on the way through.

## How to fix it

1. Confirm the spelling and whether this server supports the command at all:

   ```sql
   COMMAND INFO XADD
   # (nil) means this server has never heard of it
   COMMAND COUNT
   ```
2. Compare the server version with the version that introduced the command, and upgrade if the command is newer:

   ```sql
   INFO server | grep redis_version
   ```
3. Load the module if the command belongs to one:

   ```sql
   MODULE LIST
   MODULE LOAD /usr/lib/redis/modules/redistimeseries.so
   ```

## Reproduce it safely

```sql
redis-cli HGETALLX myhash
# (error) ERR unknown command 'HGETALLX', with args beginning with: 'myhash' 
redis-cli HGETALL myhash
# works
```

## How SQLly helps

SQLly sends commands over RESP exactly as typed, so the error shows the raw unknown name, and COMMAND INFO and INFO server run in the same editor to settle whether the server is too old or the name is simply wrong.

## Questions

### Are Redis command names case-sensitive?

No. GET and get are the same command. The name in the error is what you sent, so check spelling, not case.

### Why does the same code work in another environment?

The other server is probably a newer Redis or has the module loaded. Compare redis_version from INFO server and MODULE LIST between the two environments.

## Related errors

- [`ERR wrong number of arguments`](https://sqlly.app/errors/redis/wrong-number-of-arguments): Argument count is wrong
- [`42601`](https://sqlly.app/errors/postgresql/42601): PostgreSQL: syntax error at or near
- [`1064`](https://sqlly.app/errors/mysql/1064): MySQL: You have an error in your SQL syntax
- [`Parser Error`](https://sqlly.app/errors/duckdb/parser-syntax-error): DuckDB: The SQL does not parse

The code and message text are from the [Redis documentation and source code](https://redis.io/docs/latest/).
