ERR unknown command 'JSON.SET' - Rejson/Redis
Asked Answered
S

2

5

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.

Socket answered 30/8, 2018 at 9:53 Comment(0)
S
3

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

Socket answered 30/8, 2018 at 10:6 Comment(0)
G
3

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.

Ghirlandaio answered 10/12, 2021 at 13:26 Comment(2)
I use the latest Redis docker image, where's this module locatedRolandorolandson
You can check the build section from github.com/RedisJSON/RedisJSON repo @RolandorolandsonAllianora

© 2022 - 2024 — McMap. All rights reserved.