ERR unknown command
The server doesn't recognize the command name.
Redis returns this error when it doesn't recognize the command you sent. The message repeats the command name and its first arguments, so you can see exactly what the server received. For a command without arguments, the message ends after the command name: ERR unknown command 'FOO'.
ERR unknown command 'FOO', with args beginning with: 'bar'
Example
> FOO bar
(error) ERR unknown command 'FOO', with args beginning with: 'bar'
A command that has subcommands, such as CONFIG, gives a similar error for a subcommand it doesn't know:
> CONFIG FOO
(error) ERR unknown subcommand 'FOO'. Try CONFIG HELP.
How to fix it
- The command name is misspelled. Check the name on the command's page, such as
GET. - The command is newer than your server. Each command page shows the version that added the command, under Available since. To find your server's version, run
INFO serverand look at theredis_versionfield. Upgrade the server if you need the command. - The command needs a feature that the server doesn't include. For example,
JSON.SETandFT.SEARCHonly work when the server includes JSON and Redis Search. Some Redis builds and packages don't include them. To see which modules the server has loaded, runMODULE LIST. - The server's configuration renamed or disabled the command. The
rename-commandsetting can give a command a different name, or remove it. See Disallowing specific commands.
In a transaction, an unknown command also makes EXEC fail with EXECABORT.