Redisson with PCF Redis On-Demand Service ERR unknown command `EVAL` exception - redis

Have some code written with redisson in mine spring-boot application, which works with my local redis server version 5+. But once apllication pushed to PCF and trying to use redisson lock - I do get next error:
org.redisson.client.RedisException: ERR unknown command `EVAL`, with args beginning with: `if (redis.call('exists', KEYS[1]) == 0) then redis.call('hset', KEYS[1], ARGV[2], 1); redis.call('pexpire', KEYS[1], ARGV[1]); r`, . channel: [id: 0x63facc9b, L:/10.248.253.128:35276 - R:xxxxx:xxxx] command: (EVAL), params: [if (redis.call('exists', KEYS[1]) == 0) then redis.call('hset', KEYS[1], ARGV[2], 1);
Possible reasons that I was able to find were:
Low redis server version, which is not mine case.
Some Redis Cloud providers might not support EVAL command for redis, which is mandatory for redisson.
The most relevant topic I was able to find is this one, but still I am not familiar enough with this technology stack.
So generally I have question, If someone has experience using redisson with PCF Redis On-Demand Service, and maybe can help me understand the issue.
Redisson version is 3.12.0
UPDATE1;
Worked on other PCF instance with Redis On-Demand service, so issue is definitely in Redis On-Demand configuration. Just to confirm you can use Redisson on PCF.

Related

Read from Redis slave node using Jedis

I have a Redis cluster and using Java Jedis library to perform read/write. In my use case, I won't mind reading from slave if there is any issue with master node.
So far I haven't found any way to read from slave node using Jedis APIs. Is there any other option available? Like connecting to the slave node directly and then fetching the value?
Or, changing the library the only way forward?

Redis Enterprise Cluster aware client

Can anyone explain to me what is aware client in Redis Enterprise ?
I found this post: Redis Enterprise Clustering Command Error 'CLUSTER'
I try to use Redis Enterprise Cluster with docker.
I create 3 docker redis nodes with two shards for better scalability.
So what exactly is that aware client and what is the difference between non-cluster aware ?
Also, what is regular OSS cluster ?
Thank You..
"Cluster Aware" means a Redis client that supports the OSS Cluster API (https://redis.io/topics/cluster-spec). For example, the Ruby client https://github.com/redis/redis-rb#cluster-support supports it.
A non-aware client is a client that only supports connecting to Redis in single-instance mode (and perhaps Sentinel), such as the Python client https://github.com/andymccurdy/redis-py.
The Enterprise Cluster can be used by both types of clients regardless of how the database is deployed (i.e. clustered or not).
To clear some more of the confusion:
OSS Cluster - a mode of deployment and API (i.e. not single-instance)
Enterprise Cluster - a product

Redis: ERR command SLAVEOF is not allowed

I'm trying to setup Redis replication in order to migrate data from server A to server B. Server A is a master and on server B I'm running:
SLAVEOF <A IP> <A PORT>
But I get the error:
ERR command SLAVEOF is not allowed
Any idea what's causing this error?
Redis Labs' Redis Cloud does not expose replication verbs to its users, as this is entirely managed by the service. You can refer to the FAQ's answer about compatability with the open source comparison as well.
That said, live migrations to our service via standard Redis replication are supported - to achieve that simply contact our support team with your request for further assistance at https://redislabs.com/support

Redis Cluster Support in Redis 2.8.19

I just started evaluating Redis. I am using Redis 2.8.19 which the most latest stable release. Redis 2.9 is still unstable and Redis 3.0 is just available for developer's preview (not recommended for production). I was tryin to setus a cluster of Redis and when I changed my redis.conf and appended
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
and started my Redis server by
src/redis-server ./redis.conf
it gave me an error as follows
* FATAL CONFIG FILE ERROR *
Reading the configuration file, at line 2
'cluster-enabled yes'
Bad directive or wrong number of arguments
I googled the error and got to know that my version (2.8.19) does not support cluster. I was still unable to fine any such specification in Redis Docs. My question is simple. Does Redis 2.8.19 supports redis cluster configuration? Or I have to upgrade to Redis 2.9 or Redis 3.0. I am evaluating Redis because I need to deploy it in production. Please guide.
Redis Cluster support is only for versions >= 3.0.0. Redis 3.0.0 will be released as a stable version in a matter of days, it's a good idea to use it if you want to use Cluster. The cluster support is considered to be stable, however for it to be considered mature we want to see adoption. Btw there is already at least a very large site using it in production. Currently the most sane thing to do if you need Redis Cluster is to test it for your use case, and if it looks great, use it.
Redis cluster is supported only in Redis 3.0+ (which is now stable). I have written a simple API called "Simple Redis Cluster Client" which can be used in redis's sub 3.0 versions for running in a cluster like mode (Not precisely a cluster, it just distributes keys among redis nodes based on the key's hashcode, You can have a look # https://github.com/prash-mi/simple-redis-cluster-client
Cluster support for Redis is only from v3 - v2.8.19 doesn't do clustering.

redis client pipeline does not work in twemproxy environment

I use redis-py to operate on redis, and our environment use twemproxy as redis proxy. But looks clinet pipeline doesn't work when connect to twemproxy.
import redis
client = redis.StrictRedis(host=host, port=port, db=0)
pipe = client.pipeline()
pipe.smembers('key')
print pipe.execute()
it throws exception when do execute method
redis.exceptions.ConnectionError: Socket closed on remote end
In twemproxy environment, client pipeline doesn't work or it is an issue of redis-py ?
Becouse of twemproxy supports not all redis commands.
Here is actual supported commands list https://github.com/twitter/twemproxy/blob/master/src/proto/nc_redis.c
redis-py pipeline will use transaction by default, try this:
pipe = r.pipeline(transaction=False)