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.

Guy Korland
  • 9,139
  • 14
  • 59
  • 106
Minh Anh Tran
  • 145
  • 1
  • 7

2 Answers2

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

Minh Anh Tran
  • 145
  • 1
  • 7
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.

Tarık
  • 99
  • 6