JReJSON Client is not connecting to Redis json module with config file

Hi

I am trying to connect to RedisJson module that will include my custom redis.conf file without success

let’s start if I have dockerFile with only:

FROM redislabs/rejson:latest as rejson

and my code is:
JReJSON jReJSON = new JReJSON(“127.0.0.1”,6379);
jReJSON.set(“MM”,“FOO”);
jReJSON.get(“MM”);

it’s working

But

when i am adding the config file to ehiter “/etc/redis.conf” or under “/usr/local/etc/redis/redis.conf”

and in the config file, I uncomment the load of the module the client refuses to connect
dockerFile:

FROM redislabs/rejson:latest as rejson
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY “redisM.conf” “/usr/local/etc/redis/redis.conf”
COPY . /usr/src/app
CMD [“redis-server”, “/usr/local/etc/redis/redis.conf”]

also the same for:

FROM redis
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY “redis.conf” “/etc/redis.conf”
COPY “rejson.so” “/usr/src/app/modules/rejson.so”
COPY . /usr/src/app
CMD [“redis-server”, “/etc/redis.conf”]

When I explore the docker container using :

docker exec -t -i mycontainer /bin/bash

I can see and confirm it’s my conf file.

p.s

in my conf file, I changed protected-mode to no
and bind my localhost

client refuses to connect

What error are you getting? What does the docker log say?

@itamarhaber TNX for the response

the log from Redis server:

C:\Users\moshel> docker run -p 6379:6379 redis
1:C 12 Jan 2021 18:17:06.492 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 12 Jan 2021 18:17:06.493 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 12 Jan 2021 18:17:06.493 # Configuration loaded
.
.-__ ''-._ _.- . . ‘’-._ Redis 6.0.9 (00000000/0) 64 bit
.- .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.-.|’_.-'| Port: 6379 | -. ._ / _.-' | PID: 1 -._ -._ -./ .-’ .-’
|-._-.
-.__.-' _.-'_.-'| | -.
-._ _.-'_.-' | http://redis.io -._ -._-..-’.-’ .-’
|-._-.
-.__.-' _.-'_.-'| | -.
-._ _.-'_.-' | -._ -._-.
.-’_.-’ _.-’
-._ -..-’ _.-’
-._ _.-' -.
.-’

1:M 12 Jan 2021 18:17:06.497 # Server initialized
1:M 12 Jan 2021 18:17:06.500 # JSON data type for Redis v1.0.7 [encver 0]
1:M 12 Jan 2021 18:17:06.500 * Module ‘ReJSON’ loaded from /usr/lib/redis/modules/rejson.so
1:M 12 Jan 2021 18:17:06.500 * Ready to accept connections

I am able to use SET.JSON and GET.JSON using the CLI

the exceptioni am getting from JReJSON:

Exception in thread “main” redis.clients.jedis.exceptions.JedisConnectionException: Unexpected end of stream.
at redis.clients.jedis.util.RedisInputStream.ensureFill(RedisInputStream.java:202)
at redis.clients.jedis.util.RedisInputStream.readByte(RedisInputStream.java:43)
at redis.clients.jedis.Protocol.process(Protocol.java:155)
at redis.clients.jedis.Protocol.read(Protocol.java:220)
at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:318)
at redis.clients.jedis.Connection.getStatusCodeReply(Connection.java:236)
at com.redislabs.modules.rejson.JReJSON.set(JReJSON.java:271)
at com.redislabs.modules.rejson.JReJSON.set(JReJSON.java:236)

the code is just simple set get

Do any of these help?

Tnx

My timeout on the server is 0 disabled

Still don’t work