1

I wonder if anyone can help. I tried to install reJSON using Docker on a Raspberry PI but got some errors. Then as I couldn't figure out what to do about the errors tried a few things but nothing works.

Here are my logs:

pi@raspberrypi:~ $ docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest Unable to find image 'redislabs/rejson:latest' locally latest: Pulling from redislabs/rejson 6ae821421a7d: Pull complete e3717477b42d: Pull complete 8e70bf6cc2e6: Pull complete 0f84ab76ce60: Pull complete 0903bdecada2: Pull complete 492876061fbd: Pull complete f8bcaeface09: Pull complete 649610526f33: Pull complete Digest: sha256:a954a135cb54ee40a7dfb45617f7e27061ca293d939e6f2e9df6b55a259657dd Status: Downloaded newer image for redislabs/rejson:latest docker: Error response from daemon: driver failed programming external connectivity on endpoint redis-redisjson (25ab4a7026c4003415085fcfc2e59f5ae8216cafb398e899302014a9ebd5c51a): Error starting userland proxy: listen tcp 0.0.0.0:6379: bind: address already in use. ERRO[0025] error waiting for container: context canceled

pi@raspberrypi:~ $ sudo /etc/init.d/redis-server stop [ ok ] Stopping redis-server (via systemctl): redis-server.service.

pi@raspberrypi:~ $ docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest docker: Error response from daemon: Conflict. The container name "/redis-redisjson" is already in use by container "446bdd17f4994510bfb489fc6295f01b877ec892e4622973d79c9b1ae9e33ab2". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'.

pi@raspberrypi:~ $ docker rm 446bdd17f4994510bfb489fc6295f01b877ec892e4622973d79c9b1ae9e33ab2

446bdd17f4994510bfb489fc6295f01b877ec892e4622973d79c9b1ae9e33ab2

pi@raspberrypi:~ $ docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest standard_init_linux.go:211: exec user process caused "exec format error"

pi@raspberrypi:~ $ docker rm 446bdd17f4994510bfb489fc6295f01b877ec892e4622973d79c9b1ae9e33ab2

Error: No such container: 446bdd17f4994510bfb489fc6295f01b877ec892e4622973d79c9b1ae9e33ab2

pi@raspberrypi:~ $ docker rm /redis-redisjson /redis-redisjson

pi@raspberrypi:~ $ docker run -p 6379:6379 --name redis-redisjson redislabs/rejson:latest standard_init_linux.go:211: exec user process caused "exec format error"

pi@raspberrypi:~ $

redis-server was also running on this machine on 127.0.0.1:6379. I presume this is why I see the error about 0.0.0.0:6379 being in use. So I stopped redis-server then started getting all sorts of other issues.

Time to ask a linux expert now how to move forward.

Thanks Ron

2 Answers 2

0

I got past most of the hurdles bar one. I copied reJSON using git then compiled the module, then included it in the redis.conf file.

Now the one hurdle left which is probably the same as what the logs in my post above also say, where it couldn't connect to IP/port 0.0.0.0:6379 as it was in use already.

redis.conf has "bind 127.0.0.1" defined. When adding in the line "loadmodule /path/to/file/rejson.so" (where /path/to/file/ is the correct path), the redis-cli command doesn't connect, with the loadmodule command commented out I can connect with redis-cli to 127.0.0.1:6379 fine.

1
  • The docker command has port 6379 in it, which is probably the source of the issue. But there is only ever redis-server listening on that port, when stopped there is nothing listening on that port. It is still related to the reJSON module but I can't find where it has anything to do with that port. I checked all c header files but no reference it 6379. I'm a bit stuck now.
    – RonV
    Commented Aug 10, 2019 at 6:44
0

I've resolved the issue by removing the docker image, the remaining issue was that rejson.so (compiled module) had to be moved to a directory where redis has access to and correctly reflect this in the redis.conf file. Module is now running and redis-cli shows that JSON... commands are recognised.

As for docker, I now understand that the first port parameter of 6379 is where docker is listening on that port to forward to the 6379 port inside the docker container. So the contention was with the docker container and the local redis-server both listening on 6379. That'll teach me to just copy commands blindly.

Ron

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .