Minh Anh Tran
Minh Anh Tran

Reputation: 145

ERR unknown command 'JSON.SET' - Rejson/Redis

I have followed the tutorial and run:

docker run -p 6379:6379 --name redis-rejson redislabs/rejson:latest

But when I try to run redis-cli and then json.get, I got:

ERR unknown command 'JSON.SET'

MODULE LIST return nil. Can anyone guide me on how to run rejson with docker? Appreciate.

Upvotes: 5

Views: 8380

Answers (2)

Tarık
Tarık

Reputation: 129

Your problem is that you are not loading the redis-json module. Solution is:

  1. First stop redis server

    brew services stop redis

  2. Then, run server with loading the module

    redis-server --loadmodule ./your_release_directory/librejson.dylib

Now you can redis-cli in other terminal.

Upvotes: 3

Minh Anh Tran
Minh Anh Tran

Reputation: 145

I found the problems. I run local redis and it use port 6379 already. When I map rejson docker 6379:6379, it conflicts. . Use different local port for rejson to map with docker port, for example 7000:6379. Cheers

Upvotes: 3

Related Questions